summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
commitb2f0133220474fda94f620b1916ba8d9ce839ba9 (patch)
tree581aa27c330a2b9a1a5b9a17c7d76f7e583daa02 /editeng
parente1050cc8589df4dd685d0fae2079dd306d1f09ff (diff)
parentee429287783ba7f9fe100cb3b32e64076d39c0c9 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: avmedia/source/framework/mediacontrol.cxx connectivity/source/commontools/DateConversion.cxx desktop/source/deployment/registry/component/dp_component.cxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/txtrange.hxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/misc/txtrange.cxx editeng/source/outliner/outlin2.cxx editeng/source/outliner/outlvw.cxx framework/source/layoutmanager/layoutmanager.cxx linguistic/source/lngsvcmgr.hxx sfx2/source/appl/app.cxx sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appdde.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/workwin.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macro.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/statcach.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styledlg.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplcitem.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/new.cxx sfx2/source/doc/objcont.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/objxtor.cxx sfx2/source/inc/appdata.hxx sfx2/source/inc/helpid.hrc sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/statcach.hxx sfx2/source/inc/templdgi.hxx sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnumgr.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/statbar/stbitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/frame2.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/sfxbasecontroller.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewfrm2.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx svx/inc/svx/svditer.hxx svx/source/dialog/sdstring.src svx/source/form/fmpage.cxx svx/source/form/formcontroller.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svditer.cxx svx/source/svdraw/svdview.cxx xmloff/source/forms/elementimport.cxx
Diffstat (limited to 'editeng')
-rwxr-xr-x[-rw-r--r--]editeng/AllLangResTarget_editeng.mk (renamed from editeng/source/outliner/makefile.mk)48
-rwxr-xr-xediteng/Library_editeng.mk167
-rwxr-xr-x[-rw-r--r--]editeng/Makefile (renamed from editeng/inc/makefile.mk)28
-rwxr-xr-x[-rw-r--r--]editeng/Module_editeng.mk (renamed from editeng/source/xml/makefile.mk)31
-rwxr-xr-xediteng/Package_inc.mk155
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng.hrc0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleComponentBase.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleContextBase.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleEditableTextPara.hxx6
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleImageBullet.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleParaManager.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleSelectionBase.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleStaticTextBase.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/AccessibleStringWrap.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/SpellPortions.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/UnoForbiddenCharsTable.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/acorrcfg.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/adjitem.hxx36
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/akrnitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/blnkitem.hxx6
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/bolnitem.hxx10
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/borderline.hxx26
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/boxitem.hxx104
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/brkitem.hxx26
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/brshitem.hxx28
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/bulitem.hxx54
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/charhiddenitem.hxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/charreliefitem.hxx16
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/charrotateitem.hxx12
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/charscaleitem.hxx12
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/cmapitem.hxx18
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/cntritem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/colritem.hxx16
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/crsditem.hxx22
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/cscoitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editdata.hxx64
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editeng.hxx268
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editengdllapi.h0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editerr.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editids.hrc0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editobj.hxx64
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editrids.hrc39
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editstat.hxx28
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editund2.hxx14
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editview.hxx80
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/edtdlg.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/eedata.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/eeitem.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/eeitemid.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/eerdll.hxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/emphitem.hxx16
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/escpitem.hxx30
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/fhgtitem.hxx38
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/flditem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/flstitem.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/fontitem.hxx16
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/forbiddencharacterstable.hxx10
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/forbiddenruleitem.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/frmdir.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/frmdiritem.hxx16
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/fwdtitem.hxx34
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/hangulhanja.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/hngpnctitem.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/hyznitem.hxx42
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/itemtype.hxx6
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/justifyitem.hxx42
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/keepitem.hxx10
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/kernitem.hxx14
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/langitem.hxx14
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/lcolitem.hxx6
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/lrspitem.hxx66
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/lspcitem.hxx30
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/measfld.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/memberids.hrc0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/mutxhelp.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/nhypitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/nlbkitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/numdef.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/numitem.hxx113
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/opaqitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/optitems.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/orphitem.hxx6
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/outliner.hxx444
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/outlobj.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/paperinf.hxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/paragraphdata.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/paravertalignitem.hxx12
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/pbinitem.hxx12
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/pgrditem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/pmdlitem.hxx22
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/postitem.hxx20
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/prntitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/protitem.hxx36
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/prszitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/scriptspaceitem.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/scripttypeitem.hxx32
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/shaditem.hxx40
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/shdditem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/sizeitem.hxx16
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/spltitem.hxx10
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/splwrap.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/svxacorr.hxx100
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/svxenum.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/svxfont.hxx38
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/svxrtf.hxx101
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/swafopt.hxx68
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/tstpitem.hxx38
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/twolinesitem.hxx14
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/txtrange.hxx72
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/udlnitem.hxx36
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/ulspitem.hxx62
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoedhlp.hxx24
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoedprx.hxx68
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoedsrc.hxx60
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unofdesc.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unofield.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unofored.hxx56
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoforou.hxx62
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoipset.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unolingu.hxx14
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unonrule.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unopracc.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoprnms.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unotext.hxx38
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoviwed.hxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/unoviwou.hxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/wghtitem.hxx20
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/widwitem.hxx6
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/writingmodeitem.hxx14
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/wrlmitem.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/xmlcnitm.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/inc/editxml.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/helpid.hrc71
-rwxr-xr-x[-rw-r--r--]editeng/inc/pch/precompiled_editeng.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/pch/precompiled_editeng.hxx5
-rwxr-xr-x[-rw-r--r--]editeng/prj/build.lst14
-rwxr-xr-x[-rw-r--r--]editeng/prj/d.lst14
-rwxr-xr-x[-rw-r--r--]editeng/prj/makefile.mk (renamed from editeng/util/makefile.pmk)23
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleComponentBase.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleContextBase.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleEditableTextPara.cxx100
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleHyperlink.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleHyperlink.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleImageBullet.cxx8
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleParaManager.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleSelectionBase.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleStaticTextBase.cxx14
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/AccessibleStringWrap.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/accessibility/accessibility.src0
-rw-r--r--editeng/source/accessibility/makefile.mk55
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editattr.cxx87
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editattr.hxx136
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editdbg.cxx104
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editdbg.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editdoc.cxx450
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editdoc.hxx391
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editdoc2.cxx122
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editeng.cxx132
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editeng.src0
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editobj.cxx386
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editobj2.hxx129
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editsel.cxx10
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editsel.hxx4
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editstt2.hxx60
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editundo.cxx98
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editundo.hxx52
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editview.cxx48
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/edtspell.cxx8
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/edtspell.hxx92
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eehtml.cxx100
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eehtml.hxx32
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eeng_pch.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eeng_pch.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eeobj.cxx6
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eeobj.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eerdll.cxx26
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eerdll2.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eertfpar.cxx62
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/eertfpar.hxx22
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit.cxx140
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit.hxx166
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit2.cxx800
-rw-r--r--editeng/source/editeng/impedit3.cxx209
-rw-r--r--editeng/source/editeng/impedit4.cxx176
-rw-r--r--editeng/source/editeng/impedit5.cxx174
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/textconv.cxx20
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/textconv.hxx12
-rw-r--r--editeng/source/items/bulitem.cxx60
-rw-r--r--editeng/source/items/charhiddenitem.cxx4
-rw-r--r--editeng/source/items/flditem.cxx163
-rw-r--r--editeng/source/items/frmitems.cxx104
-rwxr-xr-x[-rw-r--r--]editeng/source/items/itemtype.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/items/justifyitem.cxx70
-rw-r--r--editeng/source/items/numitem.cxx155
-rwxr-xr-x[-rw-r--r--]editeng/source/items/optitems.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/items/page.src148
-rwxr-xr-x[-rw-r--r--]editeng/source/items/paperinf.cxx50
-rw-r--r--editeng/source/items/paraitem.cxx64
-rwxr-xr-x[-rw-r--r--]editeng/source/items/svdfield.cxx4
-rw-r--r--editeng/source/items/svxfont.cxx68
-rwxr-xr-x[-rw-r--r--]editeng/source/items/svxitems.src0
-rw-r--r--editeng/source/items/textitem.cxx518
-rw-r--r--editeng/source/items/writingmodeitem.cxx12
-rw-r--r--editeng/source/items/xmlcnitm.cxx42
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/SvXMLAutoCorrectExport.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/SvXMLAutoCorrectExport.hxx0
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.cxx4
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/SvXMLAutoCorrectImport.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/acorrcfg.cxx30
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/edtdlg.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/forbiddencharacterstable.cxx14
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/hangulhanja.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/lingu.src0
-rw-r--r--editeng/source/misc/makefile.mk63
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/splwrap.cxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx484
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/swafopt.cxx10
-rw-r--r--editeng/source/misc/txtrange.cxx121
-rw-r--r--editeng/source/misc/unolingu.cxx90
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outl_pch.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outl_pch.hxx0
-rw-r--r--editeng/source/outliner/outleeng.cxx42
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outleeng.hxx34
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outlin2.cxx156
-rw-r--r--editeng/source/outliner/outliner.cxx466
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outliner.src0
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outlobj.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outlundo.cxx34
-rw-r--r--editeng/source/outliner/outlundo.hxx18
-rw-r--r--editeng/source/outliner/outlvw.cxx362
-rw-r--r--editeng/source/outliner/paralist.cxx66
-rw-r--r--editeng/source/outliner/paralist.hxx24
-rw-r--r--editeng/source/rtf/makefile.mk47
-rw-r--r--editeng/source/rtf/rtfgrf.cxx42
-rw-r--r--editeng/source/rtf/rtfitem.cxx293
-rwxr-xr-x[-rw-r--r--]editeng/source/rtf/segincr.asm0
-rw-r--r--editeng/source/rtf/svxrtf.cxx308
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/UnoForbiddenCharsTable.cxx6
-rw-r--r--editeng/source/uno/makefile.mk61
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unoedhlp.cxx24
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unoedprx.cxx150
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unoedsrc.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unofdesc.cxx28
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unofield.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unofored.cxx94
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unoforou.cxx76
-rw-r--r--editeng/source/uno/unoipset.cxx12
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unonrule.cxx8
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unopracc.cxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unotext.cxx74
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unotext2.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unoviwed.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unoviwou.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/xml/editsource.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/source/xml/xmltxtexp.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/xml/xmltxtimp.cxx14
-rwxr-xr-x[-rw-r--r--]editeng/util/editeng.dxp1
-rwxr-xr-x[-rw-r--r--]editeng/util/hidother.src0
258 files changed, 6304 insertions, 6550 deletions
diff --git a/editeng/source/outliner/makefile.mk b/editeng/AllLangResTarget_editeng.mk
index df1c795801..bcc2c63220 100644..100755
--- a/editeng/source/outliner/makefile.mk
+++ b/editeng/AllLangResTarget_editeng.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,36 +25,26 @@
#
#*************************************************************************
-PRJ=..$/..
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,editeng))
-PRJNAME=editeng
-TARGET=outliner
-AUTOSEG=true
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_AllLangResTarget_set_reslocation,editeng,svx))
-PROJECTPCH4DLL=TRUE
-PROJECTPCH=outl_pch
-PROJECTPCHSOURCE=outl_pch
+$(eval $(call gb_AllLangResTarget_add_srs,editeng, editeng/res))
+$(eval $(call gb_SrsTarget_SrsTarget,editeng/res))
+$(eval $(call gb_SrsTarget_set_include,editeng/res,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/editeng/inc) \
+))
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Allgemein ----------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/outlundo.obj \
- $(SLO)$/outliner.obj \
- $(SLO)$/outlin2.obj \
- $(SLO)$/paralist.obj \
- $(SLO)$/outlvw.obj \
- $(SLO)$/outleeng.obj \
- $(SLO)$/outlobj.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES= outliner.src
-
-.INCLUDE : target.mk
+# add src files here (complete path relative to repository root)
+$(eval $(call gb_SrsTarget_add_files,editeng/res,\
+ editeng/source/accessibility/accessibility.src \
+ editeng/source/editeng/editeng.src \
+ editeng/source/items/page.src \
+ editeng/source/items/svxitems.src \
+ editeng/source/misc/lingu.src \
+ editeng/source/outliner/outliner.src \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
new file mode 100755
index 0000000000..408d8deb8d
--- /dev/null
+++ b/editeng/Library_editeng.mk
@@ -0,0 +1,167 @@
+#*************************************************************************
+#
+# 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,editeng))
+
+$(eval $(call gb_Library_add_package_headers,editeng,editeng_inc))
+
+$(eval $(call gb_Library_add_precompiled_header,editeng,$(SRCDIR)/editeng/inc/pch/precompiled_editeng))
+
+$(eval $(call gb_Library_set_include,editeng,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/editeng/inc/pch) \
+ -I$(realpath $(SRCDIR)/editeng/inc) \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,editeng,\
+ $$(DEFS) \
+ -DEDITENG_DLLIMPLEMENTATION \
+))
+
+ifneq ($(strip $(EDITDEBUG)),)
+$(eval $(call gb_Library_set_defs,editeng,\
+ $$(DEFS) \
+ -DEDITDEBUG \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,editeng,\
+ editeng/inc/pch/precompiled_editeng \
+ editeng/source/accessibility/AccessibleComponentBase \
+ editeng/source/accessibility/AccessibleContextBase \
+ editeng/source/accessibility/AccessibleEditableTextPara \
+ editeng/source/accessibility/AccessibleHyperlink \
+ editeng/source/accessibility/AccessibleImageBullet \
+ editeng/source/accessibility/AccessibleParaManager \
+ editeng/source/accessibility/AccessibleSelectionBase \
+ editeng/source/accessibility/AccessibleStaticTextBase \
+ editeng/source/accessibility/AccessibleStringWrap \
+ editeng/source/editeng/editattr \
+ editeng/source/editeng/editdbg \
+ editeng/source/editeng/editdoc \
+ editeng/source/editeng/editdoc2 \
+ editeng/source/editeng/editeng \
+ editeng/source/editeng/editobj \
+ editeng/source/editeng/editsel \
+ editeng/source/editeng/editundo \
+ editeng/source/editeng/editview \
+ editeng/source/editeng/edtspell \
+ editeng/source/editeng/eehtml \
+ editeng/source/editeng/eeng_pch \
+ editeng/source/editeng/eeobj \
+ editeng/source/editeng/eerdll \
+ editeng/source/editeng/eertfpar \
+ editeng/source/editeng/impedit \
+ editeng/source/editeng/impedit2 \
+ editeng/source/editeng/impedit3 \
+ editeng/source/editeng/impedit4 \
+ editeng/source/editeng/impedit5 \
+ editeng/source/editeng/textconv \
+ editeng/source/items/bulitem \
+ editeng/source/items/charhiddenitem \
+ editeng/source/items/flditem \
+ editeng/source/items/frmitems \
+ editeng/source/items/itemtype \
+ editeng/source/items/justifyitem \
+ editeng/source/items/numitem \
+ editeng/source/items/optitems \
+ editeng/source/items/paperinf \
+ editeng/source/items/paraitem \
+ editeng/source/items/svdfield \
+ editeng/source/items/svxfont \
+ editeng/source/items/textitem \
+ editeng/source/items/writingmodeitem \
+ editeng/source/items/xmlcnitm \
+ editeng/source/misc/acorrcfg \
+ editeng/source/misc/edtdlg \
+ editeng/source/misc/forbiddencharacterstable \
+ editeng/source/misc/hangulhanja \
+ editeng/source/misc/splwrap \
+ editeng/source/misc/svxacorr \
+ editeng/source/misc/SvXMLAutoCorrectExport \
+ editeng/source/misc/SvXMLAutoCorrectImport \
+ editeng/source/misc/swafopt \
+ editeng/source/misc/txtrange \
+ editeng/source/misc/unolingu \
+ editeng/source/outliner/outleeng \
+ editeng/source/outliner/outlin2 \
+ editeng/source/outliner/outliner \
+ editeng/source/outliner/outlobj \
+ editeng/source/outliner/outlundo \
+ editeng/source/outliner/outlvw \
+ editeng/source/outliner/outl_pch \
+ editeng/source/outliner/paralist \
+ editeng/source/rtf/rtfgrf \
+ editeng/source/rtf/rtfitem \
+ editeng/source/rtf/svxrtf \
+ editeng/source/uno/unoedhlp \
+ editeng/source/uno/unoedprx \
+ editeng/source/uno/unoedsrc \
+ editeng/source/uno/unofdesc \
+ editeng/source/uno/unofield \
+ editeng/source/uno/UnoForbiddenCharsTable \
+ editeng/source/uno/unofored \
+ editeng/source/uno/unoforou \
+ editeng/source/uno/unoipset \
+ editeng/source/uno/unonrule \
+ editeng/source/uno/unopracc \
+ editeng/source/uno/unotext \
+ editeng/source/uno/unotext2 \
+ editeng/source/uno/unoviwed \
+ editeng/source/uno/unoviwou \
+ editeng/source/xml/xmltxtexp \
+ editeng/source/xml/xmltxtimp \
+))
+
+# add libraries to be linked to editeng; again these names need to be given as
+# specified in Repository.mk
+$(eval $(call gb_Library_add_linked_libs,editeng,\
+ xo \
+ basegfx \
+ lng \
+ svt \
+ tk \
+ vcl \
+ svl \
+ sot \
+ utl \
+ tl \
+ comphelper \
+ ucbhelper \
+ cppuhelper \
+ cppu \
+ sal \
+ salhelper \
+ icuuc \
+ i18nisolang1 \
+ i18npaper \
+ $(gb_STDLIBS) \
+))
+
+# vim: set noet sw=4 ts=4:
+
diff --git a/editeng/inc/makefile.mk b/editeng/Makefile
index c445026b8d..a79aff8310 100644..100755
--- a/editeng/inc/makefile.mk
+++ b/editeng/Makefile
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,24 +25,14 @@
#
#*************************************************************************
-PRJ=..
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
-PRJNAME=editeng
-TARGET=inc
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+# vim: set noet sw=4 ts=4:
diff --git a/editeng/source/xml/makefile.mk b/editeng/Module_editeng.mk
index a1c530cb00..4a5dbcf306 100644..100755
--- a/editeng/source/xml/makefile.mk
+++ b/editeng/Module_editeng.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,22 +25,21 @@
#
#*************************************************************************
-PRJ=..$/..
-PRJNAME=editeng
-TARGET=xml
+$(eval $(call gb_Module_Module,editeng))
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_Module_add_targets,editeng,\
+ AllLangResTarget_editeng \
+ Library_editeng \
+ Package_inc \
+))
-# --- Settings -----------------------------------------------------
+# add any runtime tests (unit tests) here
+# remove if no tests
+$(eval $(call gb_Module_add_check_targets,editeng,\
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+# add any subsequent checks (e.g. complex tests) here
+$(eval $(call gb_Module_add_subsequentcheck_targets,editeng,\
+))
-# --- Files --------------------------------------------------------
-SLOFILES = \
- $(SLO)$/xmltxtimp.obj \
- $(SLO)$/xmltxtexp.obj
-
-# --- Targets --------------------------------------------------------------
-
-.INCLUDE : target.mk
+# vim: set noet sw=4 ts=4:
diff --git a/editeng/Package_inc.mk b/editeng/Package_inc.mk
new file mode 100755
index 0000000000..52fa0e854a
--- /dev/null
+++ b/editeng/Package_inc.mk
@@ -0,0 +1,155 @@
+#*************************************************************************
+#
+# 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,editeng_inc,$(SRCDIR)/editeng/inc))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleComponentBase.hxx,editeng/AccessibleComponentBase.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleContextBase.hxx,editeng/AccessibleContextBase.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleEditableTextPara.hxx,editeng/AccessibleEditableTextPara.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleImageBullet.hxx,editeng/AccessibleImageBullet.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleParaManager.hxx,editeng/AccessibleParaManager.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleSelectionBase.hxx,editeng/AccessibleSelectionBase.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleStaticTextBase.hxx,editeng/AccessibleStaticTextBase.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleStringWrap.hxx,editeng/AccessibleStringWrap.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/acorrcfg.hxx,editeng/acorrcfg.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/adjitem.hxx,editeng/adjitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/akrnitem.hxx,editeng/akrnitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/blnkitem.hxx,editeng/blnkitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/bolnitem.hxx,editeng/bolnitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/borderline.hxx,editeng/borderline.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/boxitem.hxx,editeng/boxitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/brkitem.hxx,editeng/brkitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/brshitem.hxx,editeng/brshitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/bulitem.hxx,editeng/bulitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charhiddenitem.hxx,editeng/charhiddenitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charreliefitem.hxx,editeng/charreliefitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charrotateitem.hxx,editeng/charrotateitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charscaleitem.hxx,editeng/charscaleitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/cmapitem.hxx,editeng/cmapitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/cntritem.hxx,editeng/cntritem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/colritem.hxx,editeng/colritem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/crsditem.hxx,editeng/crsditem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/cscoitem.hxx,editeng/cscoitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editdata.hxx,editeng/editdata.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editeng.hxx,editeng/editeng.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editengdllapi.h,editeng/editengdllapi.h))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editerr.hxx,editeng/editerr.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editids.hrc,editeng/editids.hrc))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editobj.hxx,editeng/editobj.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editrids.hrc,editeng/editrids.hrc))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editstat.hxx,editeng/editstat.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editund2.hxx,editeng/editund2.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editview.hxx,editeng/editview.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/edtdlg.hxx,editeng/edtdlg.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eedata.hxx,editeng/eedata.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eeitem.hxx,editeng/eeitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eeitemid.hxx,editeng/eeitemid.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eerdll.hxx,editeng/eerdll.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/emphitem.hxx,editeng/emphitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/escpitem.hxx,editeng/escpitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/fhgtitem.hxx,editeng/fhgtitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/flditem.hxx,editeng/flditem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/flstitem.hxx,editeng/flstitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/fontitem.hxx,editeng/fontitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/forbiddencharacterstable.hxx,editeng/forbiddencharacterstable.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/forbiddenruleitem.hxx,editeng/forbiddenruleitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/frmdir.hxx,editeng/frmdir.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/frmdiritem.hxx,editeng/frmdiritem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/fwdtitem.hxx,editeng/fwdtitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/hangulhanja.hxx,editeng/hangulhanja.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/hngpnctitem.hxx,editeng/hngpnctitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/hyznitem.hxx,editeng/hyznitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/itemtype.hxx,editeng/itemtype.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/justifyitem.hxx,editeng/justifyitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/keepitem.hxx,editeng/keepitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/kernitem.hxx,editeng/kernitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/langitem.hxx,editeng/langitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/lcolitem.hxx,editeng/lcolitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/lrspitem.hxx,editeng/lrspitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/lspcitem.hxx,editeng/lspcitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/measfld.hxx,editeng/measfld.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/memberids.hrc,editeng/memberids.hrc))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/mutxhelp.hxx,editeng/mutxhelp.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/nhypitem.hxx,editeng/nhypitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/nlbkitem.hxx,editeng/nlbkitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/numdef.hxx,editeng/numdef.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/numitem.hxx,editeng/numitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/opaqitem.hxx,editeng/opaqitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/optitems.hxx,editeng/optitems.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/orphitem.hxx,editeng/orphitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/outliner.hxx,editeng/outliner.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/outlobj.hxx,editeng/outlobj.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/paperinf.hxx,editeng/paperinf.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/paragraphdata.hxx,editeng/paragraphdata.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/paravertalignitem.hxx,editeng/paravertalignitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/pbinitem.hxx,editeng/pbinitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/pgrditem.hxx,editeng/pgrditem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/pmdlitem.hxx,editeng/pmdlitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/postitem.hxx,editeng/postitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/prntitem.hxx,editeng/prntitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/protitem.hxx,editeng/protitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/prszitem.hxx,editeng/prszitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/scriptspaceitem.hxx,editeng/scriptspaceitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/scripttypeitem.hxx,editeng/scripttypeitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/shaditem.hxx,editeng/shaditem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/shdditem.hxx,editeng/shdditem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/sizeitem.hxx,editeng/sizeitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/SpellPortions.hxx,editeng/SpellPortions.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/spltitem.hxx,editeng/spltitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/splwrap.hxx,editeng/splwrap.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxacorr.hxx,editeng/svxacorr.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxenum.hxx,editeng/svxenum.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxfont.hxx,editeng/svxfont.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxrtf.hxx,editeng/svxrtf.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/swafopt.hxx,editeng/swafopt.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/tstpitem.hxx,editeng/tstpitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/twolinesitem.hxx,editeng/twolinesitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/txtrange.hxx,editeng/txtrange.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/udlnitem.hxx,editeng/udlnitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/ulspitem.hxx,editeng/ulspitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoedhlp.hxx,editeng/unoedhlp.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoedprx.hxx,editeng/unoedprx.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoedsrc.hxx,editeng/unoedsrc.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unofdesc.hxx,editeng/unofdesc.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unofield.hxx,editeng/unofield.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/UnoForbiddenCharsTable.hxx,editeng/UnoForbiddenCharsTable.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unofored.hxx,editeng/unofored.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoforou.hxx,editeng/unoforou.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoipset.hxx,editeng/unoipset.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unolingu.hxx,editeng/unolingu.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unonrule.hxx,editeng/unonrule.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unopracc.hxx,editeng/unopracc.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoprnms.hxx,editeng/unoprnms.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unotext.hxx,editeng/unotext.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoviwed.hxx,editeng/unoviwed.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoviwou.hxx,editeng/unoviwou.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/wghtitem.hxx,editeng/wghtitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/widwitem.hxx,editeng/widwitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/writingmodeitem.hxx,editeng/writingmodeitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/wrlmitem.hxx,editeng/wrlmitem.hxx))
+$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/xmlcnitm.hxx,editeng/xmlcnitm.hxx))
+
+# vim: set noet sw=4 ts=4:
diff --git a/editeng/inc/editeng.hrc b/editeng/inc/editeng.hrc
index 66fcf0cb92..66fcf0cb92 100644..100755
--- a/editeng/inc/editeng.hrc
+++ b/editeng/inc/editeng.hrc
diff --git a/editeng/inc/editeng/AccessibleComponentBase.hxx b/editeng/inc/editeng/AccessibleComponentBase.hxx
index d2b41b9f63..d2b41b9f63 100644..100755
--- a/editeng/inc/editeng/AccessibleComponentBase.hxx
+++ b/editeng/inc/editeng/AccessibleComponentBase.hxx
diff --git a/editeng/inc/editeng/AccessibleContextBase.hxx b/editeng/inc/editeng/AccessibleContextBase.hxx
index a9e3c321d4..4c0552d91b 100644..100755
--- a/editeng/inc/editeng/AccessibleContextBase.hxx
+++ b/editeng/inc/editeng/AccessibleContextBase.hxx
@@ -345,8 +345,8 @@ protected:
/** Check whether or not the object has been disposed (or is in the
state of beeing disposed).
- @return sal_True, if the object is disposed or in the course
- of being disposed. Otherwise, sal_False is returned.
+ @return TRUE, if the object is disposed or in the course
+ of being disposed. Otherwise, FALSE is returned.
*/
sal_Bool IsDisposed (void);
diff --git a/editeng/inc/editeng/AccessibleEditableTextPara.hxx b/editeng/inc/editeng/AccessibleEditableTextPara.hxx
index 365290ac80..385633dfa3 100644..100755
--- a/editeng/inc/editeng/AccessibleEditableTextPara.hxx
+++ b/editeng/inc/editeng/AccessibleEditableTextPara.hxx
@@ -320,7 +320,7 @@ namespace accessibility
@return sal_False, if the method was not able to determine the range
*/
- sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex );
+ sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex );
// syntactic sugar for FireEvent
void GotPropertyEvent( const ::com::sun::star::uno::Any& rNewValue, const sal_Int16 nEventId ) const;
@@ -353,13 +353,13 @@ namespace accessibility
// Get text from forwarder
String GetText( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException));
String GetTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException));
- USHORT GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+ sal_uInt16 GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException));
/** Get the current selection of this paragraph
@return sal_False, if nothing in this paragraph is selected
*/
- sal_Bool GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+ sal_Bool GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException));
/** create selection from Accessible selection.
diff --git a/editeng/inc/editeng/AccessibleImageBullet.hxx b/editeng/inc/editeng/AccessibleImageBullet.hxx
index 444917fede..444917fede 100644..100755
--- a/editeng/inc/editeng/AccessibleImageBullet.hxx
+++ b/editeng/inc/editeng/AccessibleImageBullet.hxx
diff --git a/editeng/inc/editeng/AccessibleParaManager.hxx b/editeng/inc/editeng/AccessibleParaManager.hxx
index e3c538ba6a..e3c538ba6a 100644..100755
--- a/editeng/inc/editeng/AccessibleParaManager.hxx
+++ b/editeng/inc/editeng/AccessibleParaManager.hxx
diff --git a/editeng/inc/editeng/AccessibleSelectionBase.hxx b/editeng/inc/editeng/AccessibleSelectionBase.hxx
index fd39bd960a..fd39bd960a 100644..100755
--- a/editeng/inc/editeng/AccessibleSelectionBase.hxx
+++ b/editeng/inc/editeng/AccessibleSelectionBase.hxx
diff --git a/editeng/inc/editeng/AccessibleStaticTextBase.hxx b/editeng/inc/editeng/AccessibleStaticTextBase.hxx
index 4edc38ced9..4edc38ced9 100644..100755
--- a/editeng/inc/editeng/AccessibleStaticTextBase.hxx
+++ b/editeng/inc/editeng/AccessibleStaticTextBase.hxx
diff --git a/editeng/inc/editeng/AccessibleStringWrap.hxx b/editeng/inc/editeng/AccessibleStringWrap.hxx
index b833e091ba..b833e091ba 100644..100755
--- a/editeng/inc/editeng/AccessibleStringWrap.hxx
+++ b/editeng/inc/editeng/AccessibleStringWrap.hxx
diff --git a/editeng/inc/editeng/SpellPortions.hxx b/editeng/inc/editeng/SpellPortions.hxx
index e13aed8a26..e13aed8a26 100644..100755
--- a/editeng/inc/editeng/SpellPortions.hxx
+++ b/editeng/inc/editeng/SpellPortions.hxx
diff --git a/editeng/inc/editeng/UnoForbiddenCharsTable.hxx b/editeng/inc/editeng/UnoForbiddenCharsTable.hxx
index f34e2d260e..f34e2d260e 100644..100755
--- a/editeng/inc/editeng/UnoForbiddenCharsTable.hxx
+++ b/editeng/inc/editeng/UnoForbiddenCharsTable.hxx
diff --git a/editeng/inc/editeng/acorrcfg.hxx b/editeng/inc/editeng/acorrcfg.hxx
index f9d62672d8..f9d62672d8 100644..100755
--- a/editeng/inc/editeng/acorrcfg.hxx
+++ b/editeng/inc/editeng/acorrcfg.hxx
diff --git a/editeng/inc/editeng/adjitem.hxx b/editeng/inc/editeng/adjitem.hxx
index b2d9394ad5..ad4bf30393 100644..100755
--- a/editeng/inc/editeng/adjitem.hxx
+++ b/editeng/inc/editeng/adjitem.hxx
@@ -47,45 +47,45 @@ namespace rtl
[Description]
This item describes the row orientation.
*/
-#define ADJUST_LASTBLOCK_VERSION ((USHORT)0x0001)
+#define ADJUST_LASTBLOCK_VERSION ((sal_uInt16)0x0001)
class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface
{
- BOOL bLeft : 1;
- BOOL bRight : 1;
- BOOL bCenter : 1;
- BOOL bBlock : 1;
+ sal_Bool bLeft : 1;
+ sal_Bool bRight : 1;
+ sal_Bool bCenter : 1;
+ sal_Bool bBlock : 1;
// only activ when bBlock
- BOOL bOneBlock : 1;
- BOOL bLastCenter : 1;
- BOOL bLastBlock : 1;
+ sal_Bool bOneBlock : 1;
+ sal_Bool bLastCenter : 1;
+ sal_Bool bLastBlock : 1;
friend SvStream& operator<<( SvStream&, SvxAdjustItem& ); //$ ostream
public:
TYPEINFO();
SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
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,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
- virtual USHORT GetValueCount() const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetEnumValue() const;
- virtual void SetEnumValue( USHORT nNewVal );
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetEnumValue() const;
+ virtual void SetEnumValue( sal_uInt16 nNewVal );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
inline void SetOneWord( const SvxAdjust eType )
{
diff --git a/editeng/inc/editeng/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx
index 6b3972e5bf..47860ddd1a 100644..100755
--- a/editeng/inc/editeng/akrnitem.hxx
+++ b/editeng/inc/editeng/akrnitem.hxx
@@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem
public:
TYPEINFO();
- SvxAutoKernItem( const BOOL bAutoKern /*= FALSE*/,
- const USHORT nId );
+ SvxAutoKernItem( const sal_Bool bAutoKern /*= sal_False*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx
index 6b96d2de44..2384a48892 100644..100755
--- a/editeng/inc/editeng/blnkitem.hxx
+++ b/editeng/inc/editeng/blnkitem.hxx
@@ -52,12 +52,12 @@ class EDITENG_DLLPUBLIC SvxBlinkItem : public SfxBoolItem
public:
TYPEINFO();
- SvxBlinkItem( const BOOL bBlink /*= FALSE*/, const USHORT nId );
+ SvxBlinkItem( const sal_Bool bBlink /*= sal_False*/, const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
diff --git a/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx
index c523705d9b..8222c5dbdc 100644..100755
--- a/editeng/inc/editeng/bolnitem.hxx
+++ b/editeng/inc/editeng/bolnitem.hxx
@@ -52,13 +52,13 @@ class EDITENG_DLLPUBLIC SvxLineItem : public SfxPoolItem
public:
TYPEINFO();
- SvxLineItem( const USHORT nId );
+ SvxLineItem( const sal_uInt16 nId );
SvxLineItem( const SvxLineItem& rCpy );
~SvxLineItem();
SvxLineItem &operator=( const SvxLineItem& rLine );
- 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 int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -66,8 +66,8 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
virtual bool ScaleMetrics( long nMult, long nDiv );
virtual bool HasMetrics() const;
diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx
index ecaf3ce93f..9acb60e24a 100644..100755
--- a/editeng/inc/editeng/borderline.hxx
+++ b/editeng/inc/editeng/borderline.hxx
@@ -102,37 +102,37 @@ class EDITENG_DLLPUBLIC SvxBorderLine
{
protected:
Color aColor;
- USHORT nOutWidth;
- USHORT nInWidth;
- USHORT nDistance;
SvxBorderStyle m_nStyle;
+ sal_uInt16 nOutWidth;
+ sal_uInt16 nInWidth;
+ sal_uInt16 nDistance;
public:
- SvxBorderLine( const Color *pCol = 0, USHORT nOut = 0, USHORT nIn = 0, USHORT nDist = 0,
- SvxBorderStyle nStyle = SOLID );
+ SvxBorderLine( const Color *pCol = 0, sal_uInt16 nOut = 0, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0,
+ SvxBorderStyle nStyle = SOLID );
SvxBorderLine( const SvxBorderLine& r );
SvxBorderLine& operator=( const SvxBorderLine& r );
const Color& GetColor() const { return aColor; }
- USHORT GetOutWidth() const { return nOutWidth; }
- USHORT GetInWidth() const { return nInWidth; }
- USHORT GetDistance() const { return nDistance; }
+ sal_uInt16 GetOutWidth() const { return nOutWidth; }
+ sal_uInt16 GetInWidth() const { return nInWidth; }
+ sal_uInt16 GetDistance() const { return nDistance; }
SvxBorderStyle GetStyle() const { return m_nStyle; }
void SetColor( const Color &rColor ) { aColor = rColor; }
- void SetOutWidth( USHORT nNew ) { nOutWidth = nNew; }
- void SetInWidth( USHORT nNew ) { nInWidth = nNew; }
- void SetDistance( USHORT nNew ) { nDistance = nNew; }
void SetStyle( SvxBorderStyle nNew ) { m_nStyle = nNew; }
+ void SetOutWidth( sal_uInt16 nNew ) { nOutWidth = nNew; }
+ void SetInWidth( sal_uInt16 nNew ) { nInWidth = nNew; }
+ void SetDistance( sal_uInt16 nNew ) { nDistance = nNew; }
void ScaleMetrics( long nMult, long nDiv );
- BOOL operator==( const SvxBorderLine &rCmp ) const;
+ sal_Bool operator==( const SvxBorderLine &rCmp ) const;
String GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit,
const IntlWrapper* pIntl,
- BOOL bMetricStr = FALSE ) const;
+ sal_Bool bMetricStr = sal_False ) const;
bool HasPriority( const SvxBorderLine& rOtherLine ) const;
diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx
index 68f34db2b4..8f17d14ee5 100644..100755
--- a/editeng/inc/editeng/boxitem.hxx
+++ b/editeng/inc/editeng/boxitem.hxx
@@ -43,12 +43,12 @@ namespace rtl { class OUString; }
(all four edges and the inward distance)
*/
-#define BOX_LINE_TOP ((USHORT)0)
-#define BOX_LINE_BOTTOM ((USHORT)1)
-#define BOX_LINE_LEFT ((USHORT)2)
-#define BOX_LINE_RIGHT ((USHORT)3)
+#define BOX_LINE_TOP ((sal_uInt16)0)
+#define BOX_LINE_BOTTOM ((sal_uInt16)1)
+#define BOX_LINE_LEFT ((sal_uInt16)2)
+#define BOX_LINE_RIGHT ((sal_uInt16)3)
-#define BOX_4DISTS_VERSION ((USHORT)1)
+#define BOX_4DISTS_VERSION ((sal_uInt16)1)
class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem
{
@@ -56,7 +56,7 @@ class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem
*pBottom,
*pLeft,
*pRight;
- USHORT nTopDist,
+ sal_uInt16 nTopDist,
nBottomDist,
nLeftDist,
nRightDist;
@@ -64,15 +64,15 @@ class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem
public:
TYPEINFO();
- SvxBoxItem( const USHORT nId );
+ SvxBoxItem( const sal_uInt16 nId );
SvxBoxItem( const SvxBoxItem &rCpy );
~SvxBoxItem();
SvxBoxItem &operator=( const SvxBoxItem& rBox );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -80,9 +80,9 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual bool ScaleMetrics( long nMult, long nDiv );
virtual bool HasMetrics() const;
@@ -92,26 +92,26 @@ public:
const SvxBorderLine* GetLeft() const { return pLeft; }
const SvxBorderLine* GetRight() const { return pRight; }
- const SvxBorderLine* GetLine( USHORT nLine ) const;
+ const SvxBorderLine* GetLine( sal_uInt16 nLine ) const;
//The Pointers are being copied!
- void SetLine( const SvxBorderLine* pNew, USHORT nLine );
+ void SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine );
- USHORT GetDistance( USHORT nLine ) const;
- USHORT GetDistance() const;
+ sal_uInt16 GetDistance( sal_uInt16 nLine ) const;
+ sal_uInt16 GetDistance() const;
- void SetDistance( USHORT nNew, USHORT nLine );
- inline void SetDistance( USHORT nNew );
+ void SetDistance( sal_uInt16 nNew, sal_uInt16 nLine );
+ inline void SetDistance( sal_uInt16 nNew );
// Line width plus Space plus inward distance
//bIgnoreLine = TRUE -> Also return distance, when no Line is set
- USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const;
+ sal_uInt16 CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine = sal_False ) const;
static com::sun::star::table::BorderLine2 SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert );
static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
};
-inline void SvxBoxItem::SetDistance( USHORT nNew )
+inline void SvxBoxItem::SetDistance( sal_uInt16 nNew )
{
nTopDist = nBottomDist = nLeftDist = nRightDist = nNew;
}
@@ -126,8 +126,8 @@ inline void SvxBoxItem::SetDistance( USHORT nNew )
transported the borderline for the inner horizontal and vertical lines.
*/
-#define BOXINFO_LINE_HORI ((USHORT)0)
-#define BOXINFO_LINE_VERT ((USHORT)1)
+#define BOXINFO_LINE_HORI ((sal_uInt16)0)
+#define BOXINFO_LINE_VERT ((sal_uInt16)1)
#define VALID_TOP 0x01
#define VALID_BOTTOM 0x02
@@ -156,25 +156,25 @@ class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem
forth to the dialogue.
*/
- BOOL bDist :1; // TRUE, Unlock Distance.
- BOOL bMinDist :1; // TRUE, Going below minimum Distance is prohibited
+ sal_Bool bDist :1; // TRUE, Unlock Distance.
+ sal_Bool bMinDist :1; // TRUE, Going below minimum Distance is prohibited
- BYTE nValidFlags; // 0000 0000
- // ³³³³ ³³³ÀÄ VALID_TOP
- // ³³³³ ³³ÀÄÄ VALID_BOTTOM
- // ³³³³ ³ÀÄÄÄ VALID_LEFT
- // ³³³³ ÀÄÄÄÄ VALID_RIGHT
- // ³³³ÀÄÄÄÄÄÄ VALID_HORI
- // ³³ÀÄÄÄÄÄÄÄ VALID_VERT
- // ³ÀÄÄÄÄÄÄÄÄ VALID_DIST
- // ÀÄÄÄÄÄÄÄÄÄ VALID_DISABLE
+ sal_uInt8 nValidFlags; // 0000 0000
+ // ³³³³ ³³³ÀÄ VALID_TOP
+ // ³³³³ ³³ÀÄÄ VALID_BOTTOM
+ // ³³³³ ³ÀÄÄÄ VALID_LEFT
+ // ³³³³ ÀÄÄÄÄ VALID_RIGHT
+ // ³³³ÀÄÄÄÄÄÄ VALID_HORI
+ // ³³ÀÄÄÄÄÄÄÄ VALID_VERT
+ // ³ÀÄÄÄÄÄÄÄÄ VALID_DIST
+ // ÀÄÄÄÄÄÄÄÄÄ VALID_DISABLE
- USHORT nDefDist; // The default or minimum distance.
+ sal_uInt16 nDefDist; // The default or minimum distance.
public:
TYPEINFO();
- SvxBoxInfoItem( const USHORT nId );
+ SvxBoxInfoItem( const sal_uInt16 nId );
SvxBoxInfoItem( const SvxBoxInfoItem &rCpy );
~SvxBoxInfoItem();
SvxBoxInfoItem &operator=( const SvxBoxInfoItem &rCpy );
@@ -185,39 +185,39 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 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 SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
const SvxBorderLine* GetHori() const { return pHori; }
const SvxBorderLine* GetVert() const { return pVert; }
//The Pointers are being copied!
- void SetLine( const SvxBorderLine* pNew, USHORT nLine );
+ void SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine );
- BOOL IsTable() const { return mbEnableHor && mbEnableVer; }
- void SetTable( BOOL bNew ) { mbEnableHor = mbEnableVer = bNew; }
+ sal_Bool IsTable() const { return mbEnableHor && mbEnableVer; }
+ void SetTable( sal_Bool bNew ) { mbEnableHor = mbEnableVer = bNew; }
inline bool IsHorEnabled() const { return mbEnableHor; }
inline void EnableHor( bool bEnable ) { mbEnableHor = bEnable; }
inline bool IsVerEnabled() const { return mbEnableVer; }
inline void EnableVer( bool bEnable ) { mbEnableVer = bEnable; }
- BOOL IsDist() const { return bDist; }
- void SetDist( BOOL bNew ) { bDist = bNew; }
- BOOL IsMinDist() const { return bMinDist; }
- void SetMinDist( BOOL bNew ) { bMinDist = bNew; }
- USHORT GetDefDist() const { return nDefDist; }
- void SetDefDist( USHORT nNew ) { nDefDist = nNew; }
+ sal_Bool IsDist() const { return bDist; }
+ void SetDist( sal_Bool bNew ) { bDist = bNew; }
+ sal_Bool IsMinDist() const { return bMinDist; }
+ void SetMinDist( sal_Bool bNew ) { bMinDist = bNew; }
+ sal_uInt16 GetDefDist() const { return nDefDist; }
+ void SetDefDist( sal_uInt16 nNew ) { nDefDist = nNew; }
- BOOL IsValid( BYTE nValid ) const
+ sal_Bool IsValid( sal_uInt8 nValid ) const
{ return ( nValidFlags & nValid ) == nValid; }
- void SetValid( BYTE nValid, BOOL bValid = TRUE )
+ void SetValid( sal_uInt8 nValid, sal_Bool bValid = sal_True )
{ bValid ? ( nValidFlags |= nValid )
: ( nValidFlags &= ~nValid ); }
void ResetFlags();
diff --git a/editeng/inc/editeng/brkitem.hxx b/editeng/inc/editeng/brkitem.hxx
index 244bafc0b3..bb697fa305 100644..100755
--- a/editeng/inc/editeng/brkitem.hxx
+++ b/editeng/inc/editeng/brkitem.hxx
@@ -46,7 +46,7 @@ namespace rtl
This item Describes a wrap-attribute
Automatic?, Page or column break, before or after?
*/
-#define FMTBREAK_NOAUTO ((USHORT)0x0001)
+#define FMTBREAK_NOAUTO ((sal_uInt16)0x0001)
class EDITENG_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem
{
@@ -54,39 +54,39 @@ public:
TYPEINFO();
inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/,
- const USHORT nWhich );
+ const sal_uInt16 nWhich );
inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak );
inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy );
// "pure virtual Methods" from SfxPoolItem
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,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
- virtual USHORT GetValueCount() const;
+ virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const;
+ virtual sal_uInt16 GetValueCount() const;
// MS VC4.0 messes things up
- void SetValue( USHORT nNewVal )
+ void SetValue( sal_uInt16 nNewVal )
{SfxEnumItem::SetValue(nNewVal); }
SvxBreak GetBreak() const { return SvxBreak( GetValue() ); }
void SetBreak( const SvxBreak eNew )
- { SetValue( (USHORT)eNew ); }
+ { SetValue( (sal_uInt16)eNew ); }
};
inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak,
- const USHORT _nWhich ) :
- SfxEnumItem( _nWhich, (USHORT)eBreak )
+ const sal_uInt16 _nWhich ) :
+ SfxEnumItem( _nWhich, (sal_uInt16)eBreak )
{}
inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) :
diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx
index 025c39161e..3fe014ab3d 100644..100755
--- a/editeng/inc/editeng/brshitem.hxx
+++ b/editeng/inc/editeng/brshitem.hxx
@@ -45,7 +45,7 @@ namespace rtl
class OUString;
}
-#define BRUSH_GRAPHIC_VERSION ((USHORT)0x0001)
+#define BRUSH_GRAPHIC_VERSION ((sal_uInt16)0x0001)
enum SvxGraphicPosition
{
@@ -67,28 +67,28 @@ class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem
String* pStrLink;
String* pStrFilter;
SvxGraphicPosition eGraphicPos;
- BOOL bLoadAgain;
+ sal_Bool bLoadAgain;
void ApplyGraphicTransparency_Impl();
DECL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void *);
// wird nur von Create benutzt
SvxBrushItem( SvStream& rStrm,
- USHORT nVersion, USHORT nWhich );
+ sal_uInt16 nVersion, sal_uInt16 nWhich );
public:
TYPEINFO();
- SvxBrushItem( USHORT nWhich );
- SvxBrushItem( const Color& rColor, USHORT nWhich );
+ SvxBrushItem( sal_uInt16 nWhich );
+ SvxBrushItem( const Color& rColor, sal_uInt16 nWhich );
SvxBrushItem( const Graphic& rGraphic,
- SvxGraphicPosition ePos, USHORT nWhich );
+ SvxGraphicPosition ePos, sal_uInt16 nWhich );
SvxBrushItem( const GraphicObject& rGraphicObj,
- SvxGraphicPosition ePos, USHORT nWhich );
+ SvxGraphicPosition ePos, sal_uInt16 nWhich );
SvxBrushItem( const String& rLink, const String& rFilter,
- SvxGraphicPosition ePos, USHORT nWhich );
+ SvxGraphicPosition ePos, sal_uInt16 nWhich );
SvxBrushItem( const SvxBrushItem& );
- SvxBrushItem( const CntWallpaperItem&, USHORT nWhich );
+ SvxBrushItem( const CntWallpaperItem&, sal_uInt16 nWhich );
~SvxBrushItem();
@@ -100,13 +100,13 @@ public:
String &rText, const IntlWrapper * = 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 );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
const Color& GetColor() const { return aColor; }
Color& GetColor() { return aColor; }
diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx
index 36e31e48a2..94e11dd072 100644..100755
--- a/editeng/inc/editeng/bulitem.hxx
+++ b/editeng/inc/editeng/bulitem.hxx
@@ -76,13 +76,13 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
GraphicObject* pGraphicObject;
String aPrevText;
String aFollowText;
- USHORT nStart;
- USHORT nStyle;
+ sal_uInt16 nStart;
+ sal_uInt16 nStyle;
long nWidth;
- USHORT nScale;
+ sal_uInt16 nScale;
sal_Unicode cSymbol;
- BYTE nJustify;
- USHORT nValidMask; // Only temporary for GetAttribs / setAttribs,
+ sal_uInt8 nJustify;
+ sal_uInt16 nValidMask; // Only temporary for GetAttribs / setAttribs,
// because of the large Bullets
#ifdef _SVX_BULITEM_CXX
@@ -93,30 +93,30 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
public:
TYPEINFO();
- SvxBulletItem( USHORT nWhich = 0 );
- SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 );
- SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 );
- SvxBulletItem( const Bitmap&, USHORT nWhich = 0 );
- SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 );
- SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 );
+ SvxBulletItem( sal_uInt16 nWhich = 0 );
+ SvxBulletItem( sal_uInt8 nStyle, const Font& rFont, sal_uInt16 nStart = 0, sal_uInt16 nWhich = 0 );
+ SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, sal_uInt16 nWhich=0 );
+ SvxBulletItem( const Bitmap&, sal_uInt16 nWhich = 0 );
+ SvxBulletItem( const GraphicObject&, sal_uInt16 nWhich = 0 );
+ SvxBulletItem( SvStream& rStrm, sal_uInt16 nWhich = 0 );
SvxBulletItem( const SvxBulletItem& );
~SvxBulletItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const;
String GetFullText() const;
sal_Unicode GetSymbol() const { return cSymbol; }
String GetPrevText() const { return aPrevText; }
String GetFollowText() const { return aFollowText; }
- USHORT GetStart() const { return nStart; }
+ sal_uInt16 GetStart() const { return nStart; }
long GetWidth() const { return nWidth; }
- USHORT GetStyle() const { return nStyle; }
- BYTE GetJustification() const { return nJustify; }
+ sal_uInt16 GetStyle() const { return nStyle; }
+ sal_uInt8 GetJustification() const { return nJustify; }
Font GetFont() const { return aFont; }
- USHORT GetScale() const { return nScale; }
+ sal_uInt16 GetScale() const { return nScale; }
Bitmap GetBitmap() const;
void SetBitmap( const Bitmap& rBmp );
@@ -128,14 +128,14 @@ public:
void SetPrevText( const String& rStr) { aPrevText = rStr;}
void SetFollowText(const String& rStr) { aFollowText=rStr;}
- void SetStart( USHORT nNew ) { nStart = nNew; }
+ void SetStart( sal_uInt16 nNew ) { nStart = nNew; }
void SetWidth( long nNew ) { nWidth = nNew; }
- void SetStyle( USHORT nNew ) { nStyle = nNew; }
- void SetJustification( BYTE nNew ) { nJustify = nNew; }
+ void SetStyle( sal_uInt16 nNew ) { nStyle = nNew; }
+ void SetJustification( sal_uInt8 nNew ) { nJustify = nNew; }
void SetFont( const Font& rNew) { aFont = rNew; }
- void SetScale( USHORT nNew ) { nScale = nNew; }
+ void SetScale( sal_uInt16 nNew ) { nScale = nNew; }
- virtual USHORT GetVersion(USHORT nFileVersion) const;
+ virtual sal_uInt16 GetVersion(sal_uInt16 nFileVersion) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -143,12 +143,12 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
static void StoreFont( SvStream&, const Font& );
- static Font CreateFont( SvStream&, USHORT nVer );
+ static Font CreateFont( SvStream&, sal_uInt16 nVer );
- USHORT& GetValidMask() { return nValidMask; }
- USHORT GetValidMask() const { return nValidMask; }
- USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; }
- void SetValid( USHORT nFlag, BOOL bValid )
+ sal_uInt16& GetValidMask() { return nValidMask; }
+ sal_uInt16 GetValidMask() const { return nValidMask; }
+ sal_uInt16 IsValid( sal_uInt16 nFlag ) const { return nValidMask & nFlag; }
+ void SetValid( sal_uInt16 nFlag, sal_Bool bValid )
{
if ( bValid )
nValidMask |= nFlag;
diff --git a/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx
index 1f7d52e743..2ae454368d 100644..100755
--- a/editeng/inc/editeng/charhiddenitem.hxx
+++ b/editeng/inc/editeng/charhiddenitem.hxx
@@ -45,7 +45,7 @@ class EDITENG_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem
public:
TYPEINFO();
- SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId );
+ SvxCharHiddenItem( const sal_Bool bHidden /*= sal_False*/, const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
diff --git a/editeng/inc/editeng/charreliefitem.hxx b/editeng/inc/editeng/charreliefitem.hxx
index 148e8590d0..d32f3b4aeb 100644..100755
--- a/editeng/inc/editeng/charreliefitem.hxx
+++ b/editeng/inc/editeng/charreliefitem.hxx
@@ -51,12 +51,12 @@ public:
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetValueCount() const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetValueCount() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -64,10 +64,8 @@ public:
String &rText,
const IntlWrapper * = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const;
+ 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 SvxCharReliefItem& operator=( const SvxCharReliefItem& rItem )
{
diff --git a/editeng/inc/editeng/charrotateitem.hxx b/editeng/inc/editeng/charrotateitem.hxx
index f085beb2fe..4e9e0ab44f 100644..100755
--- a/editeng/inc/editeng/charrotateitem.hxx
+++ b/editeng/inc/editeng/charrotateitem.hxx
@@ -55,9 +55,9 @@ public:
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -65,10 +65,8 @@ public:
String &rText,
const IntlWrapper * = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const;
+ 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 SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem )
{
diff --git a/editeng/inc/editeng/charscaleitem.hxx b/editeng/inc/editeng/charscaleitem.hxx
index 6c6e0db5b5..19967f6a23 100644..100755
--- a/editeng/inc/editeng/charscaleitem.hxx
+++ b/editeng/inc/editeng/charscaleitem.hxx
@@ -52,9 +52,9 @@ public:
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -62,10 +62,8 @@ public:
String &rText,
const IntlWrapper * = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const;
+ 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 SvxCharScaleWidthItem& operator=(const SvxCharScaleWidthItem& rItem )
{
diff --git a/editeng/inc/editeng/cmapitem.hxx b/editeng/inc/editeng/cmapitem.hxx
index 791f7a2b1c..f4b747747b 100644..100755
--- a/editeng/inc/editeng/cmapitem.hxx
+++ b/editeng/inc/editeng/cmapitem.hxx
@@ -53,7 +53,7 @@ public:
TYPEINFO();
SvxCaseMapItem( const SvxCaseMap eMap /*= SVX_CASEMAP_NOT_MAPPED*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem + SfxEnumItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -62,13 +62,13 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetValueCount() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetValueCount() const;
// MS VC4.0 kommt durcheinander
- void SetValue( USHORT nNewVal )
+ void SetValue( sal_uInt16 nNewVal )
{SfxEnumItem::SetValue(nNewVal); }
inline SvxCaseMapItem& operator=(const SvxCaseMapItem& rMap)
@@ -81,9 +81,9 @@ public:
SvxCaseMap GetCaseMap() const
{ return (SvxCaseMap)GetValue(); }
void SetCaseMap( SvxCaseMap eNew )
- { SetValue( (USHORT)eNew ); }
- 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 );
+ { SetValue( (sal_uInt16)eNew ); }
+ 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 );
};
#endif
diff --git a/editeng/inc/editeng/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx
index 6c539d1f0a..b3ea8892d6 100644..100755
--- a/editeng/inc/editeng/cntritem.hxx
+++ b/editeng/inc/editeng/cntritem.hxx
@@ -44,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxContourItem : public SfxBoolItem
public:
TYPEINFO();
- SvxContourItem( const BOOL bContoured /*= FALSE*/,
- const USHORT nId );
+ SvxContourItem( const sal_Bool bContoured /*= sal_False*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/colritem.hxx b/editeng/inc/editeng/colritem.hxx
index 24041ba57c..6d0373f122 100644..100755
--- a/editeng/inc/editeng/colritem.hxx
+++ b/editeng/inc/editeng/colritem.hxx
@@ -57,17 +57,17 @@ private:
public:
TYPEINFO();
- SvxColorItem( const USHORT nId );
- SvxColorItem( const Color& aColor, const USHORT nId );
- SvxColorItem( SvStream& rStrm, const USHORT nId );
+ SvxColorItem( const sal_uInt16 nId );
+ SvxColorItem( const Color& aColor, const sal_uInt16 nId );
+ SvxColorItem( SvStream& rStrm, const sal_uInt16 nId );
SvxColorItem( const SvxColorItem& rCopy );
~SvxColorItem();
// "pure virtual Methods" from SfxPoolItem
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 USHORT GetVersion( USHORT nFileVersion ) const;
+ 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 sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -75,8 +75,8 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
inline SvxColorItem& operator=(const SvxColorItem& rColor)
{
diff --git a/editeng/inc/editeng/crsditem.hxx b/editeng/inc/editeng/crsditem.hxx
index a7264df3d3..2d67e5288a 100644..100755
--- a/editeng/inc/editeng/crsditem.hxx
+++ b/editeng/inc/editeng/crsditem.hxx
@@ -52,7 +52,7 @@ public:
TYPEINFO();
SvxCrossedOutItem( const FontStrikeout eSt /*= STRIKEOUT_NONE*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -61,20 +61,20 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetValueCount() 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 SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ 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 );
// MS VC4.0 messes things up
- void SetValue( USHORT nNewVal )
+ void SetValue( sal_uInt16 nNewVal )
{SfxEnumItem::SetValue(nNewVal); }
virtual int HasBoolValue() const;
- virtual BOOL GetBoolValue() const;
- virtual void SetBoolValue( BOOL bVal );
+ virtual sal_Bool GetBoolValue() const;
+ virtual void SetBoolValue( sal_Bool bVal );
inline SvxCrossedOutItem& operator=(const SvxCrossedOutItem& rCross)
{
@@ -86,7 +86,7 @@ public:
FontStrikeout GetStrikeout() const
{ return (FontStrikeout)GetValue(); }
void SetStrikeout( FontStrikeout eNew )
- { SetValue( (USHORT)eNew ); }
+ { SetValue( (sal_uInt16)eNew ); }
};
#endif // #ifndef _SVX_CRSDITEM_HXX
diff --git a/editeng/inc/editeng/cscoitem.hxx b/editeng/inc/editeng/cscoitem.hxx
index b286f3429a..41067ffe93 100644..100755
--- a/editeng/inc/editeng/cscoitem.hxx
+++ b/editeng/inc/editeng/cscoitem.hxx
@@ -47,9 +47,9 @@ class EDITENG_DLLPUBLIC SvxCharSetColorItem : public SvxColorItem
public:
TYPEINFO();
- SvxCharSetColorItem( const USHORT nId );
+ SvxCharSetColorItem( const sal_uInt16 nId );
SvxCharSetColorItem( const Color& aColor, const rtl_TextEncoding eFrom,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -58,8 +58,8 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
inline rtl_TextEncoding& GetCharSet() { return eFrom; }
inline rtl_TextEncoding GetCharSet() const { return eFrom; }
diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx
index 7921c3cd83..f5ef746005 100644..100755
--- a/editeng/inc/editeng/editdata.hxx
+++ b/editeng/inc/editeng/editdata.hxx
@@ -110,7 +110,7 @@ class SfxStyleSheet;
struct EPosition
{
- USHORT nPara;
+ sal_uInt16 nPara;
xub_StrLen nIndex;
EPosition() :
@@ -119,7 +119,7 @@ struct EPosition
{
}
- EPosition( USHORT nPara_, xub_StrLen nPos_ ) :
+ EPosition( sal_uInt16 nPara_, xub_StrLen nPos_ ) :
nPara( nPara_ ),
nIndex( nPos_ )
{
@@ -128,14 +128,14 @@ struct EPosition
struct ESelection
{
- USHORT nStartPara;
+ sal_uInt16 nStartPara;
xub_StrLen nStartPos;
- USHORT nEndPara;
+ sal_uInt16 nEndPara;
xub_StrLen nEndPos;
ESelection() : nStartPara( 0 ), nStartPos( 0 ), nEndPara( 0 ), nEndPos( 0 ) {}
- ESelection( USHORT nStPara, xub_StrLen nStPos, USHORT nEPara, xub_StrLen nEPos ) :
+ ESelection( sal_uInt16 nStPara, xub_StrLen nStPos, sal_uInt16 nEPara, xub_StrLen nEPos ) :
nStartPara( nStPara ),
nStartPos( nStPos ),
nEndPara( nEPara ),
@@ -143,7 +143,7 @@ struct ESelection
{
}
- ESelection( USHORT nPara, xub_StrLen nPos ) :
+ ESelection( sal_uInt16 nPara, xub_StrLen nPos ) :
nStartPara( nPara ),
nStartPos( nPos ),
nEndPara( nPara ),
@@ -152,14 +152,14 @@ struct ESelection
}
void Adjust();
- BOOL IsEqual( const ESelection& rS ) const;
- BOOL IsLess( const ESelection& rS ) const;
- BOOL IsGreater( const ESelection& rS ) const;
- BOOL IsZero() const;
- BOOL HasRange() const;
+ sal_Bool IsEqual( const ESelection& rS ) const;
+ sal_Bool IsLess( const ESelection& rS ) const;
+ sal_Bool IsGreater( const ESelection& rS ) const;
+ sal_Bool IsZero() const;
+ sal_Bool HasRange() const;
};
-inline BOOL ESelection::HasRange() const
+inline sal_Bool ESelection::HasRange() const
{
return ( nStartPara != nEndPara ) || ( nStartPos != nEndPos );
}
@@ -225,7 +225,7 @@ struct EDITENG_DLLPUBLIC EFieldInfo
EPosition aPosition;
EFieldInfo();
- EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos );
+ EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos );
~EFieldInfo();
EFieldInfo( const EFieldInfo& );
@@ -283,24 +283,24 @@ struct ParagraphInfos
, nFirstLineMaxAscent( 0 )
, bValid( 0 )
{}
- USHORT nParaHeight;
- USHORT nLines;
+ sal_uInt16 nParaHeight;
+ sal_uInt16 nLines;
- USHORT nFirstLineStartX;
+ sal_uInt16 nFirstLineStartX;
- USHORT nFirstLineOffset;
- USHORT nFirstLineHeight;
- USHORT nFirstLineTextHeight;
- USHORT nFirstLineMaxAscent;
+ sal_uInt16 nFirstLineOffset;
+ sal_uInt16 nFirstLineHeight;
+ sal_uInt16 nFirstLineTextHeight;
+ sal_uInt16 nFirstLineMaxAscent;
- BOOL bValid; // A query during formatting is not valid!
+ sal_Bool bValid; // A query during formatting is not valid!
};
struct EECharAttrib
{
const SfxPoolItem* pAttr;
- USHORT nPara;
+ sal_uInt16 nPara;
xub_StrLen nStart;
xub_StrLen nEnd;
};
@@ -309,11 +309,11 @@ SV_DECL_VARARR_VISIBILITY( EECharAttribArray, EECharAttrib, 0, 4, EDITENG_DLLPUB
struct MoveParagraphsInfo
{
- USHORT nStartPara;
- USHORT nEndPara;
- USHORT nDestPara;
+ sal_uInt16 nStartPara;
+ sal_uInt16 nEndPara;
+ sal_uInt16 nDestPara;
- MoveParagraphsInfo( USHORT nS, USHORT nE, USHORT nD )
+ MoveParagraphsInfo( sal_uInt16 nS, sal_uInt16 nE, sal_uInt16 nD )
{ nStartPara = nS; nEndPara = nE; nDestPara = nD; }
};
@@ -322,9 +322,9 @@ struct MoveParagraphsInfo
struct PasteOrDropInfos
{
- USHORT nAction;
- USHORT nStartPara;
- USHORT nEndPara;
+ sal_uInt16 nAction;
+ sal_uInt16 nStartPara;
+ sal_uInt16 nEndPara;
PasteOrDropInfos() : nAction(0), nStartPara(0xFFFF), nEndPara(0xFFFF) {}
};
@@ -377,10 +377,10 @@ struct EENotify
EditEngine* pEditEngine;
EditView* pEditView;
- USHORT nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED
+ sal_uInt16 nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED
- USHORT nParam1;
- USHORT nParam2;
+ sal_uInt16 nParam1;
+ sal_uInt16 nParam2;
EENotify( EENotifyType eType )
{ eNotificationType = eType; pEditEngine = NULL; pEditView = NULL; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; }
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 000003d0de..02fc25ed8a 100644..100755
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -34,7 +34,6 @@ class EditView;
class OutputDevice;
class EditUndo;
class SvxFont;
-class SfxUndoManager;
class SfxItemPool;
class SfxStyleSheet;
class String;
@@ -85,6 +84,9 @@ namespace svx{
struct SpellPortion;
typedef std::vector<SpellPortion> SpellPortions;
}
+namespace svl{
+class IUndoManager;
+}
namespace basegfx { class B2DPolyPolygon; }
#include <rsc/rscsfx.hxx>
@@ -122,7 +124,7 @@ private:
EDITENG_DLLPRIVATE EditEngine( const EditEngine& );
EDITENG_DLLPRIVATE EditEngine& operator=( const EditEngine& );
- EDITENG_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, Window* pFrameWin = NULL );
+ EDITENG_DLLPRIVATE sal_uInt8 PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, Window* pFrameWin = NULL );
protected:
@@ -133,8 +135,8 @@ public:
const SfxItemSet& GetEmptyItemSet();
- void SetDefTab( USHORT nDefTab );
- USHORT GetDefTab() const;
+ void SetDefTab( sal_uInt16 nDefTab );
+ sal_uInt16 GetDefTab() const;
void SetRefDevice( OutputDevice* pRefDef );
OutputDevice* GetRefDevice() const;
@@ -142,51 +144,51 @@ public:
void SetRefMapMode( const MapMode& rMapMode );
MapMode GetRefMapMode();
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const;
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const;
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
Color GetAutoColor() const;
- void EnableAutoColor( BOOL b );
- BOOL IsAutoColorEnabled() const;
- void ForceAutoColor( BOOL b );
- BOOL IsForceAutoColor() const;
+ void EnableAutoColor( sal_Bool b );
+ sal_Bool IsAutoColorEnabled() const;
+ void ForceAutoColor( sal_Bool b );
+ sal_Bool IsForceAutoColor() const;
- void InsertView( EditView* pEditView, USHORT nIndex = EE_APPEND );
+ void InsertView( EditView* pEditView, sal_uInt16 nIndex = EE_APPEND );
EditView* RemoveView( EditView* pEditView );
- EditView* RemoveView( USHORT nIndex = EE_APPEND );
- EditView* GetView( USHORT nIndex = 0 ) const;
- USHORT GetViewCount() const;
- BOOL HasView( EditView* pView ) const;
+ EditView* RemoveView( sal_uInt16 nIndex = EE_APPEND );
+ EditView* GetView( sal_uInt16 nIndex = 0 ) const;
+ sal_uInt16 GetViewCount() const;
+ sal_Bool HasView( EditView* pView ) const;
EditView* GetActiveView() const;
void SetActiveView( EditView* pView );
void SetPaperSize( const Size& rSize );
const Size& GetPaperSize() const;
- void SetVertical( BOOL bVertical );
- BOOL IsVertical() const;
+ void SetVertical( sal_Bool bVertical );
+ sal_Bool IsVertical() const;
- void SetFixedCellHeight( BOOL bUseFixedCellHeight );
- BOOL IsFixedCellHeight() const;
+ void SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
+ sal_Bool IsFixedCellHeight() const;
void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
- USHORT GetScriptType( const ESelection& rSelection ) const;
- LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const;
+ sal_uInt16 GetScriptType( const ESelection& rSelection ) const;
+ LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const;
void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode );
- void SetAsianCompressionMode( USHORT nCompression );
- USHORT GetAsianCompressionMode() const;
+ void SetAsianCompressionMode( sal_uInt16 nCompression );
+ sal_uInt16 GetAsianCompressionMode() const;
- void SetKernAsianPunctuation( BOOL bEnabled );
- BOOL IsKernAsianPunctuation() const;
+ void SetKernAsianPunctuation( sal_Bool bEnabled );
+ sal_Bool IsKernAsianPunctuation() const;
- void SetAddExtLeading( BOOL b );
- BOOL IsAddExtLeading() const;
+ void SetAddExtLeading( sal_Bool b );
+ sal_Bool IsAddExtLeading() const;
void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
@@ -205,106 +207,107 @@ public:
sal_uInt32 GetTextHeight() const;
sal_uInt32 CalcTextWidth();
- String GetText( USHORT nParagraph ) const;
- xub_StrLen GetTextLen( USHORT nParagraph ) const;
- sal_uInt32 GetTextHeight( USHORT nParagraph ) const;
+ String GetText( sal_uInt16 nParagraph ) const;
+ xub_StrLen GetTextLen( sal_uInt16 nParagraph ) const;
+ sal_uInt32 GetTextHeight( sal_uInt16 nParagraph ) const;
- USHORT GetParagraphCount() const;
+ sal_uInt16 GetParagraphCount() const;
- USHORT GetLineCount( USHORT nParagraph ) const;
- xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const;
- void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
- USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
- sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 );
- USHORT GetFirstLineOffset( USHORT nParagraph );
- ParagraphInfos GetParagraphInfos( USHORT nPara );
- USHORT FindParagraph( long nDocPosY );
+ sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const;
+ xub_StrLen GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ sal_uInt32 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine = 0 );
+ sal_uInt16 GetFirstLineOffset( sal_uInt16 nParagraph );
+ ParagraphInfos GetParagraphInfos( sal_uInt16 nPara );
+ sal_uInt16 FindParagraph( long nDocPosY );
EPosition FindDocPosition( const Point& rDocPos ) const;
Rectangle GetCharacterBounds( const EPosition& rPos ) const;
- String GetWord( USHORT nPara, xub_StrLen nIndex );
+ String GetWord( sal_uInt16 nPara, xub_StrLen nIndex );
- ESelection GetWord( const ESelection& rSelection, USHORT nWordType ) const;
- ESelection WordLeft( const ESelection& rSelection, USHORT nWordType ) const;
- ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const;
- ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
- ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
+ ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const;
+ ESelection WordLeft( const ESelection& rSelection, sal_uInt16 nWordType ) const;
+ ESelection WordRight( const ESelection& rSelection, sal_uInt16 nWordType ) const;
+ ESelection CursorLeft( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const;
+ ESelection CursorRight( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const;
ESelection SelectSentence( const ESelection& rCurSel ) const;
void Clear();
void SetText( const String& rStr );
EditTextObject* CreateTextObject();
- EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 );
+ EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 );
EditTextObject* CreateTextObject( const ESelection& rESelection );
void SetText( const EditTextObject& rTextObject );
- void RemoveParagraph( USHORT nPara );
- void InsertParagraph( USHORT nPara, const EditTextObject& rTxtObj );
- void InsertParagraph( USHORT nPara, const String& rText);
+ void RemoveParagraph( sal_uInt16 nPara );
+ void InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj );
+ void InsertParagraph( sal_uInt16 nPara, const String& rText);
- void SetText( USHORT nPara, const EditTextObject& rTxtObj );
- void SetText( USHORT nPara, const String& rText);
+ void SetText( sal_uInt16 nPara, const EditTextObject& rTxtObj );
+ void SetText( sal_uInt16 nPara, const String& rText);
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
- virtual const SfxItemSet& GetParaAttribs( USHORT nPara ) const;
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
+ virtual const SfxItemSet& GetParaAttribs( sal_uInt16 nPara ) const;
- void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const;
+ void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
- SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const;
- SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All );
+ SfxItemSet GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const;
+ SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All );
- BOOL HasParaAttrib( USHORT nPara, USHORT nWhich ) const;
- const SfxPoolItem& GetParaAttrib( USHORT nPara, USHORT nWhich );
+ sal_Bool HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
+ const SfxPoolItem& GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich );
- Font GetStandardFont( USHORT nPara );
- SvxFont GetStandardSvxFont( USHORT nPara );
+ Font GetStandardFont( sal_uInt16 nPara );
+ SvxFont GetStandardSvxFont( sal_uInt16 nPara );
void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
- void ShowParagraph( USHORT nParagraph, BOOL bShow = TRUE );
- BOOL IsParagraphVisible( USHORT nParagraph );
+ void ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow = sal_True );
+ sal_Bool IsParagraphVisible( sal_uInt16 nParagraph );
- SfxUndoManager& GetUndoManager();
- void UndoActionStart( USHORT nId );
- void UndoActionEnd( USHORT nId );
- BOOL IsInUndo();
+ ::svl::IUndoManager&
+ GetUndoManager();
+ void UndoActionStart( sal_uInt16 nId );
+ void UndoActionEnd( sal_uInt16 nId );
+ sal_Bool IsInUndo();
- void EnableUndo( BOOL bEnable );
- BOOL IsUndoEnabled();
+ void EnableUndo( sal_Bool bEnable );
+ sal_Bool IsUndoEnabled();
/** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo
This is currently used in a bad but needed hack to get undo actions merged in the
OutlineView in impress. Do not use it unless you want to sell your soul too! */
- BOOL HasTriedMergeOnLastAddUndo() const;
+ sal_Bool HasTriedMergeOnLastAddUndo() const;
void ClearModifyFlag();
void SetModified();
- BOOL IsModified() const;
+ sal_Bool IsModified() const;
void SetModifyHdl( const Link& rLink );
Link GetModifyHdl() const;
- BOOL IsInSelectionMode() const;
+ sal_Bool IsInSelectionMode() const;
void StopSelectionMode();
void StripPortions();
- void GetPortions( USHORT nPara, SvUShorts& rList );
+ void GetPortions( sal_uInt16 nPara, SvUShorts& rList );
- long GetFirstLineStartX( USHORT nParagraph );
- Point GetDocPosTopLeft( USHORT nParagraph );
+ long GetFirstLineStartX( sal_uInt16 nParagraph );
+ Point GetDocPosTopLeft( sal_uInt16 nParagraph );
Point GetDocPos( const Point& rPaperPos ) const;
- BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 );
+ sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
// StartDocPos corrresponds to VisArea.TopLeft().
void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos );
- void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, BOOL bClip );
+ void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, sal_Bool bClip );
void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
-// ULONG: Error code of the stream.
- ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
- ULONG Write( SvStream& rOutput, EETextFormat );
+// sal_uInt32: Error code of the stream.
+ sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ sal_uLong Write( SvStream& rOutput, EETextFormat );
void SetStatusEventHdl( const Link& rLink );
Link GetStatusEventHdl() const;
@@ -316,25 +319,25 @@ public:
Link GetImportHdl() const;
// Do not evaluate font formatting => For Outliner
- BOOL IsFlatMode() const;
- void SetFlatMode( BOOL bFlat );
+ sal_Bool IsFlatMode() const;
+ void SetFlatMode( sal_Bool bFlat );
void SetControlWord( sal_uInt32 nWord );
sal_uInt32 GetControlWord() const;
void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
- void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 );
+ void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 );
void QuickMarkInvalid( const ESelection& rSel );
- void QuickFormatDoc( BOOL bFull = FALSE );
+ void QuickFormatDoc( sal_Bool bFull = sal_False );
void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
void QuickInsertLineBreak( const ESelection& rSel );
void QuickInsertText( const String& rText, const ESelection& rSel );
void QuickDelete( const ESelection& rSel );
- void QuickMarkToBeRepainted( USHORT nPara );
+ void QuickMarkToBeRepainted( sal_uInt16 nPara );
- void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 );
- void GetGlobalCharStretching( USHORT& rX, USHORT& rY );
- void DoStretchChars( USHORT nX, USHORT nY );
+ void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
+ void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY );
+ void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY );
void SetEditTextObjectPool( SfxItemPool* pPool );
SfxItemPool* GetEditTextObjectPool() const;
@@ -342,8 +345,8 @@ public:
void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
SfxStyleSheetPool* GetStyleSheetPool();
- void SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle );
- SfxStyleSheet* GetStyleSheet( USHORT nPara ) const;
+ void SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle );
+ SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const;
void SetWordDelimiters( const String& rDelimiters );
String GetWordDelimiters() const;
@@ -351,11 +354,11 @@ public:
void SetGroupChars( const String& rChars );
String GetGroupChars() const;
- void EnablePasteSpecial( BOOL bEnable );
- BOOL IsPasteSpecialEnabled() const;
+ void EnablePasteSpecial( sal_Bool bEnable );
+ sal_Bool IsPasteSpecialEnabled() const;
- void EnableIdleFormatter( BOOL bEnable );
- BOOL IsIdleFormatterEnabled() const;
+ void EnableIdleFormatter( sal_Bool bEnable );
+ sal_Bool IsIdleFormatterEnabled() const;
void EraseVirtualDevice();
@@ -376,16 +379,16 @@ public:
void SetDefaultLanguage( LanguageType eLang );
LanguageType GetDefaultLanguage() const;
- BOOL HasOnlineSpellErrors() const;
+ sal_Bool HasOnlineSpellErrors() const;
void CompleteOnlineSpelling();
- void SetBigTextObjectStart( USHORT nStartAtPortionCount );
- USHORT GetBigTextObjectStart() const;
- BOOL ShouldCreateBigTextObject() const;
+ void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount );
+ sal_uInt16 GetBigTextObjectStart() const;
+ sal_Bool ShouldCreateBigTextObject() const;
// For fast Pre-Test without view:
EESpellState HasSpellErrors();
- BOOL HasText( const SvxSearchItem& rSearchItem );
+ sal_Bool HasText( const SvxSearchItem& rSearchItem );
//initialize sentence spelling
void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
@@ -400,15 +403,15 @@ public:
// for text conversion (see also HasSpellErrors)
sal_Bool HasConvertibleTextPortion( LanguageType nLang );
- virtual BOOL ConvertNextDocument();
+ virtual sal_Bool ConvertNextDocument();
- BOOL UpdateFields();
- void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL );
+ sal_Bool UpdateFields();
+ void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
- USHORT GetFieldCount( USHORT nPara ) const;
- EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const;
+ sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const;
+ EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
- BOOL IsRightToLeft( USHORT nPara ) const;
+ sal_Bool IsRightToLeft( sal_uInt16 nPara ) const;
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
CreateTransferable( const ESelection& rSelection ) const;
@@ -419,17 +422,17 @@ public:
void SetBeginPasteOrDropHdl( const Link& rLink );
void SetEndPasteOrDropHdl( const Link& rLink );
- virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
- virtual void ParagraphInserted( USHORT nNewParagraph );
- virtual void ParagraphDeleted( USHORT nDeletedParagraph );
- virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph );
- virtual void ParaAttribsChanged( USHORT nParagraph );
+ virtual void PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
+ virtual void ParagraphInserted( sal_uInt16 nNewParagraph );
+ virtual void ParagraphDeleted( sal_uInt16 nDeletedParagraph );
+ virtual void ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph );
+ virtual void ParaAttribsChanged( sal_uInt16 nParagraph );
virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
- virtual void ParagraphHeightChanged( USHORT nPara );
+ virtual void ParagraphHeightChanged( sal_uInt16 nPara );
virtual void DrawingText(
- const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,
- const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,
+ const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
bool bEndOfLine,
@@ -441,39 +444,38 @@ public:
virtual void DrawingTab(
const Point& rStartPos, long nWidth, const String& rChar,
- const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
bool bEndOfLine,
bool bEndOfParagraph,
const Color& rOverlineColor,
const Color& rTextLineColor);
-
- virtual String GetUndoComment( USHORT nUndoId ) const;
- virtual BOOL FormattingParagraph( USHORT nPara );
- virtual BOOL SpellNextDocument();
- virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
- virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
- virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
+ virtual String GetUndoComment( sal_uInt16 nUndoId ) const;
+ virtual sal_Bool FormattingParagraph( sal_uInt16 nPara );
+ virtual sal_Bool SpellNextDocument();
+ virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+ virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+ virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
// to be overloaded if access to bullet information needs to be provided
- virtual const SvxNumberFormat * GetNumberFormat( USHORT nPara ) const;
+ virtual const SvxNumberFormat * GetNumberFormat( sal_uInt16 nPara ) const;
- virtual Rectangle GetBulletArea( USHORT nPara );
+ virtual Rectangle GetBulletArea( sal_uInt16 nPara );
- static SfxItemPool* CreatePool( BOOL bLoadRefCounts = TRUE );
+ static SfxItemPool* CreatePool( sal_Bool bLoadRefCounts = sal_True );
static SfxItemPool& GetGlobalItemPool();
static sal_uInt32 RegisterClipboardFormatName();
- static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent );
- static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
- static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent );
- static USHORT GetAvailableSearchOptions();
+ static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
+ static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
+ static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent );
+ static sal_uInt16 GetAvailableSearchOptions();
static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont );
static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont );
static Font CreateFontFromItemSet( const SfxItemSet& rItemSet );
- static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType );
+ static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType );
static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet );
- static void ImportBulletItem( SvxNumBulletItem& rNumBullet, USHORT nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace );
- static BOOL IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); }
- static BOOL HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable );
+ static void ImportBulletItem( SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace );
+ static sal_Bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); }
+ static sal_Bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable );
/** sets a link that is called at the beginning of a drag operation at an edit view */
void SetBeginDropHdl( const Link& rLink );
@@ -484,8 +486,8 @@ public:
Link GetEndDropHdl() const;
/// specifies if auto-correction should capitalize the first word or not (default is on)
- void SetFirstWordCapitalization( BOOL bCapitalize );
- BOOL IsFirstWordCapitalization() const;
+ void SetFirstWordCapitalization( sal_Bool bCapitalize );
+ sal_Bool IsFirstWordCapitalization() const;
};
#endif // _MyEDITENG_HXX
diff --git a/editeng/inc/editeng/editengdllapi.h b/editeng/inc/editeng/editengdllapi.h
index 6e916385ac..6e916385ac 100644..100755
--- a/editeng/inc/editeng/editengdllapi.h
+++ b/editeng/inc/editeng/editengdllapi.h
diff --git a/editeng/inc/editeng/editerr.hxx b/editeng/inc/editeng/editerr.hxx
index cb1968bb0f..cb1968bb0f 100644..100755
--- a/editeng/inc/editeng/editerr.hxx
+++ b/editeng/inc/editeng/editerr.hxx
diff --git a/editeng/inc/editeng/editids.hrc b/editeng/inc/editeng/editids.hrc
index d48a6f3108..d48a6f3108 100644..100755
--- a/editeng/inc/editeng/editids.hrc
+++ b/editeng/inc/editeng/editids.hrc
diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx
index a4741bf65a..3ac253c630 100644..100755
--- a/editeng/inc/editeng/editobj.hxx
+++ b/editeng/inc/editeng/editobj.hxx
@@ -49,11 +49,11 @@ class EECharAttribArray;
class EDITENG_DLLPUBLIC EditTextObject
{
private:
- USHORT nWhich;
+ sal_uInt16 nWhich;
EDITENG_DLLPRIVATE EditTextObject& operator=( const EditTextObject& );
protected:
- EditTextObject( USHORT nWhich );
+ EditTextObject( sal_uInt16 nWhich );
EditTextObject( const EditTextObject& r );
virtual void StoreData( SvStream& rOStream ) const;
@@ -62,59 +62,59 @@ protected:
public:
virtual ~EditTextObject();
- USHORT Which() const { return nWhich; }
+ sal_uInt16 Which() const { return nWhich; }
- virtual USHORT GetUserType() const; // For OutlinerMode, it can however not save in compatible format
- virtual void SetUserType( USHORT n );
+ virtual sal_uInt16 GetUserType() const; // For OutlinerMode, it can however not save in compatible format
+ virtual void SetUserType( sal_uInt16 n );
- virtual ULONG GetObjectSettings() const;
- virtual void SetObjectSettings( ULONG n );
+ virtual sal_uLong GetObjectSettings() const;
+ virtual void SetObjectSettings( sal_uLong n );
- virtual BOOL IsVertical() const;
- virtual void SetVertical( BOOL bVertical );
+ virtual sal_Bool IsVertical() const;
+ virtual void SetVertical( sal_Bool bVertical );
- virtual USHORT GetScriptType() const;
+ virtual sal_uInt16 GetScriptType() const;
- virtual USHORT GetVersion() const; // As long as the outliner does not store any record length.
+ virtual sal_uInt16 GetVersion() const; // As long as the outliner does not store any record length.
virtual EditTextObject* Clone() const = 0;
- BOOL Store( SvStream& rOStream ) const;
+ sal_Bool Store( SvStream& rOStream ) const;
static EditTextObject* Create( SvStream& rIStream,
SfxItemPool* pGlobalTextObjectPool = 0 );
void Skip( SvStream& rIStream );
- virtual USHORT GetParagraphCount() const;
+ virtual sal_uInt16 GetParagraphCount() const;
- virtual XubString GetText( USHORT nParagraph ) const;
- virtual void Insert( const EditTextObject& rObj, USHORT nPara );
- virtual void RemoveParagraph( USHORT nPara );
- virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const;
+ virtual XubString GetText( sal_uInt16 nParagraph ) const;
+ virtual void Insert( const EditTextObject& rObj, sal_uInt16 nPara );
+ virtual void RemoveParagraph( sal_uInt16 nPara );
+ virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const;
- virtual BOOL HasPortionInfo() const;
+ virtual sal_Bool HasPortionInfo() const;
virtual void ClearPortionInfo();
- virtual BOOL HasOnlineSpellErrors() const;
+ virtual sal_Bool HasOnlineSpellErrors() const;
- virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const;
- virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const;
+ virtual sal_Bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const;
+ virtual void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
- virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 );
- virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 );
+ virtual sal_Bool RemoveCharAttribs( sal_uInt16 nWhich = 0 );
+ virtual sal_Bool RemoveParaAttribs( sal_uInt16 nWhich = 0 );
- virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart = EE_CHAR_START, USHORT nEnd = EE_CHAR_END );
+ virtual void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart = EE_CHAR_START, sal_uInt16 nEnd = EE_CHAR_END );
- virtual BOOL IsFieldObject() const;
+ virtual sal_Bool IsFieldObject() const;
virtual const SvxFieldItem* GetField() const;
- virtual BOOL HasField( TypeId aType = NULL ) const;
+ virtual sal_Bool HasField( TypeId aType = NULL ) const;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs );
+ virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const;
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs );
- virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
- virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const;
- virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily );
- virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily,
+ virtual sal_Bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
+ virtual void GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const;
+ virtual void SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily );
+ virtual sal_Bool ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily,
const XubString& rNewName, SfxStyleFamily eNewFamily );
virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc
index 00901b0feb..47350b3751 100644..100755
--- a/editeng/inc/editeng/editrids.hrc
+++ b/editeng/inc/editeng/editrids.hrc
@@ -237,45 +237,6 @@
#define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_EDIT_START + 167)
#define RID_SVXITEMS_WEIGHT_BLACK (RID_EDIT_START + 168)
-// paper formats
-#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 169)
-#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 170)
-#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 171)
-#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 172)
-#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 173)
-#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 174)
-#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 175)
-#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 176)
-#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 177)
-#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 178)
-#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 179)
-#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 180)
-#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 181)
-#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 182)
-#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 183)
-#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 184)
-#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 185)
-#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 186)
-#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 187)
-#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 188)
-#define RID_SVXSTR_PAPER_C (RID_SVX_START + 189)
-#define RID_SVXSTR_PAPER_D (RID_SVX_START + 190)
-#define RID_SVXSTR_PAPER_E (RID_SVX_START + 191)
-#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 192)
-#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 193)
-#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 194)
-#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 195)
-#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 196)
-#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 197)
-#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 198)
-#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 199)
-#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 200)
-#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 201)
-#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 202)
-#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 203)
-#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 204)
-#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 205)
-
// enum FontItalic -------------------------------------------------------
#define RID_SVXITEMS_ITALIC_BEGIN (RID_EDIT_START + 206)
#define RID_SVXITEMS_ITALIC_NONE (RID_EDIT_START + 206)
diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx
index 2b56c06b98..e554f721ff 100644..100755
--- a/editeng/inc/editeng/editstat.hxx
+++ b/editeng/inc/editeng/editstat.hxx
@@ -89,7 +89,7 @@
EE_STAT_CRSRLEFTPARA at the time cursor movement and the enter.
*/
-inline void SetFlags( ULONG& rBits, const ULONG nMask, bool bOn )
+inline void SetFlags( sal_uLong& rBits, const sal_uInt32 nMask, bool bOn )
{
if ( bOn )
rBits |= nMask;
@@ -100,25 +100,25 @@ inline void SetFlags( ULONG& rBits, const ULONG nMask, bool bOn )
class EditStatus
{
protected:
- ULONG nStatusBits;
- ULONG nControlBits;
- USHORT nPrevPara; // for EE_STAT_CRSRLEFTPARA
+ sal_uLong nStatusBits;
+ sal_uLong nControlBits;
+ sal_uInt16 nPrevPara; // for EE_STAT_CRSRLEFTPARA
public:
EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; }
void Clear() { nStatusBits = 0; }
- void SetControlBits( ULONG nMask, bool bOn )
+ void SetControlBits( sal_uLong nMask, bool bOn )
{ SetFlags( nControlBits, nMask, bOn ); }
- ULONG GetStatusWord() const { return nStatusBits; }
- ULONG& GetStatusWord() { return nStatusBits; }
+ sal_uLong GetStatusWord() const { return nStatusBits; }
+ sal_uLong& GetStatusWord() { return nStatusBits; }
- ULONG GetControlWord() const { return nControlBits; }
- ULONG& GetControlWord() { return nControlBits; }
+ sal_uLong GetControlWord() const { return nControlBits; }
+ sal_uLong& GetControlWord() { return nControlBits; }
- USHORT GetPrevParagraph() const { return nPrevPara; }
- USHORT& GetPrevParagraph() { return nPrevPara; }
+ sal_uInt16 GetPrevParagraph() const { return nPrevPara; }
+ sal_uInt16& GetPrevParagraph() { return nPrevPara; }
};
#define SPELLCMD_IGNOREWORD 0x0001
@@ -129,18 +129,18 @@ public:
struct SpellCallbackInfo
{
- USHORT nCommand;
+ sal_uInt16 nCommand;
String aWord;
LanguageType eLanguage;
- SpellCallbackInfo( USHORT nCMD, const String& rWord )
+ SpellCallbackInfo( sal_uInt16 nCMD, const String& rWord )
: aWord( rWord )
{
nCommand = nCMD;
eLanguage = LANGUAGE_DONTKNOW;
}
- SpellCallbackInfo( USHORT nCMD, LanguageType eLang )
+ SpellCallbackInfo( sal_uInt16 nCMD, LanguageType eLang )
{
nCommand = nCMD;
eLanguage = eLang;
diff --git a/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx
index a4c7917ec8..09e95e1a3d 100644..100755
--- a/editeng/inc/editeng/editund2.hxx
+++ b/editeng/inc/editeng/editund2.hxx
@@ -34,7 +34,7 @@
class ImpEditEngine;
-class EDITENG_DLLPUBLIC EditUndoManager : public SfxUndoManager
+class EDITENG_DLLPRIVATE EditUndoManager : public SfxUndoManager
{
using SfxUndoManager::Undo;
using SfxUndoManager::Redo;
@@ -44,8 +44,8 @@ private:
public:
EditUndoManager( ImpEditEngine* pImpEE );
- virtual BOOL Undo( USHORT nCount=1 );
- virtual BOOL Redo( USHORT nCount=1 );
+ virtual sal_Bool Undo();
+ virtual sal_Bool Redo();
};
// -----------------------------------------------------------------------
@@ -54,12 +54,12 @@ public:
class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction
{
private:
- USHORT nId;
+ sal_uInt16 nId;
ImpEditEngine* pImpEE;
public:
TYPEINFO();
- EditUndo( USHORT nI, ImpEditEngine* pImpEE );
+ EditUndo( sal_uInt16 nI, ImpEditEngine* pImpEE );
virtual ~EditUndo();
ImpEditEngine* GetImpEditEngine() const { return pImpEE; }
@@ -67,9 +67,9 @@ public:
virtual void Undo() = 0;
virtual void Redo() = 0;
- virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget&) const;
virtual String GetComment() const;
- virtual USHORT GetId() const;
+ virtual sal_uInt16 GetId() const;
};
#endif // _EDITUND2_HXX
diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx
index e709630f17..304187d595 100644..100755
--- a/editeng/inc/editeng/editview.hxx
+++ b/editeng/inc/editeng/editview.hxx
@@ -98,33 +98,33 @@ public:
void Paint( const Rectangle& rRect );
void Invalidate();
- Pair Scroll( long nHorzScroll, long nVertScroll, BYTE nRangeCheck = RGCHK_NEG );
+ Pair Scroll( long nHorzScroll, long nVertScroll, sal_uInt8 nRangeCheck = RGCHK_NEG );
- void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE );
+ void ShowCursor( sal_Bool bGotoCursor = sal_True, sal_Bool bForceVisCursor = sal_True );
void HideCursor();
EESelectionMode GetSelectionMode() const;
void SetSelectionMode( EESelectionMode eMode );
- void SetReadOnly( BOOL bReadOnly );
- BOOL IsReadOnly() const;
+ void SetReadOnly( sal_Bool bReadOnly );
+ sal_Bool IsReadOnly() const;
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
ESelection GetSelection() const;
void SetSelection( const ESelection& rNewSel );
- BOOL SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
+ sal_Bool SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
void IndentBlock();
void UnindentBlock();
- BOOL IsInsertMode() const;
- void SetInsertMode( BOOL bInsert );
+ sal_Bool IsInsertMode() const;
+ void SetInsertMode( sal_Bool bInsert );
void ReplaceSelected( const String& rStr );
String GetSelected();
void DeleteSelected();
- USHORT GetSelectedScriptType() const;
+ sal_uInt16 GetSelectedScriptType() const;
// VisArea position of the Output window.
// A size change also affects the VisArea
@@ -142,17 +142,17 @@ public:
void SetCursor( const Cursor& rCursor );
Cursor* GetCursor() const;
- void InsertText( const String& rNew, BOOL bSelect = FALSE );
+ void InsertText( const String& rNew, sal_Bool bSelect = sal_False );
- BOOL PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
+ sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
- BOOL MouseButtonUp( const MouseEvent& rMouseEvent );
- BOOL MouseButtonDown( const MouseEvent& rMouseEvent );
- BOOL MouseMove( const MouseEvent& rMouseEvent );
+ sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent );
+ sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent );
+ sal_Bool MouseMove( const MouseEvent& rMouseEvent );
void Command( const CommandEvent& rCEvt );
- BOOL Drop( const DropEvent& rEvt );
- BOOL QueryDrop( DropEvent& rEvt );
+ sal_Bool Drop( const DropEvent& rEvt );
+ sal_Bool QueryDrop( DropEvent& rEvt );
ESelection GetDropPos();
void Cut();
@@ -160,28 +160,28 @@ public:
void Paste();
void PasteSpecial();
- void EnablePaste( BOOL bEnable );
- BOOL IsPasteEnabled() const;
+ void EnablePaste( sal_Bool bEnable );
+ sal_Bool IsPasteEnabled() const;
void Undo();
void Redo();
- // especially for Olli
- USHORT GetParagraph( const Point& rMousePosPixel );
- Point GetWindowPosTopLeft( USHORT nParagraph );
- void MoveParagraphs( Range aParagraphs, USHORT nNewPos );
+ // especially for Oliver Specht
+ sal_uInt16 GetParagraph( const Point& rMousePosPixel );
+ Point GetWindowPosTopLeft( sal_uInt16 nParagraph );
+ void MoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos );
void MoveParagraphs( long nDiff );
const SfxItemSet& GetEmptyItemSet();
SfxItemSet GetAttribs();
void SetAttribs( const SfxItemSet& rSet );
- void SetParaAttribs( const SfxItemSet& rSet, USHORT nPara );
- void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0 );
- void RemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 );
- void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs = FALSE );
+ void SetParaAttribs( const SfxItemSet& rSet, sal_uInt16 nPara );
+ void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0 );
+ void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 );
+ void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs = sal_False );
- ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
- ULONG Write( SvStream& rOutput, EETextFormat eFormat );
+ sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ sal_uLong Write( SvStream& rOutput, EETextFormat eFormat );
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
@@ -191,12 +191,12 @@ public:
EditTextObject* CreateTextObject();
void InsertText( const EditTextObject& rTextObject );
- void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial );
+ void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial );
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetTransferable();
// An EditView, so that when TRUE the update will be free from flickering:
- void SetEditEngineUpdateMode( BOOL bUpdate );
+ void SetEditEngineUpdateMode( sal_Bool bUpdate );
void ForceUpdate();
SfxStyleSheet* GetStyleSheet() const;
@@ -205,37 +205,37 @@ public:
void SetAnchorMode( EVAnchorMode eMode );
EVAnchorMode GetAnchorMode() const;
- BOOL MatchGroup();
+ sal_Bool MatchGroup();
void CompleteAutoCorrect( Window* pFrameWin = NULL );
- EESpellState StartSpeller( BOOL bMultipleDoc = FALSE );
+ EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False );
EESpellState StartThesaurus();
- USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem );
+ sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem );
// for text conversion
- void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc );
+ void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc );
sal_Bool HasConvertibleTextPortion( LanguageType nLang );
void TransliterateText( sal_Int32 nTransliterationMode );
- BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE );
- BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE );
+ sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False );
+ sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False );
void SpellIgnoreWord();
void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
void InsertField( const SvxFieldItem& rFld );
const SvxFieldItem* GetFieldUnderMousePointer() const;
- const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const;
- const SvxFieldItem* GetField( const Point& rPos, USHORT* pnPara = NULL, xub_StrLen* pnPos = NULL ) const;
+ const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const;
+ const SvxFieldItem* GetField( const Point& rPos, sal_uInt16* pnPara = NULL, xub_StrLen* pnPos = NULL ) const;
const SvxFieldItem* GetFieldAtSelection() const;
String GetWordUnderMousePointer() const;
String GetWordUnderMousePointer( Rectangle& rWordRect ) const;
- void SetInvalidateMore( USHORT nPixel );
- USHORT GetInvalidateMore() const;
+ void SetInvalidateMore( sal_uInt16 nPixel );
+ sal_uInt16 GetInvalidateMore() const;
// grows or shrinks the font height for the current selection
void ChangeFontSize( bool bGrow, const FontList* pList );
diff --git a/editeng/inc/editeng/edtdlg.hxx b/editeng/inc/editeng/edtdlg.hxx
index 8e586b5600..8e586b5600 100644..100755
--- a/editeng/inc/editeng/edtdlg.hxx
+++ b/editeng/inc/editeng/edtdlg.hxx
diff --git a/editeng/inc/editeng/eedata.hxx b/editeng/inc/editeng/eedata.hxx
index 43657d6e81..43657d6e81 100644..100755
--- a/editeng/inc/editeng/eedata.hxx
+++ b/editeng/inc/editeng/eedata.hxx
diff --git a/editeng/inc/editeng/eeitem.hxx b/editeng/inc/editeng/eeitem.hxx
index 936109b283..936109b283 100644..100755
--- a/editeng/inc/editeng/eeitem.hxx
+++ b/editeng/inc/editeng/eeitem.hxx
diff --git a/editeng/inc/editeng/eeitemid.hxx b/editeng/inc/editeng/eeitemid.hxx
index 62b5a523dc..62b5a523dc 100644..100755
--- a/editeng/inc/editeng/eeitemid.hxx
+++ b/editeng/inc/editeng/eeitemid.hxx
diff --git a/editeng/inc/editeng/eerdll.hxx b/editeng/inc/editeng/eerdll.hxx
index f942c7d6fc..7388b09f50 100644..100755
--- a/editeng/inc/editeng/eerdll.hxx
+++ b/editeng/inc/editeng/eerdll.hxx
@@ -38,7 +38,7 @@ class GlobalEditData;
class EDITENG_DLLPUBLIC EditResId: public ResId
{
public:
- EditResId( USHORT nId );
+ EditResId( sal_uInt16 nId );
};
class EditDLL
diff --git a/editeng/inc/editeng/emphitem.hxx b/editeng/inc/editeng/emphitem.hxx
index 826c7c35d4..3ba2f3e1ab 100644..100755
--- a/editeng/inc/editeng/emphitem.hxx
+++ b/editeng/inc/editeng/emphitem.hxx
@@ -53,7 +53,7 @@ public:
TYPEINFO();
SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= EMPHASISMARK_NONE*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem + SfxEnumItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -63,14 +63,12 @@ public:
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) 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 SvxEmphasisMarkItem& operator=(const SvxEmphasisMarkItem& rItem )
{
@@ -82,7 +80,7 @@ public:
FontEmphasisMark GetEmphasisMark() const
{ return (FontEmphasisMark)GetValue(); }
void SetEmphasisMark( FontEmphasisMark eNew )
- { SetValue( (USHORT)eNew ); }
+ { SetValue( (sal_uInt16)eNew ); }
};
#endif // #ifndef _SVX_EMPHITEM_HXX
diff --git a/editeng/inc/editeng/escpitem.hxx b/editeng/inc/editeng/escpitem.hxx
index 7c472684e1..59f66e798e 100644..100755
--- a/editeng/inc/editeng/escpitem.hxx
+++ b/editeng/inc/editeng/escpitem.hxx
@@ -56,15 +56,15 @@ namespace rtl
class EDITENG_DLLPUBLIC SvxEscapementItem : public SfxEnumItemInterface
{
short nEsc;
- BYTE nProp;
+ sal_uInt8 nProp;
public:
TYPEINFO();
- SvxEscapementItem( const USHORT nId );
+ SvxEscapementItem( const sal_uInt16 nId );
SvxEscapementItem( const SvxEscapement eEscape,
- const USHORT nId );
- SvxEscapementItem( const short nEsc, const BYTE nProp,
- const USHORT nId );
+ const sal_uInt16 nId );
+ SvxEscapementItem( const short nEsc, const sal_uInt8 nProp,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -73,12 +73,12 @@ public:
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 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 SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
inline void SetEscapement( const SvxEscapement eNew )
{
@@ -95,8 +95,8 @@ public:
inline short &GetEsc() { return nEsc; }
inline short GetEsc() const { return nEsc; }
- inline BYTE &GetProp() { return nProp; }
- inline BYTE GetProp() const { return nProp; }
+ inline sal_uInt8 &GetProp() { return nProp; }
+ inline sal_uInt8 GetProp() const { return nProp; }
inline SvxEscapementItem& operator=(const SvxEscapementItem& rEsc)
{
@@ -105,10 +105,10 @@ public:
return *this;
}
- virtual USHORT GetValueCount() const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetEnumValue() const;
- virtual void SetEnumValue( USHORT nNewVal );
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetEnumValue() const;
+ virtual void SetEnumValue( sal_uInt16 nNewVal );
};
#endif
diff --git a/editeng/inc/editeng/fhgtitem.hxx b/editeng/inc/editeng/fhgtitem.hxx
index 0496cebe8a..cd847d4f4f 100644..100755
--- a/editeng/inc/editeng/fhgtitem.hxx
+++ b/editeng/inc/editeng/fhgtitem.hxx
@@ -48,24 +48,24 @@ namespace rtl
This item describes the font height
*/
-#define FONTHEIGHT_16_VERSION ((USHORT)0x0001)
-#define FONTHEIGHT_UNIT_VERSION ((USHORT)0x0002)
+#define FONTHEIGHT_16_VERSION ((sal_uInt16)0x0001)
+#define FONTHEIGHT_UNIT_VERSION ((sal_uInt16)0x0002)
class EDITENG_DLLPUBLIC SvxFontHeightItem : public SfxPoolItem
{
- UINT32 nHeight;
- USHORT nProp; // default 100%
+ sal_uInt32 nHeight;
+ sal_uInt16 nProp; // default 100%
SfxMapUnit ePropUnit; // Percent, Twip, ...
public:
TYPEINFO();
- SvxFontHeightItem( const ULONG nSz /*= 240*/, const USHORT nPropHeight /*= 100*/,
- const USHORT nId );
+ SvxFontHeightItem( const sal_uLong nSz /*= 240*/, const sal_uInt16 nPropHeight /*= 100*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -73,11 +73,11 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual USHORT GetVersion( USHORT nItemVersion) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nItemVersion) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize)
{
@@ -86,21 +86,21 @@ public:
return *this;
}
- void SetHeight( UINT32 nNewHeight, const USHORT nNewProp = 100,
+ void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100,
SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE );
- void SetHeight( UINT32 nNewHeight, USHORT nNewProp,
+ void SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp,
SfxMapUnit eUnit, SfxMapUnit eCoreUnit );
- UINT32 GetHeight() const { return nHeight; }
+ sal_uInt32 GetHeight() const { return nHeight; }
- void SetHeightValue( UINT32 nNewHeight )
+ void SetHeightValue( sal_uInt32 nNewHeight )
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nHeight = nNewHeight;
}
- void SetProp( const USHORT nNewProp,
+ void SetProp( const sal_uInt16 nNewProp,
SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE )
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
@@ -108,7 +108,7 @@ public:
ePropUnit = eUnit;
}
- USHORT GetProp() const { return nProp; }
+ sal_uInt16 GetProp() const { return nProp; }
SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ...
};
diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx
index 94d47ae2fe..4f5cacee09 100644..100755
--- a/editeng/inc/editeng/flditem.hxx
+++ b/editeng/inc/editeng/flditem.hxx
@@ -69,19 +69,19 @@ class EDITENG_DLLPUBLIC SvxFieldItem : public SfxPoolItem
private:
SvxFieldData* pField;
- EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const USHORT nId );
+ EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const sal_uInt16 nId );
public:
TYPEINFO();
- SvxFieldItem( const SvxFieldData& rField, const USHORT nId );
+ SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId );
SvxFieldItem( const SvxFieldItem& rItem );
~SvxFieldItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nVer ) const;
- virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVer ) const;
+ virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
const SvxFieldData* GetField() const { return pField; }
static SvClassManager& GetClassManager();
diff --git a/editeng/inc/editeng/flstitem.hxx b/editeng/inc/editeng/flstitem.hxx
index 976a6aee78..82b268d537 100644..100755
--- a/editeng/inc/editeng/flstitem.hxx
+++ b/editeng/inc/editeng/flstitem.hxx
@@ -56,13 +56,13 @@ public:
TYPEINFO();
SvxFontListItem( const FontList* pFontLst,
- const USHORT nId );
+ const sal_uInt16 nId );
SvxFontListItem( const SvxFontListItem& rItem );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 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;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx
index 4d0a53522b..b133626bf9 100644..100755
--- a/editeng/inc/editeng/fontitem.hxx
+++ b/editeng/inc/editeng/fontitem.hxx
@@ -56,25 +56,25 @@ class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
FontPitch ePitch;
rtl_TextEncoding eTextEncoding;
- static BOOL bEnableStoreUnicodeNames;
+ static sal_Bool bEnableStoreUnicodeNames;
public:
TYPEINFO();
- SvxFontItem( const USHORT nId );
+ SvxFontItem( const sal_uInt16 nId );
SvxFontItem( const FontFamily eFam, const String& rFamilyName,
const String& rStyleName,
const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) 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 SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ 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,
@@ -107,7 +107,7 @@ public:
return *this;
}
- static void EnableStoreUnicodeNames( BOOL bEnable );
+ static void EnableStoreUnicodeNames( sal_Bool bEnable );
};
diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx
index 477274f98b..e933033d99 100644..100755
--- a/editeng/inc/editeng/forbiddencharacterstable.hxx
+++ b/editeng/inc/editeng/forbiddencharacterstable.hxx
@@ -46,7 +46,7 @@ namespace lang {
struct ForbiddenCharactersInfo
{
com::sun::star::i18n::ForbiddenCharacters aForbiddenChars;
- BOOL bTemporary;
+ sal_Bool bTemporary;
};
DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* )
@@ -57,12 +57,12 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
public:
- SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize = 4, USHORT nGrow = 4 );
+ SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize = 4, sal_uInt16 nGrow = 4 );
~SvxForbiddenCharactersTable();
- const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( USHORT nLanuage, BOOL bGetDefault ) const;
- void SetForbiddenCharacters( USHORT nLanuage , const com::sun::star::i18n::ForbiddenCharacters& );
- void ClearForbiddenCharacters( USHORT nLanuage );
+ const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( sal_uInt16 nLanuage, sal_Bool bGetDefault ) const;
+ void SetForbiddenCharacters( sal_uInt16 nLanuage , const com::sun::star::i18n::ForbiddenCharacters& );
+ void ClearForbiddenCharacters( sal_uInt16 nLanuage );
};
#endif // _FORBIDDENCHARACTERSTABLE_HXX
diff --git a/editeng/inc/editeng/forbiddenruleitem.hxx b/editeng/inc/editeng/forbiddenruleitem.hxx
index f1fb7fd37b..53a9137cf9 100644..100755
--- a/editeng/inc/editeng/forbiddenruleitem.hxx
+++ b/editeng/inc/editeng/forbiddenruleitem.hxx
@@ -49,8 +49,8 @@ public:
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/frmdir.hxx b/editeng/inc/editeng/frmdir.hxx
index a2006b6be9..a2006b6be9 100644..100755
--- a/editeng/inc/editeng/frmdir.hxx
+++ b/editeng/inc/editeng/frmdir.hxx
diff --git a/editeng/inc/editeng/frmdiritem.hxx b/editeng/inc/editeng/frmdiritem.hxx
index 1420ee4b6a..b9cf24747f 100644..100755
--- a/editeng/inc/editeng/frmdiritem.hxx
+++ b/editeng/inc/editeng/frmdiritem.hxx
@@ -48,15 +48,15 @@ class EDITENG_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item
public:
TYPEINFO();
- SvxFrameDirectionItem( USHORT nWhich );
+ SvxFrameDirectionItem( sal_uInt16 nWhich );
SvxFrameDirectionItem( SvxFrameDirection nValue /*= FRMDIR_HORI_LEFT_TOP*/,
- USHORT nWhich );
+ sal_uInt16 nWhich );
virtual ~SvxFrameDirectionItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -65,10 +65,8 @@ public:
String &rText,
const IntlWrapper * = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const;
+ 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 SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem )
{
diff --git a/editeng/inc/editeng/fwdtitem.hxx b/editeng/inc/editeng/fwdtitem.hxx
index 296820db39..9fbdf7dee0 100644..100755
--- a/editeng/inc/editeng/fwdtitem.hxx
+++ b/editeng/inc/editeng/fwdtitem.hxx
@@ -44,19 +44,19 @@
class SvxFontWidthItem : public SfxPoolItem
{
- UINT16 nWidth; // 0 = default
- USHORT nProp; // default 100%
+ sal_uInt16 nWidth; // 0 = default
+ sal_uInt16 nProp; // default 100%
public:
TYPEINFO();
- SvxFontWidthItem( const USHORT nSz /*= 0*/,
- const USHORT nPropWidth /*= 100*/,
- const USHORT nId );
+ SvxFontWidthItem( const sal_uInt16 nSz /*= 0*/,
+ const sal_uInt16 nPropWidth /*= 100*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -64,10 +64,10 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
inline SvxFontWidthItem& operator=(const SvxFontWidthItem& rItem )
{
@@ -76,28 +76,28 @@ public:
return *this;
}
- void SetWidth( UINT16 nNewWidth, const USHORT nNewProp = 100 )
+ void SetWidth( sal_uInt16 nNewWidth, const sal_uInt16 nNewProp = 100 )
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
- nWidth = UINT16(( (UINT32)nNewWidth * nNewProp ) / 100 );
+ nWidth = sal_uInt16(( (sal_uInt32)nNewWidth * nNewProp ) / 100 );
nProp = nNewProp;
}
- UINT16 GetWidth() const { return nWidth; }
+ sal_uInt16 GetWidth() const { return nWidth; }
- void SetWidthValue( UINT16 nNewWidth )
+ void SetWidthValue( sal_uInt16 nNewWidth )
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nWidth = nNewWidth;
}
- void SetProp( const USHORT nNewProp )
+ void SetProp( const sal_uInt16 nNewProp )
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nProp = nNewProp;
}
- USHORT GetProp() const { return nProp; }
+ sal_uInt16 GetProp() const { return nProp; }
};
diff --git a/editeng/inc/editeng/hangulhanja.hxx b/editeng/inc/editeng/hangulhanja.hxx
index 15a80b5e8c..15a80b5e8c 100644..100755
--- a/editeng/inc/editeng/hangulhanja.hxx
+++ b/editeng/inc/editeng/hangulhanja.hxx
diff --git a/editeng/inc/editeng/hngpnctitem.hxx b/editeng/inc/editeng/hngpnctitem.hxx
index 4dcafd2845..a6a12c9611 100644..100755
--- a/editeng/inc/editeng/hngpnctitem.hxx
+++ b/editeng/inc/editeng/hngpnctitem.hxx
@@ -49,8 +49,8 @@ public:
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx
index 07bb874df8..19f62c48bc 100644..100755
--- a/editeng/inc/editeng/hyznitem.hxx
+++ b/editeng/inc/editeng/hyznitem.hxx
@@ -49,24 +49,24 @@ namespace rtl
class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem
{
- BOOL bHyphen: 1;
- BOOL bPageEnd: 1;
- BYTE nMinLead;
- BYTE nMinTrail;
- BYTE nMaxHyphens;
+ sal_Bool bHyphen: 1;
+ sal_Bool bPageEnd: 1;
+ sal_uInt8 nMinLead;
+ sal_uInt8 nMinTrail;
+ sal_uInt8 nMaxHyphens;
friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & );
public:
TYPEINFO();
- SvxHyphenZoneItem( const BOOL bHyph /*= FALSE*/,
- const USHORT nId );
+ SvxHyphenZoneItem( const sal_Bool bHyph /*= sal_False*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -74,23 +74,23 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
- inline void SetHyphen( const BOOL bNew ) { bHyphen = bNew; }
- inline BOOL IsHyphen() const { return bHyphen; }
+ inline void SetHyphen( const sal_Bool bNew ) { bHyphen = bNew; }
+ inline sal_Bool IsHyphen() const { return bHyphen; }
- inline void SetPageEnd( const BOOL bNew ) { bPageEnd = bNew; }
- inline BOOL IsPageEnd() const { return bPageEnd; }
+ inline void SetPageEnd( const sal_Bool bNew ) { bPageEnd = bNew; }
+ inline sal_Bool IsPageEnd() const { return bPageEnd; }
- inline BYTE &GetMinLead() { return nMinLead; }
- inline BYTE GetMinLead() const { return nMinLead; }
+ inline sal_uInt8 &GetMinLead() { return nMinLead; }
+ inline sal_uInt8 GetMinLead() const { return nMinLead; }
- inline BYTE &GetMinTrail() { return nMinTrail; }
- inline BYTE GetMinTrail() const { return nMinTrail; }
+ inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
+ inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
- inline BYTE &GetMaxHyphens() { return nMaxHyphens; }
- inline BYTE GetMaxHyphens() const { return nMaxHyphens; }
+ inline sal_uInt8 &GetMaxHyphens() { return nMaxHyphens; }
+ inline sal_uInt8 GetMaxHyphens() const { return nMaxHyphens; }
inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew )
{
diff --git a/editeng/inc/editeng/itemtype.hxx b/editeng/inc/editeng/itemtype.hxx
index 8dd7edb220..77c5f41db3 100644..100755
--- a/editeng/inc/editeng/itemtype.hxx
+++ b/editeng/inc/editeng/itemtype.hxx
@@ -49,14 +49,14 @@ class IntlWrapper;
static const sal_Unicode cDelim = ',';
static const sal_Unicode cpDelim[] = { ',' , ' ', '\0' };
-EDITENG_DLLPUBLIC String GetSvxString( USHORT nId );
+EDITENG_DLLPUBLIC String GetSvxString( sal_uInt16 nId );
EDITENG_DLLPUBLIC String GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper * pIntl );
String GetColorString( const Color& rCol );
-EDITENG_DLLPUBLIC USHORT GetMetricId( SfxMapUnit eUnit );
+EDITENG_DLLPUBLIC sal_uInt16 GetMetricId( SfxMapUnit eUnit );
// -----------------------------------------------------------------------
-inline String GetBoolString( BOOL bVal )
+inline String GetBoolString( sal_Bool bVal )
{
return String( EditResId( bVal ? RID_SVXITEMS_TRUE : RID_SVXITEMS_FALSE ) );
}
diff --git a/editeng/inc/editeng/justifyitem.hxx b/editeng/inc/editeng/justifyitem.hxx
index d6046073b1..67f8dc2e0e 100644..100755
--- a/editeng/inc/editeng/justifyitem.hxx
+++ b/editeng/inc/editeng/justifyitem.hxx
@@ -39,24 +39,24 @@ class EDITENG_DLLPUBLIC SvxHorJustifyItem: public SfxEnumItem
public:
TYPEINFO();
- SvxHorJustifyItem( const USHORT nId );
+ SvxHorJustifyItem( const sal_uInt16 nId );
SvxHorJustifyItem(
const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/,
- const USHORT nId );
+ const sal_uInt16 nId );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 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 USHORT GetValueCount() const;
- virtual String GetValueText( USHORT nVal ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const;
+ virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const;
inline SvxHorJustifyItem& operator=(const SvxHorJustifyItem& rHorJustify)
{
@@ -72,24 +72,24 @@ class EDITENG_DLLPUBLIC SvxVerJustifyItem: public SfxEnumItem
public:
TYPEINFO();
- SvxVerJustifyItem( const USHORT nId );
+ SvxVerJustifyItem( const sal_uInt16 nId );
SvxVerJustifyItem(
const SvxCellVerJustify eJustify /*= SVX_VER_JUSTIFY_STANDARD*/,
- const USHORT nId );
+ const sal_uInt16 nId );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 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 USHORT GetValueCount() const;
- virtual String GetValueText( USHORT nVal ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const;
+ virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const;
inline SvxVerJustifyItem& operator=(const SvxVerJustifyItem& rVerJustify)
{
@@ -103,24 +103,24 @@ public:
class EDITENG_DLLPUBLIC SvxJustifyMethodItem: public SfxEnumItem
{
public:
- SvxJustifyMethodItem( const USHORT nId );
+ SvxJustifyMethodItem( const sal_uInt16 nId );
SvxJustifyMethodItem(
const SvxCellJustifyMethod eMethod,
- const USHORT nId );
+ const sal_uInt16 nId );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 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 USHORT GetValueCount() const;
- virtual String GetValueText( USHORT nVal ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueText( sal_uInt16 nVal ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const;
+ virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const;
SvxJustifyMethodItem& operator=(const SvxJustifyMethodItem& r);
};
diff --git a/editeng/inc/editeng/keepitem.hxx b/editeng/inc/editeng/keepitem.hxx
index 2d942c68e8..8c986fb7ae 100644..100755
--- a/editeng/inc/editeng/keepitem.hxx
+++ b/editeng/inc/editeng/keepitem.hxx
@@ -50,14 +50,14 @@ class EDITENG_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem
public:
TYPEINFO();
- inline SvxFmtKeepItem( const BOOL bKeep /*= FALSE*/,
- const USHORT _nWhich );
+ inline SvxFmtKeepItem( const sal_Bool bKeep /*= sal_False*/,
+ const sal_uInt16 _nWhich );
inline SvxFmtKeepItem& operator=( const SvxFmtKeepItem& rSplit );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
- virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const;
+ virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -65,7 +65,7 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
};
-inline SvxFmtKeepItem::SvxFmtKeepItem( const BOOL bKeep, const USHORT _nWhich ) :
+inline SvxFmtKeepItem::SvxFmtKeepItem( const sal_Bool bKeep, const sal_uInt16 _nWhich ) :
SfxBoolItem( _nWhich, bKeep )
{}
diff --git a/editeng/inc/editeng/kernitem.hxx b/editeng/inc/editeng/kernitem.hxx
index ba958cc83c..0a69842998 100644..100755
--- a/editeng/inc/editeng/kernitem.hxx
+++ b/editeng/inc/editeng/kernitem.hxx
@@ -54,14 +54,14 @@ class EDITENG_DLLPUBLIC SvxKerningItem : public SfxInt16Item
public:
TYPEINFO();
- SvxKerningItem( const short nKern /*= 0*/, const USHORT nId );
+ SvxKerningItem( const short nKern /*= 0*/, const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -73,8 +73,8 @@ public:
return *this;
}
- 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 );
};
#endif
diff --git a/editeng/inc/editeng/langitem.hxx b/editeng/inc/editeng/langitem.hxx
index 5255e467a0..f01a7733fa 100644..100755
--- a/editeng/inc/editeng/langitem.hxx
+++ b/editeng/inc/editeng/langitem.hxx
@@ -53,7 +53,7 @@ public:
TYPEINFO();
SvxLanguageItem( const LanguageType eLang /*= LANGUAGE_GERMAN*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -62,9 +62,9 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual USHORT GetValueCount() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual sal_uInt16 GetValueCount() const;
inline SvxLanguageItem& operator=(const SvxLanguageItem& rLang)
{
@@ -76,9 +76,9 @@ public:
LanguageType GetLanguage() const
{ return (LanguageType)GetValue(); }
void SetLanguage( const LanguageType eLang )
- { SetValue( (USHORT)eLang ); }
- 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 );
+ { SetValue( (sal_uInt16)eLang ); }
+ 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 );
};
#endif
diff --git a/editeng/inc/editeng/lcolitem.hxx b/editeng/inc/editeng/lcolitem.hxx
index 17b070dd0c..0108f35808 100644..100755
--- a/editeng/inc/editeng/lcolitem.hxx
+++ b/editeng/inc/editeng/lcolitem.hxx
@@ -43,9 +43,9 @@ class EDITENG_DLLPUBLIC SvxLineColorItem : public SvxColorItem
public:
TYPEINFO();
- SvxLineColorItem( const USHORT nId );
- SvxLineColorItem( const Color& aColor, const USHORT nId );
- SvxLineColorItem( SvStream& rStrm, const USHORT nId );
+ SvxLineColorItem( const sal_uInt16 nId );
+ SvxLineColorItem( const Color& aColor, const sal_uInt16 nId );
+ SvxLineColorItem( SvStream& rStrm, const sal_uInt16 nId );
SvxLineColorItem( const SvxLineColorItem& rCopy );
~SvxLineColorItem();
diff --git a/editeng/inc/editeng/lrspitem.hxx b/editeng/inc/editeng/lrspitem.hxx
index 1b5a6c5393..68a9fa5ba9 100644..100755
--- a/editeng/inc/editeng/lrspitem.hxx
+++ b/editeng/inc/editeng/lrspitem.hxx
@@ -58,37 +58,37 @@ namespace rtl
700 -500 200 700 -500
*/
-#define LRSPACE_16_VERSION ((USHORT)0x0001)
-#define LRSPACE_TXTLEFT_VERSION ((USHORT)0x0002)
-#define LRSPACE_AUTOFIRST_VERSION ((USHORT)0x0003)
-#define LRSPACE_NEGATIVE_VERSION ((USHORT)0x0004)
+#define LRSPACE_16_VERSION ((sal_uInt16)0x0001)
+#define LRSPACE_TXTLEFT_VERSION ((sal_uInt16)0x0002)
+#define LRSPACE_AUTOFIRST_VERSION ((sal_uInt16)0x0003)
+#define LRSPACE_NEGATIVE_VERSION ((sal_uInt16)0x0004)
class EDITENG_DLLPUBLIC SvxLRSpaceItem : public SfxPoolItem
{
short nFirstLineOfst; // First-line indent _always_ relative to nTxtLeft
- long nTxtLeft; // We spend a USHORT
+ long nTxtLeft; // We spend a sal_uInt16
long nLeftMargin; // nLeft or the negative first-line indent
long nRightMargin; // The unproblematic right edge
- USHORT nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin;
- BOOL bAutoFirst : 1; // Automatic calculation of the first line indent
+ sal_uInt16 nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin;
+ sal_Bool bAutoFirst : 1; // Automatic calculation of the first line indent
void AdjustLeft(); // nLeftMargin and nTxtLeft are being adjusted.
public:
TYPEINFO();
- SvxLRSpaceItem( const USHORT nId );
+ SvxLRSpaceItem( const sal_uInt16 nId );
SvxLRSpaceItem( const long nLeft, const long nRight,
const long nTLeft /*= 0*/, const short nOfset /*= 0*/,
- const USHORT nId );
+ const sal_uInt16 nId );
inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -96,41 +96,41 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
- // The Layout Interface:
- inline void SetLeft ( const long nL, const USHORT nProp = 100 );
- inline void SetRight( const long nR, const USHORT nProp = 100 );
+ // Die "Layout-Schnittstelle":
+ inline void SetLeft ( const long nL, const sal_uInt16 nProp = 100 );
+ inline void SetRight( const long nR, const sal_uInt16 nProp = 100 );
// Query/direct setting of the absolute values
inline long GetLeft() const { return nLeftMargin; }
inline long GetRight() const { return nRightMargin;}
inline void SetLeftValue( const long nL ) { nTxtLeft = nLeftMargin = nL; }
inline void SetRightValue( const long nR ) { nRightMargin = nR; }
- inline BOOL IsAutoFirst() const { return bAutoFirst; }
- inline void SetAutoFirst( const BOOL bNew ) { bAutoFirst = bNew; }
+ inline sal_Bool IsAutoFirst() const { return bAutoFirst; }
+ inline void SetAutoFirst( const sal_Bool bNew ) { bAutoFirst = bNew; }
// Query/Setting the percentage values
- inline void SetPropLeft( const USHORT nProp = 100 )
+ inline void SetPropLeft( const sal_uInt16 nProp = 100 )
{ nPropLeftMargin = nProp; }
- inline void SetPropRight( const USHORT nProp = 100 )
+ inline void SetPropRight( const sal_uInt16 nProp = 100 )
{ nPropRightMargin = nProp;}
- inline USHORT GetPropLeft() const { return nPropLeftMargin; }
- inline USHORT GetPropRight() const { return nPropRightMargin;}
+ inline sal_uInt16 GetPropLeft() const { return nPropLeftMargin; }
+ inline sal_uInt16 GetPropRight() const { return nPropRightMargin;}
// The UI/text interface:
- inline void SetTxtLeft( const long nL, const USHORT nProp = 100 );
+ inline void SetTxtLeft( const long nL, const sal_uInt16 nProp = 100 );
inline long GetTxtLeft() const { return nTxtLeft; }
- inline void SetTxtFirstLineOfst( const short nF, const USHORT nProp = 100 );
+ inline void SetTxtFirstLineOfst( const short nF, const sal_uInt16 nProp = 100 );
inline short GetTxtFirstLineOfst() const { return nFirstLineOfst; }
- inline void SetPropTxtFirstLineOfst( const USHORT nProp = 100 )
+ inline void SetPropTxtFirstLineOfst( const sal_uInt16 nProp = 100 )
{ nPropFirstLineOfst = nProp; }
- inline USHORT GetPropTxtFirstLineOfst() const
+ inline sal_uInt16 GetPropTxtFirstLineOfst() const
{ return nPropFirstLineOfst; }
inline void SetTxtFirstLineOfstValue( const short nValue )
{ nFirstLineOfst = nValue; }
@@ -149,26 +149,26 @@ inline SvxLRSpaceItem &SvxLRSpaceItem::operator=( const SvxLRSpaceItem &rCpy )
return *this;
}
-inline void SvxLRSpaceItem::SetLeft( const long nL, const USHORT nProp )
+inline void SvxLRSpaceItem::SetLeft( const long nL, const sal_uInt16 nProp )
{
nLeftMargin = (nL * nProp) / 100;
nTxtLeft = nLeftMargin;
nPropLeftMargin = nProp;
}
-inline void SvxLRSpaceItem::SetRight( const long nR, const USHORT nProp )
+inline void SvxLRSpaceItem::SetRight( const long nR, const sal_uInt16 nProp )
{
nRightMargin = (nR * nProp) / 100;
nPropRightMargin = nProp;
}
inline void SvxLRSpaceItem::SetTxtFirstLineOfst( const short nF,
- const USHORT nProp )
+ const sal_uInt16 nProp )
{
nFirstLineOfst = short((long(nF) * nProp ) / 100);
nPropFirstLineOfst = nProp;
AdjustLeft();
}
-inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const USHORT nProp )
+inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const sal_uInt16 nProp )
{
nTxtLeft = (nL * nProp) / 100;
nPropLeftMargin = nProp;
diff --git a/editeng/inc/editeng/lspcitem.hxx b/editeng/inc/editeng/lspcitem.hxx
index a5db017fd2..bd60901d3f 100644..100755
--- a/editeng/inc/editeng/lspcitem.hxx
+++ b/editeng/inc/editeng/lspcitem.hxx
@@ -52,8 +52,8 @@ class EDITENG_DLLPUBLIC SvxLineSpacingItem : public SfxEnumItemInterface
friend SvStream& operator<<( SvStream&, SvxLineSpacingItem& ); //$ ostream
short nInterLineSpace;
- USHORT nLineHeight;
- BYTE nPropLineSpace;
+ sal_uInt16 nLineHeight;
+ sal_uInt8 nPropLineSpace;
SvxLineSpace eLineSpace;
SvxInterLineSpace eInterLineSpace;
@@ -65,12 +65,12 @@ public:
// writer? => Rather have a crooked vales as the default, but the
// programmer sees that there's something special happening.
- SvxLineSpacingItem( USHORT nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const USHORT nId );
+ SvxLineSpacingItem( sal_uInt16 nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -78,8 +78,8 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
// Methods to query and edit. InterlineSpace is added to the height.
inline short GetInterLineSpace() const { return nInterLineSpace; }
@@ -90,16 +90,16 @@ public:
}
// Determines the absolute or minimum row height.
- inline USHORT GetLineHeight() const { return nLineHeight; }
- inline void SetLineHeight( const USHORT nHeight )
+ inline sal_uInt16 GetLineHeight() const { return nLineHeight; }
+ inline void SetLineHeight( const sal_uInt16 nHeight )
{
nLineHeight = nHeight;
eLineSpace = SVX_LINE_SPACE_MIN;
}
// To increase or decrease the row height.
- BYTE GetPropLineSpace() const { return nPropLineSpace; }
- inline void SetPropLineSpace( const BYTE nProp )
+ sal_uInt8 GetPropLineSpace() const { return nPropLineSpace; }
+ inline void SetPropLineSpace( const sal_uInt8 nProp )
{
nPropLineSpace = nProp;
eInterLineSpace = SVX_INTER_LINE_SPACE_PROP;
@@ -111,10 +111,10 @@ public:
inline SvxInterLineSpace &GetInterLineSpaceRule() { return eInterLineSpace; }
inline SvxInterLineSpace GetInterLineSpaceRule() const { return eInterLineSpace; }
- virtual USHORT GetValueCount() const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetEnumValue() const;
- virtual void SetEnumValue( USHORT nNewVal );
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetEnumValue() const;
+ virtual void SetEnumValue( sal_uInt16 nNewVal );
};
#endif
diff --git a/editeng/inc/editeng/measfld.hxx b/editeng/inc/editeng/measfld.hxx
index 904d8bdf03..904d8bdf03 100644..100755
--- a/editeng/inc/editeng/measfld.hxx
+++ b/editeng/inc/editeng/measfld.hxx
diff --git a/editeng/inc/editeng/memberids.hrc b/editeng/inc/editeng/memberids.hrc
index e3e57292f8..e3e57292f8 100644..100755
--- a/editeng/inc/editeng/memberids.hrc
+++ b/editeng/inc/editeng/memberids.hrc
diff --git a/editeng/inc/editeng/mutxhelp.hxx b/editeng/inc/editeng/mutxhelp.hxx
index 72cff69e3c..72cff69e3c 100644..100755
--- a/editeng/inc/editeng/mutxhelp.hxx
+++ b/editeng/inc/editeng/mutxhelp.hxx
diff --git a/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx
index b5db3edfba..291af342c4 100644..100755
--- a/editeng/inc/editeng/nhypitem.hxx
+++ b/editeng/inc/editeng/nhypitem.hxx
@@ -39,13 +39,13 @@ class EDITENG_DLLPUBLIC SvxNoHyphenItem : public SfxBoolItem
public:
TYPEINFO();
- SvxNoHyphenItem( const BOOL bHyphen /*= TRUE*/,
- const USHORT nId );
+ SvxNoHyphenItem( const sal_Bool bHyphen /*= sal_True*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx
index 00cb4a5afb..97508edbd3 100644..100755
--- a/editeng/inc/editeng/nlbkitem.hxx
+++ b/editeng/inc/editeng/nlbkitem.hxx
@@ -40,13 +40,13 @@ class EDITENG_DLLPUBLIC SvxNoLinebreakItem : public SfxBoolItem
public:
TYPEINFO();
- SvxNoLinebreakItem( const BOOL bBreak /*= TRUE*/,
- const USHORT nId );
+ SvxNoLinebreakItem( const sal_Bool bBreak /*= sal_True*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/numdef.hxx b/editeng/inc/editeng/numdef.hxx
index 5d997c2891..5d997c2891 100644..100755
--- a/editeng/inc/editeng/numdef.hxx
+++ b/editeng/inc/editeng/numdef.hxx
diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx
index 9c802fd3de..6ffa3c86ee 100644..100755
--- a/editeng/inc/editeng/numitem.hxx
+++ b/editeng/inc/editeng/numitem.hxx
@@ -56,7 +56,7 @@ namespace com{namespace sun{ namespace star{
}}}
// -----------------------------------------------------------------------
-//Feature-Flags (only USHORT!)
+//Feature-Flags (only sal_uInt16!)
#define NUM_CONTINUOUS 0x0001 // consecutive numbers possible?
#define NUM_CHAR_TEXT_DISTANCE 0x0002 // Distance Symbol<->Text?
#define NUM_CHAR_STYLE 0x0004 // Character styles?
@@ -84,8 +84,8 @@ public:
SvxNumberType(const SvxNumberType& rType);
~SvxNumberType();
- String GetNumStr( ULONG nNo ) const;
- String GetNumStr( ULONG nNo, const com::sun::star::lang::Locale& rLocale ) const;
+ String GetNumStr( sal_uLong nNo ) const;
+ String GetNumStr( sal_uLong nNo, const com::sun::star::lang::Locale& rLocale ) const;
void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;}
sal_Int16 GetNumberingType() const {return nNumType;}
@@ -122,11 +122,11 @@ private:
SvxAdjust eNumAdjust;
- BYTE nInclUpperLevels; // Take over numbers from the previous level.
- USHORT nStart; // Start of counting
+ sal_uInt8 nInclUpperLevels; // Take over numbers from the previous level.
+ sal_uInt16 nStart; // Start of counting
sal_Unicode cBullet; // Symbol
- USHORT nBulletRelSize; // percentage size of bullets
+ sal_uInt16 nBulletRelSize; // percentage size of bullets
Color nBulletColor; // Bullet color
// mode indicating, if the position and spacing of the list label is
@@ -178,8 +178,8 @@ public:
SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter);
SvxNumberFormat& operator=( const SvxNumberFormat& );
- BOOL operator==( const SvxNumberFormat& ) const;
- BOOL operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);}
+ sal_Bool operator==( const SvxNumberFormat& ) const;
+ sal_Bool operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);}
void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;}
SvxAdjust GetNumAdjust() const {return eNumAdjust;}
@@ -195,15 +195,15 @@ public:
const Font* GetBulletFont() const {return pBulletFont;}
void SetBulletChar(sal_Unicode cSet){cBullet = cSet;}
sal_Unicode GetBulletChar()const {return cBullet;}
- void SetBulletRelSize(USHORT nSet) {nBulletRelSize = nSet;}
- USHORT GetBulletRelSize() const { return nBulletRelSize;}
+ void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;}
+ sal_uInt16 GetBulletRelSize() const { return nBulletRelSize;}
void SetBulletColor(Color nSet){nBulletColor = nSet;}
Color GetBulletColor()const {return nBulletColor;}
- void SetIncludeUpperLevels( BYTE nSet ) { nInclUpperLevels = nSet;}
- BYTE GetIncludeUpperLevels()const { return nInclUpperLevels;}
- void SetStart(USHORT nSet) {nStart = nSet;}
- USHORT GetStart() const {return nStart;}
+ void SetIncludeUpperLevels( sal_uInt8 nSet ) { nInclUpperLevels = nSet;}
+ sal_uInt8 GetIncludeUpperLevels()const { return nInclUpperLevels;}
+ void SetStart(sal_uInt16 nSet) {nStart = nSet;}
+ sal_uInt16 GetStart() const {return nStart;}
virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0);
const SvxBrushItem* GetBrush() const {return pGraphicBrush;}
@@ -235,7 +235,7 @@ public:
long GetIndentAt() const;
static Size GetGraphicSizeMM100(const Graphic* pGraphic);
- static String CreateRomanString( ULONG nNo, BOOL bUpper );
+ static String CreateRomanString( sal_uLong nNo, sal_Bool bUpper );
};
enum SvxNumRuleType
@@ -248,20 +248,20 @@ enum SvxNumRuleType
class EDITENG_DLLPUBLIC SvxNumRule
{
- USHORT nLevelCount; // Number of supported levels
- ULONG nFeatureFlags; // What is supported?
+ sal_uInt16 nLevelCount; // Number of supported levels
+ sal_uInt32 nFeatureFlags; // What is supported?
SvxNumRuleType eNumberingType; // Type of numbering
- BOOL bContinuousNumbering; // sequential numbering
+ sal_Bool bContinuousNumbering; // sequential numbering
SvxNumberFormat* aFmts[SVX_MAX_NUM];
- BOOL aFmtsSet[SVX_MAX_NUM]; // Flags indicating valid levels
+ sal_Bool aFmtsSet[SVX_MAX_NUM]; // Flags indicating valid levels
static sal_Int32 nRefCount;
com::sun::star::lang::Locale aLocale;
public:
- SvxNumRule( ULONG nFeatures,
- USHORT nLevels,
- BOOL bCont,
+ SvxNumRule( sal_uLong nFeatures,
+ sal_uInt16 nLevels,
+ sal_Bool bCont,
SvxNumRuleType eType = SVX_RULETYPE_NUMBERING,
SvxNumberFormat::SvxNumPositionAndSpaceMode
eDefaultNumberFormatPositionAndSpaceMode
@@ -277,28 +277,28 @@ public:
SvStream& Store(SvStream &rStream);
- const SvxNumberFormat* Get(USHORT nLevel)const;
- const SvxNumberFormat& GetLevel(USHORT nLevel)const;
- void SetLevel(USHORT nLevel, const SvxNumberFormat& rFmt, BOOL bIsValid = TRUE);
- void SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt);
+ const SvxNumberFormat* Get(sal_uInt16 nLevel)const;
+ const SvxNumberFormat& GetLevel(sal_uInt16 nLevel)const;
+ void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, sal_Bool bIsValid = sal_True);
+ void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt);
- BOOL IsContinuousNumbering()const
+ sal_Bool IsContinuousNumbering()const
{return bContinuousNumbering;}
- void SetContinuousNumbering(BOOL bSet)
+ void SetContinuousNumbering(sal_Bool bSet)
{bContinuousNumbering = bSet;}
- USHORT GetLevelCount() const {return nLevelCount;}
- BOOL IsFeatureSupported(ULONG nFeature) const
+ sal_uInt16 GetLevelCount() const {return nLevelCount;}
+ sal_Bool IsFeatureSupported(sal_uInt32 nFeature) const
{return 0 != (nFeatureFlags & nFeature);}
- ULONG GetFeatureFlags() const {return nFeatureFlags;}
- void SetFeatureFlag( ULONG nFlag, BOOL bSet = TRUE ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
+ sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;}
+ void SetFeatureFlag( sal_uInt32 nFlag, sal_Bool bSet = sal_True ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
- String MakeNumString( const SvxNodeNum&, BOOL bInclStrings = TRUE ) const;
+ String MakeNumString( const SvxNodeNum&, sal_Bool bInclStrings = sal_True ) const;
SvxNumRuleType GetNumRuleType() const { return eNumberingType; }
void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; }
- BOOL UnLinkGraphics();
+ sal_Bool UnLinkGraphics();
};
class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem
@@ -306,48 +306,48 @@ class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem
SvxNumRule* pNumRule;
public:
SvxNumBulletItem(SvxNumRule& rRule);
- SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich );
+ SvxNumBulletItem(SvxNumRule& rRule, sal_uInt16 nWhich );
SvxNumBulletItem(const SvxNumBulletItem& rCopy);
virtual ~SvxNumBulletItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- USHORT GetVersion( USHORT nFileVersion ) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
virtual int operator==( const SfxPoolItem& ) const;
SvxNumRule* GetNumRule() const {return pNumRule;}
- 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 SvxNodeNum
{
- USHORT nLevelVal[ SVX_MAX_NUM ]; // Numbers of all levels
- USHORT nSetValue; // predetermined number
- BYTE nMyLevel; // Current Level
- BOOL bStartNum; // Restart numbering
+ sal_uInt16 nLevelVal[ SVX_MAX_NUM ]; // Numbers of all levels
+ sal_uInt16 nSetValue; // predetermined number
+ sal_uInt8 nMyLevel; // Current Level
+ sal_Bool bStartNum; // Restart numbering
public:
- inline SvxNodeNum( BYTE nLevel = SVX_NO_NUM, USHORT nSetVal = USHRT_MAX );
+ inline SvxNodeNum( sal_uInt8 nLevel = SVX_NO_NUM, sal_uInt16 nSetVal = USHRT_MAX );
inline SvxNodeNum& operator=( const SvxNodeNum& rCpy );
- BYTE GetLevel() const { return nMyLevel; }
- void SetLevel( BYTE nVal ) { nMyLevel = nVal; }
+ sal_uInt8 GetLevel() const { return nMyLevel; }
+ void SetLevel( sal_uInt8 nVal ) { nMyLevel = nVal; }
- BOOL IsStart() const { return bStartNum; }
- void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; }
+ sal_Bool IsStart() const { return bStartNum; }
+ void SetStart( sal_Bool bFlag = sal_True ) { bStartNum = bFlag; }
- USHORT GetSetValue() const { return nSetValue; }
- void SetSetValue( USHORT nVal ) { nSetValue = nVal; }
+ sal_uInt16 GetSetValue() const { return nSetValue; }
+ void SetSetValue( sal_uInt16 nVal ) { nSetValue = nVal; }
- const USHORT* GetLevelVal() const { return nLevelVal; }
- USHORT* GetLevelVal() { return nLevelVal; }
+ const sal_uInt16* GetLevelVal() const { return nLevelVal; }
+ sal_uInt16* GetLevelVal() { return nLevelVal; }
};
-SvxNodeNum::SvxNodeNum( BYTE nLevel, USHORT nSetVal )
- : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( FALSE )
+SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal )
+ : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( sal_False )
{
memset( nLevelVal, 0, sizeof( nLevelVal ) );
}
@@ -362,8 +362,7 @@ inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy )
return *this;
}
-
-SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRuleType eType );
+SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevel, SvxNumRuleType eType );
#endif
diff --git a/editeng/inc/editeng/opaqitem.hxx b/editeng/inc/editeng/opaqitem.hxx
index 204becbc03..5676b47ddd 100644..100755
--- a/editeng/inc/editeng/opaqitem.hxx
+++ b/editeng/inc/editeng/opaqitem.hxx
@@ -52,13 +52,13 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem
public:
TYPEINFO();
- SvxOpaqueItem( const USHORT nId , const BOOL bOpa = TRUE );
+ SvxOpaqueItem( const sal_uInt16 nId , const sal_Bool bOpa = sal_True );
inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -66,7 +66,7 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
};
-inline SvxOpaqueItem::SvxOpaqueItem( const USHORT nId, const BOOL bOpa )
+inline SvxOpaqueItem::SvxOpaqueItem( const sal_uInt16 nId, const sal_Bool bOpa )
: SfxBoolItem( nId, bOpa )
{}
diff --git a/editeng/inc/editeng/optitems.hxx b/editeng/inc/editeng/optitems.hxx
index fc4e23d040..fc4e23d040 100644..100755
--- a/editeng/inc/editeng/optitems.hxx
+++ b/editeng/inc/editeng/optitems.hxx
diff --git a/editeng/inc/editeng/orphitem.hxx b/editeng/inc/editeng/orphitem.hxx
index c6d7b57088..2d61bfcf7a 100644..100755
--- a/editeng/inc/editeng/orphitem.hxx
+++ b/editeng/inc/editeng/orphitem.hxx
@@ -52,12 +52,12 @@ class EDITENG_DLLPUBLIC SvxOrphansItem: public SfxByteItem
public:
TYPEINFO();
- SvxOrphansItem( const BYTE nL /*= 0*/, const USHORT nId );
+ SvxOrphansItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index c80fe91d73..9970a8d76f 100644..100755
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -74,10 +74,15 @@ class SfxItemSet;
class SvxNumBulletItem;
class SvxNumberFormat;
class SvxLRSpaceItem;
-class SfxUndoManager;
class EditEngine;
class SvKeyValueIterator;
class SvxForbiddenCharactersTable;
+
+namespace svl
+{
+ class IUndoManager;
+}
+
#include <com/sun/star/uno/Reference.h>
#include <rtl/ref.hxx>
@@ -131,12 +136,12 @@ private:
Paragraph& operator=(const Paragraph& rPara );
- USHORT nFlags;
+ sal_uInt16 nFlags;
XubString aBulText;
Size aBulSize;
- BOOL bVisible;
+ sal_Bool bVisible;
- BOOL IsVisible() const { return bVisible; }
+ sal_Bool IsVisible() const { return bVisible; }
void SetText( const XubString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
void Invalidate() { aBulSize.Width() = -1; }
void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; }
@@ -155,27 +160,27 @@ private:
sal_Bool IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; }
void SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart );
- void SetFlag( USHORT nFlag ) { nFlags |= nFlag; }
- void RemoveFlag( USHORT nFlag ) { nFlags &= ~nFlag; }
- bool HasFlag( USHORT nFlag ) const { return (nFlags & nFlag) != 0; }
+ void SetFlag( sal_uInt16 nFlag ) { nFlags |= nFlag; }
+ void RemoveFlag( sal_uInt16 nFlag ) { nFlags &= ~nFlag; }
+ bool HasFlag( sal_uInt16 nFlag ) const { return (nFlags & nFlag) != 0; }
};
struct ParaRange
{
- USHORT nStartPara;
- USHORT nEndPara;
+ sal_uInt16 nStartPara;
+ sal_uInt16 nEndPara;
- ParaRange( USHORT nS, USHORT nE ) { nStartPara = nS, nEndPara = nE; }
+ ParaRange( sal_uInt16 nS, sal_uInt16 nE ) { nStartPara = nS, nEndPara = nE; }
void Adjust();
- USHORT Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); }
+ sal_uInt16 Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); }
};
inline void ParaRange::Adjust()
{
if ( nStartPara > nEndPara )
{
- USHORT nTmp = nStartPara;
+ sal_uInt16 nTmp = nStartPara;
nStartPara = nEndPara;
nEndPara = nTmp;
}
@@ -193,18 +198,18 @@ private:
EditView* pEditView;
// Drag & Drop
- BOOL bBeginDragAtMove_OLDMEMBER;
- BOOL bInDragMode;
+ sal_Bool bBeginDragAtMove_OLDMEMBER;
+ sal_Bool bInDragMode;
Point aDDStartPosRef;
Point aDDStartPosPix;
- ULONG nDDStartPara;
- ULONG nDDStartParaVisChildCount;
- ULONG nDDCurPara;
- USHORT nDDStartDepth;
- USHORT nDDCurDepth;
- USHORT nDDMaxDepth;
- BOOL bDDChangingDepth;
- BOOL bDDCursorVisible;
+ sal_uLong nDDStartPara;
+ sal_uLong nDDStartParaVisChildCount;
+ sal_uLong nDDCurPara;
+ sal_uInt16 nDDStartDepth;
+ sal_uInt16 nDDCurDepth;
+ sal_uInt16 nDDMaxDepth;
+ sal_Bool bDDChangingDepth;
+ sal_Bool bDDCursorVisible;
long* pHorTabArrDoc;
long nDDScrollLRBorderWidthWin; // Left Right
long nDDScrollTBBorderWidthWin; // Top Bottom
@@ -212,7 +217,7 @@ private:
long nDDScrollTDOffs;
void* pDummy;
- ULONG nDummy;
+ sal_uLong nDummy;
enum MouseTarget {
MouseText = 0,
@@ -225,11 +230,11 @@ private:
#ifdef _OUTLINER_CXX
- EDITENG_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand );
+ EDITENG_DLLPRIVATE void ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand );
- EDITENG_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
+ EDITENG_DLLPRIVATE sal_uLong ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara );
- EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds );
+ EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChilds );
EDITENG_DLLPRIVATE void ImpHideDDCursor();
EDITENG_DLLPRIVATE void ImpShowDDCursor();
EDITENG_DLLPRIVATE void ImpPaintDDCursor();
@@ -240,13 +245,13 @@ private:
EDITENG_DLLPRIVATE void ImpScrollUp();
EDITENG_DLLPRIVATE void ImpScrollDown();
- EDITENG_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel );
+ EDITENG_DLLPRIVATE sal_uLong ImpGetInsertionPara( const Point& rPosPixel );
EDITENG_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel );
EDITENG_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget );
- EDITENG_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart );
- EDITENG_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize);
- EDITENG_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected );
- EDITENG_DLLPRIVATE BOOL ImpIsIndentingPages();
+ EDITENG_DLLPRIVATE sal_uInt16 ImpInitPaste( sal_uLong& rStart );
+ EDITENG_DLLPRIVATE void ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize);
+ EDITENG_DLLPRIVATE sal_uInt16 ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected );
+ EDITENG_DLLPRIVATE sal_Bool ImpIsIndentingPages();
#endif
@@ -259,12 +264,12 @@ public:
void Scroll( long nHorzScroll, long nVertScroll );
void Paint( const Rectangle& rRect );
- BOOL PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL );
- BOOL MouseButtonDown( const MouseEvent& );
- BOOL MouseButtonUp( const MouseEvent& );
- BOOL MouseMove( const MouseEvent& );
+ sal_Bool PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL );
+ sal_Bool MouseButtonDown( const MouseEvent& );
+ sal_Bool MouseButtonUp( const MouseEvent& );
+ sal_Bool MouseMove( const MouseEvent& );
- void ShowCursor( BOOL bGotoCursor = TRUE );
+ void ShowCursor( sal_Bool bGotoCursor = sal_True );
void HideCursor();
void SetOutliner( Outliner* pOutliner );
@@ -273,8 +278,8 @@ public:
void SetWindow( Window* pWindow );
Window* GetWindow() const;
- void SetReadOnly( BOOL bReadOnly );
- BOOL IsReadOnly() const;
+ void SetReadOnly( sal_Bool bReadOnly );
+ sal_Bool IsReadOnly() const;
void SetOutputArea( const Rectangle& rRect );
Rectangle GetOutputArea() const;
@@ -284,26 +289,26 @@ public:
void CreateSelectionList (std::vector<Paragraph*> &aSelList) ;
// Retruns the number of selected paragraphs
- ULONG Select( Paragraph* pParagraph,
- BOOL bSelect=TRUE,
- BOOL bWChilds=TRUE);
+ sal_uLong Select( Paragraph* pParagraph,
+ sal_Bool bSelect=sal_True,
+ sal_Bool bWChilds=sal_True);
String GetSelected() const;
- void SelectRange( ULONG nFirst, USHORT nCount );
+ void SelectRange( sal_uLong nFirst, sal_uInt16 nCount );
void SetAttribs( const SfxItemSet& );
void Indent( short nDiff );
void AdjustDepth( short nDX ); // Later replace with Indent!
- BOOL AdjustHeight( long nDY );
+ sal_Bool AdjustHeight( long nDY );
void AdjustDepth( Paragraph* pPara, short nDX,
- BOOL bWithChilds = FALSE );
+ sal_Bool bWithChilds = sal_False );
void AdjustHeight( Paragraph* pPara, long nDY,
- BOOL bWithChilds=FALSE );
+ sal_Bool bWithChilds=sal_False );
- ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
- ULONG Write( SvStream& rOutput, EETextFormat eFormat );
+ sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ sal_uLong Write( SvStream& rOutput, EETextFormat eFormat );
- void InsertText( const String& rNew, BOOL bSelect = FALSE );
+ void InsertText( const String& rNew, sal_Bool bSelect = sal_False );
void InsertText( const OutlinerParaObject& rParaObj );
void Expand();
void Collapse();
@@ -321,7 +326,7 @@ public:
void Copy();
void Paste();
void PasteSpecial();
- void EnablePaste( BOOL bEnable );
+ void EnablePaste( sal_Bool bEnable );
void Undo();
void Redo();
@@ -329,41 +334,41 @@ public:
void SetStyleSheet( SfxStyleSheet* );
SfxStyleSheet* GetStyleSheet() const;
- void SetControlWord( ULONG nWord );
- ULONG GetControlWord() const;
+ void SetControlWord( sal_uLong nWord );
+ sal_uLong GetControlWord() const;
void SetAnchorMode( EVAnchorMode eMode );
EVAnchorMode GetAnchorMode() const;
Pointer GetPointer( const Point& rPosPixel );
void Command( const CommandEvent& rCEvt );
- void RemoveCharAttribs( ULONG nPara, USHORT nWhich = 0 );
+ void RemoveCharAttribs( sal_uLong nPara, sal_uInt16 nWhich = 0 );
void CompleteAutoCorrect();
- EESpellState StartSpeller( BOOL bMultipleDoc = FALSE );
+ EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False );
EESpellState StartThesaurus();
- USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem );
+ sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem );
// for text conversion
- void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc );
+ void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc );
void TransliterateText( sal_Int32 nTransliterationMode );
ESelection GetSelection();
- USHORT GetSelectedScriptType() const;
+ sal_uInt16 GetSelectedScriptType() const;
void SetVisArea( const Rectangle& rRec );
void SetSelection( const ESelection& );
- void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0, BOOL bKeepLanguages = FALSE );
- void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs );
- BOOL HasSelection() const;
+ void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0, sal_Bool bKeepLanguages = sal_False );
+ void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs );
+ sal_Bool HasSelection() const;
void InsertField( const SvxFieldItem& rFld );
const SvxFieldItem* GetFieldUnderMousePointer() const;
- const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const;
+ const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const;
const SvxFieldItem* GetFieldAtSelection() const;
/** enables numbering for the selected paragraphs if the numbering of the first paragraph is off
@@ -376,13 +381,13 @@ public:
*/
void EnableBullets();
- BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE );
- BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE );
+ sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False );
+ sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False );
void SpellIgnoreWord();
void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
- void SetInvalidateMore( USHORT nPixel );
- USHORT GetInvalidateMore() const;
+ void SetInvalidateMore( sal_uInt16 nPixel );
+ sal_uInt16 GetInvalidateMore() const;
String GetSurroundingText() const;
Selection GetSurroundingTextSelection() const;
@@ -413,7 +418,7 @@ public:
const Color maOverlineColor;
const Color maTextLineColor;
- BYTE mnBiDiLevel;
+ sal_uInt8 mnBiDiLevel;
bool mbFilled;
long mnWidthToFill;
@@ -423,7 +428,7 @@ public:
unsigned mbEndOfParagraph : 1;
unsigned mbEndOfBullet : 1;
- BYTE GetBiDiLevel() const { return mnBiDiLevel; }
+ sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; }
sal_Bool IsRTL() const;
DrawPortionInfo(
@@ -440,7 +445,7 @@ public:
const ::com::sun::star::lang::Locale* pLocale,
const Color& rOverlineColor,
const Color& rTextLineColor,
- BYTE nBiDiLevel,
+ sal_uInt8 nBiDiLevel,
bool bFilled,
long nWidthToFill,
bool bEndOfLine,
@@ -487,14 +492,14 @@ public:
struct EDITENG_DLLPUBLIC PaintFirstLineInfo
{
- USHORT mnPara;
+ sal_uInt16 mnPara;
const Point& mrStartPos;
long mnBaseLineY;
const Point& mrOrigin;
short mnOrientation;
OutputDevice* mpOutDev;
- PaintFirstLineInfo( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
+ PaintFirstLineInfo( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
: mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev )
{}
};
@@ -512,9 +517,9 @@ private:
String aRepresentation;
- USHORT nPara;
+ sal_uInt16 nPara;
xub_StrLen nPos;
- BOOL bSimpleClick;
+ sal_Bool bSimpleClick;
EditFieldInfo();
EditFieldInfo( const EditFieldInfo& );
@@ -522,12 +527,12 @@ private:
SdrPage* mpSdrPage;
public:
- EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, USHORT nPa, xub_StrLen nPo )
+ EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_uInt16 nPa, xub_StrLen nPo )
: rFldItem( rFItem )
{
pOutliner = pOutl;
nPara = nPa; nPos = nPo;
- pTxtColor = 0; pFldColor = 0; bSimpleClick = FALSE;
+ pTxtColor = 0; pFldColor = 0; bSimpleClick = sal_False;
mpSdrPage = 0;
}
~EditFieldInfo()
@@ -550,11 +555,11 @@ public:
void ClearFldColor()
{ delete pFldColor; pFldColor = 0; }
- USHORT GetPara() const { return nPara; }
+ sal_uInt16 GetPara() const { return nPara; }
xub_StrLen GetPos() const { return nPos; }
- BOOL IsSimpleClick() const { return bSimpleClick; }
- void SetSimpleClick( BOOL bSimple ) { bSimpleClick = bSimple; }
+ sal_Bool IsSimpleClick() const { return bSimpleClick; }
+ void SetSimpleClick( sal_Bool bSimple ) { bSimpleClick = bSimple; }
const String& GetRepresentation() const { return aRepresentation; }
String& GetRepresentation() { return aRepresentation; }
@@ -566,15 +571,15 @@ public:
struct EBulletInfo
{
- BOOL bVisible;
- USHORT nType; // see SvxNumberType
+ sal_Bool bVisible;
+ sal_uInt16 nType; // see SvxNumberType
String aText;
SvxFont aFont;
Graphic aGraphic;
- USHORT nParagraph;
+ sal_uInt16 nParagraph;
Rectangle aBounds;
- EBulletInfo() : bVisible( FALSE ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
+ EBulletInfo() : bVisible( sal_False ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
};
#define OUTLINERMODE_DONTKNOW 0x0000
@@ -604,7 +609,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
ViewList aViewList;
Paragraph* pHdlParagraph;
- ULONG mnFirstSelPage;
+ sal_uLong mnFirstSelPage;
Link aDrawPortionHdl;
Link aDrawBulletHdl;
Link aExpandHdl;
@@ -623,20 +628,20 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
Link maEndPasteOrDropHdl;
sal_Int16 nDepthChangedHdlPrevDepth;
- USHORT mnDepthChangeHdlPrevFlags;
+ sal_uInt16 mnDepthChangeHdlPrevFlags;
sal_Int16 nMaxDepth;
const sal_Int16 nMinDepth;
- USHORT nFirstPage;
+ sal_uInt16 nFirstPage;
- USHORT nOutlinerMode;
+ sal_uInt16 nOutlinerMode;
- BOOL bIsExpanding; // Only valid in Expand/Collaps-Hdl, reset
- BOOL bFirstParaIsEmpty;
- BOOL bBlockInsCallback;
- BOOL bStrippingPortions;
- BOOL bPasting;
+ sal_Bool bIsExpanding; // Only valid in Expand/Collaps-Hdl, reset
+ sal_Bool bFirstParaIsEmpty;
+ sal_Bool bBlockInsCallback;
+ sal_Bool bStrippingPortions;
+ sal_Bool bPasting;
- ULONG nDummy;
+ sal_uLong nDummy;
#ifdef _OUTLINER_CXX
@@ -646,82 +651,82 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
DECL_LINK( EditEngineNotifyHdl, EENotify* );
- void ImplCheckParagraphs( USHORT nStart, USHORT nEnd );
- BOOL ImplHasBullet( USHORT nPara ) const;
- Size ImplGetBulletSize( USHORT nPara );
- sal_uInt16 ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt );
- void ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds );
- String ImplGetBulletText( USHORT nPara );
- void ImplCheckNumBulletItem( USHORT nPara );
- void ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction = FALSE );
- void ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle = NULL );
-
- void ImplBlockInsertionCallbacks( BOOL b );
-
- void ImplCheckStyleSheet( USHORT nPara, BOOL bReplaceExistingStyle );
- void ImpRecalcBulletIndent( ULONG nPara );
-
- const SvxBulletItem& ImpGetBullet( ULONG nPara, USHORT& );
- void ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara );
+ void ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd );
+ sal_Bool ImplHasBullet( sal_uInt16 nPara ) const;
+ Size ImplGetBulletSize( sal_uInt16 nPara );
+ sal_uInt16 ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt );
+ void ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds );
+ String ImplGetBulletText( sal_uInt16 nPara );
+ void ImplCheckNumBulletItem( sal_uInt16 nPara );
+ void ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False );
+ void ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL );
+
+ void ImplBlockInsertionCallbacks( sal_Bool b );
+
+ void ImplCheckStyleSheet( sal_uInt16 nPara, sal_Bool bReplaceExistingStyle );
+ void ImpRecalcBulletIndent( sal_uLong nPara );
+
+ const SvxBulletItem& ImpGetBullet( sal_uLong nPara, sal_uInt16& );
+ void ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara );
bool ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 );
- void ImpTextPasted( ULONG nStartPara, USHORT nCount );
- long ImpCalcMaxBulletWidth( USHORT nPara, const SvxBulletItem& rBullet );
- Font ImpCalcBulletFont( USHORT nPara ) const;
- Rectangle ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos );
- long ImpGetTextIndent( ULONG nPara );
- BOOL ImpCanIndentSelectedPages( OutlinerView* pCurView );
- BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView );
- BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT nFirstPage, USHORT nPages );
+ void ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount );
+ long ImpCalcMaxBulletWidth( sal_uInt16 nPara, const SvxBulletItem& rBullet );
+ Font ImpCalcBulletFont( sal_uInt16 nPara ) const;
+ Rectangle ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos );
+ long ImpGetTextIndent( sal_uLong nPara );
+ sal_Bool ImpCanIndentSelectedPages( OutlinerView* pCurView );
+ sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView );
+ sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 nFirstPage, sal_uInt16 nPages );
- USHORT ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+ sal_uInt16 ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
void ImplCheckDepth( sal_Int16& rnDepth ) const;
#endif
protected:
- void ParagraphInserted( USHORT nParagraph );
- void ParagraphDeleted( USHORT nParagraph );
- void ParaAttribsChanged( USHORT nParagraph );
+ void ParagraphInserted( sal_uInt16 nParagraph );
+ void ParagraphDeleted( sal_uInt16 nParagraph );
+ void ParaAttribsChanged( sal_uInt16 nParagraph );
virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
- void InvalidateBullet( Paragraph* pPara, ULONG nPara );
- void PaintBullet( USHORT nPara, const Point& rStartPos,
+ void InvalidateBullet( Paragraph* pPara, sal_uLong nPara );
+ void PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
const Point& rOrigin, short nOrientation,
OutputDevice* pOutDev );
// used by OutlinerEditEng. Allows Outliner objects to provide
// bullet access to the EditEngine.
- virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const;
+ virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const;
public:
- Outliner( SfxItemPool* pPool, USHORT nOutlinerMode );
+ Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode );
virtual ~Outliner();
- void Init( USHORT nOutlinerMode );
- USHORT GetMode() const { return nOutlinerMode; }
+ void Init( sal_uInt16 nOutlinerMode );
+ sal_uInt16 GetMode() const { return nOutlinerMode; }
- void SetVertical( BOOL bVertical );
- BOOL IsVertical() const;
+ void SetVertical( sal_Bool bVertical );
+ sal_Bool IsVertical() const;
- void SetFixedCellHeight( BOOL bUseFixedCellHeight );
- BOOL IsFixedCellHeight() const;
+ void SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
+ sal_Bool IsFixedCellHeight() const;
void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
- USHORT GetScriptType( const ESelection& rSelection ) const;
- LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const;
+ sal_uInt16 GetScriptType( const ESelection& rSelection ) const;
+ LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const;
- void SetAsianCompressionMode( USHORT nCompressionMode );
- USHORT GetAsianCompressionMode() const;
+ void SetAsianCompressionMode( sal_uInt16 nCompressionMode );
+ sal_uInt16 GetAsianCompressionMode() const;
- void SetKernAsianPunctuation( BOOL bEnabled );
- BOOL IsKernAsianPunctuation() const;
+ void SetKernAsianPunctuation( sal_Bool bEnabled );
+ sal_Bool IsKernAsianPunctuation() const;
- void SetAddExtLeading( BOOL b );
- BOOL IsAddExtLeading() const;
+ void SetAddExtLeading( sal_Bool b );
+ sal_Bool IsAddExtLeading() const;
size_t InsertView( OutlinerView* pView, size_t nIndex = size_t(-1) );
OutlinerView* RemoveView( OutlinerView* pView );
@@ -729,13 +734,13 @@ public:
OutlinerView* GetView( size_t nIndex ) const;
size_t GetViewCount() const;
- Paragraph* Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 );
+ Paragraph* Insert( const String& rText, sal_uLong nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 );
void SetText( const OutlinerParaObject& );
void AddText( const OutlinerParaObject& );
void SetText( const String& rText, Paragraph* pParagraph );
- String GetText( Paragraph* pPara, ULONG nParaCount=1 ) const;
+ String GetText( Paragraph* pPara, sal_uLong nParaCount=1 ) const;
- OutlinerParaObject* CreateParaObject( USHORT nStartPara = 0, USHORT nParaCount = 0xFFFF ) const;
+ OutlinerParaObject* CreateParaObject( sal_uInt16 nStartPara = 0, sal_uInt16 nParaCount = 0xFFFF ) const;
const SfxItemSet& GetEmptyItemSet() const;
@@ -747,44 +752,44 @@ public:
sal_Int16 GetMinDepth() const { return -1; }
- void SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParas = FALSE );
+ void SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParas = sal_False );
sal_Int16 GetMaxDepth() const { return nMaxDepth; }
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const;
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const;
void Clear();
void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
- ULONG GetParagraphCount() const;
- Paragraph* GetParagraph( ULONG nAbsPos ) const;
+ sal_uLong GetParagraphCount() const;
+ Paragraph* GetParagraph( sal_uLong nAbsPos ) const;
- BOOL HasParent( Paragraph* pParagraph ) const;
- BOOL HasChilds( Paragraph* pParagraph ) const;
- ULONG GetChildCount( Paragraph* pParent ) const;
- BOOL IsExpanded( Paragraph* pPara ) const;
- Paragraph* GetParent( Paragraph* pParagraph ) const;
- ULONG GetAbsPos( Paragraph* pPara );
+ sal_Bool HasParent( Paragraph* pParagraph ) const;
+ sal_Bool HasChilds( Paragraph* pParagraph ) const;
+ sal_uLong GetChildCount( Paragraph* pParent ) const;
+ sal_Bool IsExpanded( Paragraph* pPara ) const;
+ Paragraph* GetParent( Paragraph* pParagraph ) const;
+ sal_uLong GetAbsPos( Paragraph* pPara );
- sal_Int16 GetDepth( ULONG nPara ) const;
+ sal_Int16 GetDepth( sal_uLong nPara ) const;
void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth );
- void SetVisible( Paragraph* pPara, BOOL bVisible );
- BOOL IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); }
+ void SetVisible( Paragraph* pPara, sal_Bool bVisible );
+ sal_Bool IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); }
- void EnableUndo( BOOL bEnable );
- BOOL IsUndoEnabled() const;
- void UndoActionStart( USHORT nId );
- void UndoActionEnd( USHORT nId );
+ void EnableUndo( sal_Bool bEnable );
+ sal_Bool IsUndoEnabled() const;
+ void UndoActionStart( sal_uInt16 nId );
+ void UndoActionEnd( sal_uInt16 nId );
void InsertUndo( EditUndo* pUndo );
- BOOL IsInUndo();
+ sal_Bool IsInUndo();
void ClearModifyFlag();
- BOOL IsModified() const;
+ sal_Bool IsModified() const;
Paragraph* GetHdlParagraph() const { return pHdlParagraph; }
- BOOL IsExpanding() const { return bIsExpanding; }
+ sal_Bool IsExpanding() const { return bIsExpanding; }
virtual void ExpandHdl();
void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; }
@@ -802,7 +807,7 @@ public:
void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;}
Link GetDepthChangedHdl() const { return aDepthChangedHdl; }
sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; }
- USHORT GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
+ sal_uInt16 GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
virtual long RemovingPagesHdl( OutlinerView* );
void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;}
@@ -811,10 +816,10 @@ public:
void SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;}
Link GetIndentingPagesHdl() const { return aIndentingPagesHdl; }
// valid only in the two upper handlers
- USHORT GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
+ sal_uInt16 GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
// valid only in the two upper handlers
- ULONG GetFirstSelPage() const { return mnFirstSelPage; }
+ sal_uLong GetFirstSelPage() const { return mnFirstSelPage; }
void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; }
Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
@@ -847,8 +852,8 @@ public:
const Size& GetPaperSize() const;
void SetPaperSize( const Size& rSize );
- void SetFirstPageNumber( USHORT n ) { nFirstPage = n; }
- USHORT GetFirstPageNumber() const { return nFirstPage; }
+ void SetFirstPageNumber( sal_uInt16 n ) { nFirstPage = n; }
+ sal_uInt16 GetFirstPageNumber() const { return nFirstPage; }
void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
@@ -861,29 +866,29 @@ public:
const Size& GetMaxAutoPaperSize() const;
void SetMaxAutoPaperSize( const Size& rSz );
- void SetDefTab( USHORT nTab );
- USHORT GetDefTab() const;
+ void SetDefTab( sal_uInt16 nTab );
+ sal_uInt16 GetDefTab() const;
- BOOL IsFlatMode() const;
- void SetFlatMode( BOOL bFlat );
+ sal_Bool IsFlatMode() const;
+ void SetFlatMode( sal_Bool bFlat );
- void EnableAutoColor( BOOL b );
- BOOL IsAutoColorEnabled() const;
+ void EnableAutoColor( sal_Bool b );
+ sal_Bool IsAutoColorEnabled() const;
- void ForceAutoColor( BOOL b );
- BOOL IsForceAutoColor() const;
+ void ForceAutoColor( sal_Bool b );
+ sal_Bool IsForceAutoColor() const;
- EBulletInfo GetBulletInfo( USHORT nPara );
+ EBulletInfo GetBulletInfo( sal_uInt16 nPara );
void SetWordDelimiters( const String& rDelimiters );
String GetWordDelimiters() const;
- String GetWord( USHORT nPara, xub_StrLen nIndex );
+ String GetWord( sal_uInt16 nPara, xub_StrLen nIndex );
void StripPortions();
virtual void DrawingText(
- const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen,
- const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen,
+ const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
bool bEndOfLine,
@@ -895,7 +900,7 @@ public:
virtual void DrawingTab(
const Point& rStartPos, long nWidth, const String& rChar,
- const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
bool bEndOfLine,
bool bEndOfParagraph,
const Color& rOverlineColor,
@@ -908,17 +913,17 @@ public:
void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
SfxStyleSheetPool* GetStyleSheetPool();
- BOOL IsInSelectionMode() const;
+ sal_Bool IsInSelectionMode() const;
- void SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle );
- SfxStyleSheet* GetStyleSheet( ULONG nPara );
+ void SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle );
+ SfxStyleSheet* GetStyleSheet( sal_uLong nPara );
- void SetParaAttribs( USHORT nPara, const SfxItemSet& );
- SfxItemSet GetParaAttribs( USHORT nPara );
+ void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& );
+ SfxItemSet GetParaAttribs( sal_uInt16 nPara );
- void Remove( Paragraph* pPara, ULONG nParaCount );
- BOOL Expand( Paragraph* );
- BOOL Collapse( Paragraph* );
+ void Remove( Paragraph* pPara, sal_uLong nParaCount );
+ sal_Bool Expand( Paragraph* );
+ sal_Bool Collapse( Paragraph* );
void SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag );
void RemoveParaFlag( Paragraph* pPara, sal_uInt16 nFlag );
@@ -929,22 +934,23 @@ public:
Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; }
void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; }
- void SetControlWord( ULONG nWord );
- ULONG GetControlWord() const;
+ void SetControlWord( sal_uLong nWord );
+ sal_uLong GetControlWord() const;
Link GetBeginMovingHdl() const { return aBeginMovingHdl; }
void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;}
Link GetEndMovingHdl() const {return aEndMovingHdl;}
void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;}
- ULONG GetLineCount( ULONG nParagraph ) const;
- USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const;
- ULONG GetLineHeight( ULONG nParagraph, ULONG nLine = 0 );
+ sal_uLong GetLineCount( sal_uLong nParagraph ) const;
+ sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const;
+ sal_uLong GetLineHeight( sal_uLong nParagraph, sal_uLong nLine = 0 );
// nFormat must be a value from the enum EETextFormat (due to CLOOKS)
- ULONG Read( SvStream& rInput, const String& rBaseURL, USHORT, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ sal_uLong Read( SvStream& rInput, const String& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
- SfxUndoManager& GetUndoManager();
+ ::svl::IUndoManager&
+ GetUndoManager();
void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -953,15 +959,15 @@ public:
// Only for EditEngine mode
void QuickInsertText( const String& rText, const ESelection& rSel );
void QuickDelete( const ESelection& rSel );
- void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 );
- void QuickFormatDoc( BOOL bFull = FALSE );
+ void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 );
+ void QuickFormatDoc( sal_Bool bFull = sal_False );
- BOOL UpdateFields();
- void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL );
+ sal_Bool UpdateFields();
+ void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
- virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
- virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
- virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+ virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+ virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
void SetSpeller( ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
@@ -981,16 +987,16 @@ public:
void SetDefaultLanguage( LanguageType eLang );
LanguageType GetDefaultLanguage() const;
- BOOL HasOnlineSpellErrors() const;
+ sal_Bool HasOnlineSpellErrors() const;
void CompleteOnlineSpelling();
EESpellState HasSpellErrors();
- BOOL HasText( const SvxSearchItem& rSearchItem );
- virtual BOOL SpellNextDocument();
+ sal_Bool HasText( const SvxSearchItem& rSearchItem );
+ virtual sal_Bool SpellNextDocument();
// for text conversion
sal_Bool HasConvertibleTextPortion( LanguageType nLang );
- virtual BOOL ConvertNextDocument();
+ virtual sal_Bool ConvertNextDocument();
void SetEditTextObjectPool( SfxItemPool* pPool );
SfxItemPool* GetEditTextObjectPool() const;
@@ -998,30 +1004,30 @@ public:
void SetRefDevice( OutputDevice* pRefDev );
OutputDevice* GetRefDevice() const;
- USHORT GetFirstLineOffset( ULONG nParagraph );
+ sal_uInt16 GetFirstLineOffset( sal_uLong nParagraph );
- ULONG GetTextHeight() const;
- ULONG GetTextHeight( ULONG nParagraph ) const;
- Point GetDocPosTopLeft( ULONG nParagraph );
+ sal_uLong GetTextHeight() const;
+ sal_uLong GetTextHeight( sal_uLong nParagraph ) const;
+ Point GetDocPosTopLeft( sal_uLong nParagraph );
Point GetDocPos( const Point& rPaperPos ) const;
- BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 );
- BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBuuletPos );
+ sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
+ sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBuuletPos );
- void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 );
- void GetGlobalCharStretching( USHORT& rX, USHORT& rY );
- void DoStretchChars( USHORT nX, USHORT nY );
+ void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
+ void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY );
+ void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY );
void EraseVirtualDevice();
- void SetBigTextObjectStart( USHORT nStartAtPortionCount );
- USHORT GetBigTextObjectStart() const;
- BOOL ShouldCreateBigTextObject() const;
+ void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount );
+ sal_uInt16 GetBigTextObjectStart() const;
+ sal_Bool ShouldCreateBigTextObject() const;
const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); }
// this is needed for StarOffice Api
- void SetLevelDependendStyleSheet( USHORT nPara );
+ void SetLevelDependendStyleSheet( sal_uInt16 nPara );
- USHORT GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+ sal_uInt16 GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
// spell and return a sentence
diff --git a/editeng/inc/editeng/outlobj.hxx b/editeng/inc/editeng/outlobj.hxx
index c402675bcd..c402675bcd 100644..100755
--- a/editeng/inc/editeng/outlobj.hxx
+++ b/editeng/inc/editeng/outlobj.hxx
diff --git a/editeng/inc/editeng/paperinf.hxx b/editeng/inc/editeng/paperinf.hxx
index a4c32f6788..3c1a7cc493 100644..100755
--- a/editeng/inc/editeng/paperinf.hxx
+++ b/editeng/inc/editeng/paperinf.hxx
@@ -49,7 +49,7 @@ public:
static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP );
static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP );
static Size GetPaperSize( const Printer* pPrinter );
- static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = FALSE );
+ static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = sal_False );
static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP );
static String GetName( Paper ePaper );
};
diff --git a/editeng/inc/editeng/paragraphdata.hxx b/editeng/inc/editeng/paragraphdata.hxx
index 778dbdea97..778dbdea97 100644..100755
--- a/editeng/inc/editeng/paragraphdata.hxx
+++ b/editeng/inc/editeng/paragraphdata.hxx
diff --git a/editeng/inc/editeng/paravertalignitem.hxx b/editeng/inc/editeng/paravertalignitem.hxx
index ed8f0af6d8..d1e94d6a54 100644..100755
--- a/editeng/inc/editeng/paravertalignitem.hxx
+++ b/editeng/inc/editeng/paravertalignitem.hxx
@@ -52,9 +52,9 @@ public:
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -62,10 +62,8 @@ public:
String &rText,
const IntlWrapper * = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const;
+ 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 SvxParaVertAlignItem& operator=( const SvxParaVertAlignItem& rItem )
{
diff --git a/editeng/inc/editeng/pbinitem.hxx b/editeng/inc/editeng/pbinitem.hxx
index 67518bd4c9..c13b14a251 100644..100755
--- a/editeng/inc/editeng/pbinitem.hxx
+++ b/editeng/inc/editeng/pbinitem.hxx
@@ -35,7 +35,7 @@
// define ----------------------------------------------------------------
-#define PAPERBIN_PRINTER_SETTINGS ((BYTE)0xFF)
+#define PAPERBIN_PRINTER_SETTINGS ((sal_uInt8)0xFF)
// class SvxPaperBinItem -------------------------------------------------
@@ -49,21 +49,21 @@ class EDITENG_DLLPUBLIC SvxPaperBinItem : public SfxByteItem
public:
TYPEINFO();
- inline SvxPaperBinItem( const USHORT nId ,
- const BYTE nTray = PAPERBIN_PRINTER_SETTINGS );
+ inline SvxPaperBinItem( const sal_uInt16 nId ,
+ const sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS );
inline SvxPaperBinItem &operator=( const SvxPaperBinItem &rCpy );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
};
-inline SvxPaperBinItem::SvxPaperBinItem( const USHORT nId, const BYTE nT )
+inline SvxPaperBinItem::SvxPaperBinItem( const sal_uInt16 nId, const sal_uInt8 nT )
: SfxByteItem( nId, nT )
{}
diff --git a/editeng/inc/editeng/pgrditem.hxx b/editeng/inc/editeng/pgrditem.hxx
index 46d295072f..f79f5f8b33 100644..100755
--- a/editeng/inc/editeng/pgrditem.hxx
+++ b/editeng/inc/editeng/pgrditem.hxx
@@ -46,13 +46,13 @@ class EDITENG_DLLPUBLIC SvxParaGridItem : public SfxBoolItem
public:
TYPEINFO();
- SvxParaGridItem( const BOOL bSnapToGrid /*= TRUE*/,
- const USHORT nId );
+ SvxParaGridItem( const sal_Bool bSnapToGrid /*= sal_True*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/pmdlitem.hxx b/editeng/inc/editeng/pmdlitem.hxx
index ec31066d6e..fa5a38c3a3 100644..100755
--- a/editeng/inc/editeng/pmdlitem.hxx
+++ b/editeng/inc/editeng/pmdlitem.hxx
@@ -43,14 +43,14 @@
class EDITENG_DLLPUBLIC SvxPageModelItem : public SfxStringItem
{
private:
- BOOL bAuto;
+ sal_Bool bAuto;
public:
TYPEINFO();
- inline SvxPageModelItem( USHORT nWh );
- inline SvxPageModelItem( const String& rModel, BOOL bA /*= FALSE*/,
- USHORT nWh );
+ inline SvxPageModelItem( sal_uInt16 nWh );
+ inline SvxPageModelItem( const String& rModel, sal_Bool bA /*= sal_False*/,
+ sal_uInt16 nWh );
inline SvxPageModelItem& operator=( const SvxPageModelItem& rModel );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -60,19 +60,19 @@ public:
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 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 );
- BOOL IsAuto() const { return bAuto; }
+ 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_Bool IsAuto() const { return bAuto; }
};
-inline SvxPageModelItem::SvxPageModelItem( USHORT nWh )
- : bAuto( FALSE )
+inline SvxPageModelItem::SvxPageModelItem( sal_uInt16 nWh )
+ : bAuto( sal_False )
{
SetWhich( nWh );
}
-inline SvxPageModelItem::SvxPageModelItem( const String& rModel, BOOL bA,
- USHORT nWh ) :
+inline SvxPageModelItem::SvxPageModelItem( const String& rModel, sal_Bool bA,
+ sal_uInt16 nWh ) :
SfxStringItem( nWh, rModel ),
bAuto( bA )
{}
diff --git a/editeng/inc/editeng/postitem.hxx b/editeng/inc/editeng/postitem.hxx
index 2ba5365774..6f55626e85 100644..100755
--- a/editeng/inc/editeng/postitem.hxx
+++ b/editeng/inc/editeng/postitem.hxx
@@ -53,7 +53,7 @@ public:
TYPEINFO();
SvxPostureItem( const FontItalic ePost /*= ITALIC_NONE*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem + SwEnumItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -62,17 +62,17 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetValueCount() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetValueCount() 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 int HasBoolValue() const;
- virtual BOOL GetBoolValue() const;
- virtual void SetBoolValue( BOOL bVal );
+ virtual sal_Bool GetBoolValue() const;
+ virtual void SetBoolValue( sal_Bool bVal );
inline SvxPostureItem& operator=(const SvxPostureItem& rPost) {
SetValue( rPost.GetValue() );
@@ -83,7 +83,7 @@ public:
FontItalic GetPosture() const
{ return (FontItalic)GetValue(); }
void SetPosture( FontItalic eNew )
- { SetValue( (USHORT)eNew ); }
+ { SetValue( (sal_uInt16)eNew ); }
};
#endif // #ifndef _SVX_POSTITEM_HXX
diff --git a/editeng/inc/editeng/prntitem.hxx b/editeng/inc/editeng/prntitem.hxx
index e0ce99fd56..57735fb55a 100644..100755
--- a/editeng/inc/editeng/prntitem.hxx
+++ b/editeng/inc/editeng/prntitem.hxx
@@ -49,13 +49,13 @@ class EDITENG_DLLPUBLIC SvxPrintItem : public SfxBoolItem
public:
TYPEINFO();
- SvxPrintItem( const USHORT nId , const BOOL bPrt = TRUE );
+ SvxPrintItem( const sal_uInt16 nId , const sal_Bool bPrt = sal_True );
inline SvxPrintItem &operator=( const SvxPrintItem &rCpy );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -63,7 +63,7 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
};
-inline SvxPrintItem::SvxPrintItem( const USHORT nId, const BOOL bPrt )
+inline SvxPrintItem::SvxPrintItem( const sal_uInt16 nId, const sal_Bool bPrt )
: SfxBoolItem( nId, bPrt )
{}
diff --git a/editeng/inc/editeng/protitem.hxx b/editeng/inc/editeng/protitem.hxx
index 95c9c6bd43..0d93de7a57 100644..100755
--- a/editeng/inc/editeng/protitem.hxx
+++ b/editeng/inc/editeng/protitem.hxx
@@ -50,14 +50,14 @@ namespace rtl
class EDITENG_DLLPUBLIC SvxProtectItem : public SfxPoolItem
{
- BOOL bCntnt :1; // Content protected
- BOOL bSize :1; // Size protected
- BOOL bPos :1; // Position protected
+ sal_Bool bCntnt :1; // Content protected
+ sal_Bool bSize :1; // Size protected
+ sal_Bool bPos :1; // Position protected
public:
TYPEINFO();
- inline SvxProtectItem( const USHORT nId );
+ inline SvxProtectItem( const sal_uInt16 nId );
inline SvxProtectItem &operator=( const SvxProtectItem &rCpy );
// "pure virtual Methods" from SfxPoolItem
@@ -70,24 +70,24 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
-
- BOOL IsCntntProtected() const { return bCntnt; }
- BOOL IsSizeProtected() const { return bSize; }
- BOOL IsPosProtected() const { return bPos; }
- void SetCntntProtect( BOOL bNew ) { bCntnt = bNew; }
- void SetSizeProtect ( BOOL bNew ) { bSize = bNew; }
- void SetPosProtect ( BOOL bNew ) { bPos = bNew; }
-
- 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 SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+
+ sal_Bool IsCntntProtected() const { return bCntnt; }
+ sal_Bool IsSizeProtected() const { return bSize; }
+ sal_Bool IsPosProtected() const { return bPos; }
+ void SetCntntProtect( sal_Bool bNew ) { bCntnt = bNew; }
+ void SetSizeProtect ( sal_Bool bNew ) { bSize = bNew; }
+ void SetPosProtect ( sal_Bool bNew ) { bPos = bNew; }
+
+ 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 SvxProtectItem::SvxProtectItem( const USHORT nId )
+inline SvxProtectItem::SvxProtectItem( const sal_uInt16 nId )
: SfxPoolItem( nId )
{
- bCntnt = bSize = bPos = FALSE;
+ bCntnt = bSize = bPos = sal_False;
}
inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy )
diff --git a/editeng/inc/editeng/prszitem.hxx b/editeng/inc/editeng/prszitem.hxx
index 4effaccf8a..cc0d3e532f 100644..100755
--- a/editeng/inc/editeng/prszitem.hxx
+++ b/editeng/inc/editeng/prszitem.hxx
@@ -45,13 +45,13 @@ class EDITENG_DLLPUBLIC SvxPropSizeItem : public SfxUInt16Item
public:
TYPEINFO();
- SvxPropSizeItem( const USHORT nPercent /*= 100*/,
- const USHORT nID );
+ SvxPropSizeItem( const sal_uInt16 nPercent /*= 100*/,
+ const sal_uInt16 nID );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/scriptspaceitem.hxx b/editeng/inc/editeng/scriptspaceitem.hxx
index b2eb09875b..0357b59904 100644..100755
--- a/editeng/inc/editeng/scriptspaceitem.hxx
+++ b/editeng/inc/editeng/scriptspaceitem.hxx
@@ -50,8 +50,8 @@ public:
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/scripttypeitem.hxx b/editeng/inc/editeng/scripttypeitem.hxx
index 9989ff4f5e..b15f171c04 100644..100755
--- a/editeng/inc/editeng/scripttypeitem.hxx
+++ b/editeng/inc/editeng/scripttypeitem.hxx
@@ -42,9 +42,9 @@
used for the user interface.
*/
-EDITENG_DLLPUBLIC USHORT GetI18NScriptTypeOfLanguage( USHORT nLang );
-USHORT GetItemScriptType( short nI18NType );
-short GetI18NScriptType( USHORT nItemType );
+EDITENG_DLLPUBLIC sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang );
+sal_uInt16 GetItemScriptType( short nI18NType );
+short GetI18NScriptType( sal_uInt16 nItemType );
class EDITENG_DLLPUBLIC SvxScriptTypeItem : public SfxUInt16Item
{
@@ -61,30 +61,30 @@ class EDITENG_DLLPUBLIC SvxScriptSetItem : public SfxSetItem
public:
TYPEINFO();
- SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool );
+ SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
static const SfxPoolItem* GetItemOfScriptSet( const SfxItemSet& rSet,
- USHORT nWhich );
- inline const SfxPoolItem* GetItemOfScriptSet( USHORT _nWhich ) const
+ sal_uInt16 nWhich );
+ inline const SfxPoolItem* GetItemOfScriptSet( sal_uInt16 _nWhich ) const
{ return SvxScriptSetItem::GetItemOfScriptSet( GetItemSet(), _nWhich ); }
- static const SfxPoolItem* GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript );
+ static const SfxPoolItem* GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript );
- const SfxPoolItem* GetItemOfScript( USHORT nScript ) const;
+ const SfxPoolItem* GetItemOfScript( sal_uInt16 nScript ) const;
- void PutItemForScriptType( USHORT nScriptType, const SfxPoolItem& rItem );
+ void PutItemForScriptType( sal_uInt16 nScriptType, const SfxPoolItem& rItem );
- static void GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex);
+ static void GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex);
- void GetWhichIds( USHORT& rLatin, USHORT& rAsian, USHORT& rComplex) const;
+ void GetWhichIds( sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex) const;
- static void GetSlotIds( USHORT nSlotId, USHORT& rLatin, USHORT& rAsian,
- USHORT& rComplex );
- inline void GetSlotIds( USHORT& rLatin, USHORT& rAsian,
- USHORT& rComplex ) const
+ static void GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin, sal_uInt16& rAsian,
+ sal_uInt16& rComplex );
+ inline void GetSlotIds( sal_uInt16& rLatin, sal_uInt16& rAsian,
+ sal_uInt16& rComplex ) const
{ GetSlotIds( Which(), rLatin, rAsian, rComplex ); }
};
diff --git a/editeng/inc/editeng/shaditem.hxx b/editeng/inc/editeng/shaditem.hxx
index 6477d4c51f..570c86f336 100644..100755
--- a/editeng/inc/editeng/shaditem.hxx
+++ b/editeng/inc/editeng/shaditem.hxx
@@ -47,29 +47,29 @@ namespace rtl
This item describes the shadow attribute (color, width and position).
*/
-#define SHADOW_TOP ((USHORT)0)
-#define SHADOW_BOTTOM ((USHORT)1)
-#define SHADOW_LEFT ((USHORT)2)
-#define SHADOW_RIGHT ((USHORT)3)
+#define SHADOW_TOP ((sal_uInt16)0)
+#define SHADOW_BOTTOM ((sal_uInt16)1)
+#define SHADOW_LEFT ((sal_uInt16)2)
+#define SHADOW_RIGHT ((sal_uInt16)3)
class EDITENG_DLLPUBLIC SvxShadowItem : public SfxEnumItemInterface
{
Color aShadowColor;
- USHORT nWidth;
+ sal_uInt16 nWidth;
SvxShadowLocation eLocation;
public:
TYPEINFO();
- SvxShadowItem( const USHORT nId ,
- const Color *pColor = 0, const USHORT nWidth = 100 /*5pt*/,
+ SvxShadowItem( const sal_uInt16 nId ,
+ const Color *pColor = 0, const sal_uInt16 nWidth = 100 /*5pt*/,
const SvxShadowLocation eLoc = SVX_SHADOW_NONE );
inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -77,27 +77,27 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
const Color& GetColor() const { return aShadowColor;}
void SetColor( const Color &rNew ) { aShadowColor = rNew; }
- USHORT GetWidth() const { return nWidth; }
+ sal_uInt16 GetWidth() const { return nWidth; }
SvxShadowLocation GetLocation() const { return eLocation; }
- void SetWidth( USHORT nNew ) { nWidth = nNew; }
+ void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; }
void SetLocation( SvxShadowLocation eNew ) { eLocation = eNew; }
// Calculate width of the shadow on the page.
- USHORT CalcShadowSpace( USHORT nShadow ) const;
+ sal_uInt16 CalcShadowSpace( sal_uInt16 nShadow ) const;
- virtual USHORT GetValueCount() const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetEnumValue() const;
- virtual void SetEnumValue( USHORT nNewVal );
+ virtual sal_uInt16 GetValueCount() const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetEnumValue() const;
+ virtual void SetEnumValue( sal_uInt16 nNewVal );
};
inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow )
diff --git a/editeng/inc/editeng/shdditem.hxx b/editeng/inc/editeng/shdditem.hxx
index 1863ce4b10..01019debc1 100644..100755
--- a/editeng/inc/editeng/shdditem.hxx
+++ b/editeng/inc/editeng/shdditem.hxx
@@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxShadowedItem : public SfxBoolItem
public:
TYPEINFO();
- SvxShadowedItem( const BOOL bShadowed /*= FALSE*/,
- const USHORT nId );
+ SvxShadowedItem( const sal_Bool bShadowed /*= sal_False*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/sizeitem.hxx b/editeng/inc/editeng/sizeitem.hxx
index 3622086d3e..967995e68c 100644..100755
--- a/editeng/inc/editeng/sizeitem.hxx
+++ b/editeng/inc/editeng/sizeitem.hxx
@@ -49,15 +49,15 @@ class EDITENG_DLLPUBLIC SvxSizeItem : public SfxPoolItem
public:
TYPEINFO();
- SvxSizeItem( const USHORT nId );
- SvxSizeItem( const USHORT nId, const Size& rSize);
+ SvxSizeItem( const sal_uInt16 nId );
+ SvxSizeItem( const sal_uInt16 nId, const Size& rSize);
inline SvxSizeItem& operator=( const SvxSizeItem &rCpy );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -65,10 +65,10 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
const Size& GetSize() const { return aSize; }
void SetSize(const Size& rSize) { aSize = rSize; }
diff --git a/editeng/inc/editeng/spltitem.hxx b/editeng/inc/editeng/spltitem.hxx
index 25cb62a4d8..4b3c0c6d27 100644..100755
--- a/editeng/inc/editeng/spltitem.hxx
+++ b/editeng/inc/editeng/spltitem.hxx
@@ -52,14 +52,14 @@ public:
TYPEINFO();
~SvxFmtSplitItem();
- inline SvxFmtSplitItem( const BOOL bSplit /*= TRUE*/,
- const USHORT nWh );
+ inline SvxFmtSplitItem( const sal_Bool bSplit /*= sal_True*/,
+ const sal_uInt16 nWh );
inline SvxFmtSplitItem& operator=( const SvxFmtSplitItem& rSplit );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
- virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const;
+ virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -67,7 +67,7 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
};
-inline SvxFmtSplitItem::SvxFmtSplitItem( const BOOL bSplit, const USHORT nWh ) :
+inline SvxFmtSplitItem::SvxFmtSplitItem( const sal_Bool bSplit, const sal_uInt16 nWh ) :
SfxBoolItem( nWh, bSplit )
{}
diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx
index bc45535d96..bc45535d96 100644..100755
--- a/editeng/inc/editeng/splwrap.hxx
+++ b/editeng/inc/editeng/splwrap.hxx
diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx
index c884e3836e..1bc75b0816 100644..100755
--- a/editeng/inc/editeng/svxacorr.hxx
+++ b/editeng/inc/editeng/svxacorr.hxx
@@ -79,14 +79,14 @@ public:
SvxAutoCorrDoc() {}
virtual ~SvxAutoCorrDoc();
- virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0;
- virtual BOOL Insert( xub_StrLen nPos, const String& rTxt ) = 0;
- virtual BOOL Replace( xub_StrLen nPos, const String& rTxt ) = 0;
+ virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0;
+ virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0;
+ virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0;
- 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& ) = 0;
- virtual BOOL SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0;
+ virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0;
// Return the text of a previous paragraph. This must not be empty!
// If no paragraph exits or just an empty one, then return 0.
@@ -94,36 +94,36 @@ public:
// TRUE: before the normal insertion position (TRUE)
// FALSE: in which the corrected word was inserted.
// (Does not to have to be the same paragraph !!!!)
- virtual const String* GetPrevPara( BOOL bAtNormalPos ) = 0;
+ virtual const String* GetPrevPara( sal_Bool bAtNormalPos ) = 0;
- virtual BOOL ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos,
+ virtual sal_Bool ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos,
SvxAutoCorrect& rACorrect,
const String** ppPara ) = 0;
// Is called after the change of the signs by the functions
// - FnCptlSttWrd
// - FnCptlSttSntnc
// As an option, the words can then be inserted into the exception lists.
- virtual void SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos,
+ virtual void SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos,
const String& rExceptWord,
sal_Unicode cChar );
// which language at the position?
- virtual LanguageType GetLanguage( xub_StrLen nPos, BOOL bPrevPara = FALSE ) const;
+ virtual LanguageType GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara = sal_False ) const;
};
class EDITENG_DLLPUBLIC SvxAutocorrWord
{
String sShort, sLong;
- BOOL bIsTxtOnly; // Is pure ASCII - Text
+ sal_Bool bIsTxtOnly; // Is pure ASCII - Text
public:
- SvxAutocorrWord( const String& rS, const String& rL, BOOL bFlag = TRUE )
+ SvxAutocorrWord( const String& rS, const String& rL, sal_Bool bFlag = sal_True )
: sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag )
{}
const String& GetShort() const { return sShort; }
const String& GetLong() const { return sLong; }
- BOOL IsTextOnly() const { return bIsTxtOnly; }
+ sal_Bool IsTextOnly() const { return bIsTxtOnly; }
};
typedef SvxAutocorrWord* SvxAutocorrWordPtr;
@@ -144,16 +144,16 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists
long nFlags;
- BOOL IsFileChanged_Imp();
+ sal_Bool IsFileChanged_Imp();
void LoadXMLExceptList_Imp( SvStringsISortDtor*& rpLst,
const sal_Char* pStrmName,
SotStorageRef& rStg);
void SaveExceptList_Imp( const SvStringsISortDtor& rLst,
const sal_Char* pStrmName,
SotStorageRef& rStg,
- BOOL bConvert = FALSE);
+ sal_Bool bConvert = sal_False);
- BOOL MakeBlocklist_Imp( SotStorage& rStg );
+ sal_Bool MakeBlocklist_Imp( SotStorage& rStg );
void RemoveStream_Imp( const String& rName );
void MakeUserStorage_Impl();
@@ -175,7 +175,7 @@ public:
void SaveCplSttExceptList();
void SetCplSttExceptList( SvStringsISortDtor* pList );
SvStringsISortDtor* GetCplSttExceptList();
- BOOL AddToCplSttExceptList(const String& rNew);
+ sal_Bool AddToCplSttExceptList(const String& rNew);
// Load, Set, Get the exception list for 2 Capital letters at the
// begining of a word.
@@ -183,17 +183,17 @@ public:
void SaveWrdSttExceptList();
void SetWrdSttExceptList( SvStringsISortDtor* pList );
SvStringsISortDtor* GetWrdSttExceptList();
- BOOL AddToWrdSttExceptList(const String& rNew);
+ sal_Bool AddToWrdSttExceptList(const String& rNew);
// Save word substitutions:
// Store these directly in the storage. The word list is updated
// accordingly!
// - pure Text
- BOOL PutText( const String& rShort, const String& rLong );
+ sal_Bool PutText( const String& rShort, const String& rLong );
// - Text with attribution (only the SWG - SWG format!)
- BOOL PutText( const String& rShort, SfxObjectShell& );
+ sal_Bool PutText( const String& rShort, SfxObjectShell& );
// - Deleting an entry
- BOOL DeleteText( const String& rShort );
+ sal_Bool DeleteText( const String& rShort );
};
@@ -227,19 +227,19 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect
protected:
// - Text with attribution (only the SWG - SWG format!)
// rShort is the stream name - encrypted!
- virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& ,
+ virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& ,
String& );
// required language in the table add if possible only when the file exists
- BOOL CreateLanguageFile(LanguageType eLang, BOOL bNewFile = TRUE);
+ sal_Bool CreateLanguageFile(LanguageType eLang, sal_Bool bNewFile = sal_True);
// - Return the replacement text (only for SWG format, all others can be
// taken from the word list!)
// rShort is the stream name - encrypted!
public:
- sal_Unicode GetQuote( sal_Unicode cInsChar, BOOL bSttQuote,
+ sal_Unicode GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote,
LanguageType eLang ) const;
- virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong );
+ virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong );
TYPEINFO();
@@ -250,12 +250,12 @@ public:
// Execute an AutoCorrect.
// Returns what has been executed, according to the above flags
- ULONG AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
- xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert, Window* pFrameWin = NULL );
+ sal_uLong AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nPos, sal_Unicode cInsChar, sal_Bool bInsert, Window* pFrameWin = NULL );
// Return for the autotext expansion the previous word,
// AutoCorrect - corresponding algorithm
- BOOL GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt,
+ sal_Bool GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nPos, String& rWord ) const;
// Search for or or the words in the replacement table.
@@ -281,24 +281,24 @@ public:
void SetEndDoubleQuote( const sal_Unicode cEnd ) { cEndDQuote = cEnd; }
String GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
- sal_Unicode cInsChar, BOOL bSttQuote );
+ sal_Unicode cInsChar, sal_Bool bSttQuote );
void InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
- sal_Unicode cInsChar, BOOL bSttQuote, BOOL bIns );
+ sal_Unicode cInsChar, sal_Bool bSttQuote, sal_Bool bIns );
// Query/Set the name of the AutoCorrect file
// the default is "autocorr.dat"
String GetAutoCorrFileName( LanguageType eLang = LANGUAGE_SYSTEM,
- BOOL bNewFile = FALSE,
- BOOL bTstUserExist = FALSE ) const;
+ sal_Bool bNewFile = sal_False,
+ sal_Bool bTstUserExist = sal_False ) const;
void SetUserAutoCorrFileName( const String& rNew );
void SetShareAutoCorrFileName( const String& rNew );
// Query/Set the current settings of AutoCorrect
long GetFlags() const { return nFlags; }
inline SvxSwAutoFmtFlags& GetSwFlags() { return aSwFlags;}
- BOOL IsAutoCorrFlag( long nFlag ) const
- { return nFlags & nFlag ? TRUE : FALSE; }
- void SetAutoCorrFlag( long nFlag, BOOL bOn = TRUE );
+ sal_Bool IsAutoCorrFlag( long nFlag ) const
+ { return nFlags & nFlag ? sal_True : sal_False; }
+ void SetAutoCorrFlag( long nFlag, sal_Bool bOn = sal_True );
// Load, Set, Get - the replacement list
SvxAutocorrWordList* LoadAutocorrWordList(
@@ -312,14 +312,14 @@ public:
// Save these directly in the storage. The word list is updated
// accordingly!
// - pure Text
- BOOL PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM );
+ sal_Bool PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM );
// - Text with attribution (only in the SWG - SWG format!)
- BOOL PutText( const String& rShort, SfxObjectShell& rShell,
+ sal_Bool PutText( const String& rShort, SfxObjectShell& rShell,
LanguageType eLang = LANGUAGE_SYSTEM )
{ return _GetLanguageList( eLang ).PutText(rShort, rShell ); }
// - Delete a entry
- BOOL DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM);
+ sal_Bool DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM);
// Load, Set, Get - the exception list for capital letters at the
// beginning of a sentence
@@ -332,7 +332,7 @@ public:
{ return _GetLanguageList( eLang ).GetCplSttExceptList(); }
// Adds a single word. The list will be immediately written to the file!
- BOOL AddCplSttException( const String& rNew,
+ sal_Bool AddCplSttException( const String& rNew,
LanguageType eLang = LANGUAGE_SYSTEM );
// Load, Set, Get the exception list for 2 Capital letters at the
@@ -345,33 +345,33 @@ public:
LanguageType eLang = LANGUAGE_SYSTEM )
{ return _GetLanguageList( eLang ).GetWrdSttExceptList(); }
// Adds a single word. The list will be immediately written to the file!
- BOOL AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM);
+ sal_Bool AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM);
// Search through the Languages for the entry
- BOOL FindInWrdSttExceptList( LanguageType eLang, const String& sWord );
- BOOL FindInCplSttExceptList( LanguageType eLang, const String& sWord,
- BOOL bAbbreviation = FALSE);
+ sal_Bool FindInWrdSttExceptList( LanguageType eLang, const String& sWord );
+ sal_Bool FindInCplSttExceptList( LanguageType eLang, const String& sWord,
+ sal_Bool bAbbreviation = sal_False);
// Methods for the auto-correction
- BOOL FnCptlSttWrd( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnCptlSttWrd( SvxAutoCorrDoc&, const String&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- BOOL FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- BOOL FnChgToEnEmDash( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnChgToEnEmDash( SvxAutoCorrDoc&, const String&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- BOOL FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- BOOL FnSetINetAttr( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnSetINetAttr( SvxAutoCorrDoc&, const String&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- BOOL FnChgWeightUnderl( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnChgWeightUnderl( SvxAutoCorrDoc&, const String&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- BOOL FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, BOOL bNormalPos,
+ sal_Bool FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, sal_Bool bNormalPos,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM);
bool FnCorrectCapsLock( SvxAutoCorrDoc&, const String&,
@@ -382,7 +382,7 @@ public:
static long GetDefaultFlags();
-// returns TRUE for charcters where the function
+// returns sal_True for charcters where the function
// 'SvxAutoCorrect::AutoCorrect' should be called.
// (used to avoid occasional 'collisions' with (Thai) input-sequence-checking)
static sal_Bool IsAutoCorrectChar( sal_Unicode cChar );
diff --git a/editeng/inc/editeng/svxenum.hxx b/editeng/inc/editeng/svxenum.hxx
index f9305e0f76..f9305e0f76 100644..100755
--- a/editeng/inc/editeng/svxenum.hxx
+++ b/editeng/inc/editeng/svxenum.hxx
diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx
index 63751d7f16..fbfe9de3c8 100644..100755
--- a/editeng/inc/editeng/svxfont.hxx
+++ b/editeng/inc/editeng/svxfont.hxx
@@ -47,7 +47,7 @@ class EDITENG_DLLPUBLIC SvxFont : public Font
LanguageType eLang; // Language
SvxCaseMap eCaseMap; // Text Markup
short nEsc; // Degree of Superscript/Subscript
- BYTE nPropr; // Degree of reduction of the font height
+ sal_uInt8 nPropr; // Degree of reduction of the font height
short nKern; // Kerning in Pt
public:
@@ -59,10 +59,10 @@ public:
inline short GetEscapement() const { return nEsc; }
inline void SetEscapement( const short nNewEsc ) { nEsc = nNewEsc; }
- inline BYTE GetPropr() const { return nPropr; }
- inline void SetPropr( const BYTE nNewPropr ) { nPropr = nNewPropr; }
- inline void SetProprRel( const BYTE nNewPropr )
- { SetPropr( (BYTE)( (long)nNewPropr * (long)nPropr / 100L ) ); }
+ inline sal_uInt8 GetPropr() const { return nPropr; }
+ inline void SetPropr( const sal_uInt8 nNewPropr ) { nPropr = nNewPropr; }
+ inline void SetProprRel( const sal_uInt8 nNewPropr )
+ { SetPropr( (sal_uInt8)( (long)nNewPropr * (long)nPropr / 100L ) ); }
// Kerning
inline short GetFixKerning() const { return nKern; }
@@ -76,10 +76,10 @@ public:
{ eLang = eNewLan; Font::SetLanguage(eNewLan); }
// Is-Methods:
- inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; }
- inline BOOL IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; }
- inline BOOL IsKern() const { return 0 != nKern; }
- inline BOOL IsEsc() const { return 0 != nEsc; }
+ inline sal_Bool IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; }
+ inline sal_Bool IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; }
+ inline sal_Bool IsKern() const { return 0 != nKern; }
+ inline sal_Bool IsEsc() const { return 0 != nEsc; }
// Consider Upper case, Lower case letters etc.
String CalcCaseMap( const String &rTxt ) const;
@@ -88,40 +88,40 @@ public:
#ifndef REDUCEDSVXFONT
// Handle upper case letters
void DoOnCapitals( SvxDoCapitals &rDo,
- const USHORT nPartLen = USHRT_MAX ) const;
+ const sal_uInt16 nPartLen = USHRT_MAX ) const;
void SetPhysFont( OutputDevice *pOut ) const;
Font ChgPhysFont( OutputDevice *pOut ) const;
Size GetCapitalSize( const OutputDevice *pOut, const String &rTxt,
- const USHORT nIdx, const USHORT nLen) const;
+ const sal_uInt16 nIdx, const sal_uInt16 nLen) const;
void DrawCapital( OutputDevice *pOut, const Point &rPos, const String &rTxt,
- const USHORT nIdx, const USHORT nLen ) const;
+ const sal_uInt16 nIdx, const sal_uInt16 nLen ) const;
Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt,
- const USHORT nIdx, const USHORT nLen ) const;
+ const sal_uInt16 nIdx, const sal_uInt16 nLen ) const;
Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt );
Size GetTxtSize( const OutputDevice *pOut, const String &rTxt,
- const USHORT nIdx = 0, const USHORT nLen = STRING_LEN );
+ const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN );
void DrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt,
- const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const;
+ const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const;
void QuickDrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt,
- const USHORT nIdx = 0, const USHORT nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const;
+ const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const;
Size QuickGetTextSize( const OutputDevice *pOut, const String &rTxt,
- const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray = NULL ) const;
+ const sal_uInt16 nIdx, const sal_uInt16 nLen, sal_Int32* pDXArray = NULL ) const;
void DrawPrev( OutputDevice* pOut, Printer* pPrinter,
const Point &rPos, const String &rTxt,
- const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const;
+ const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const;
#endif // !REDUCEDSVXFONT
static void DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
- const Size& rSize, const Color& rCol, BOOL bLeft );
+ const Size& rSize, const Color& rCol, sal_Bool bLeft );
SvxFont& operator=( const SvxFont& rFont );
SvxFont& operator=( const Font& rFont );
};
diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx
index 1ed8ef222f..17854b3bc3 100644..100755
--- a/editeng/inc/editeng/svxrtf.hxx
+++ b/editeng/inc/editeng/svxrtf.hxx
@@ -34,9 +34,11 @@
#include <svl/itemset.hxx>
#include <svtools/parrtf.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uInt16S
#include <svl/svstdarr.hxx>
#include <editeng/editengdllapi.h>
+
+#include <deque>
#include <utility>
#include <vector>
class Font;
@@ -66,7 +68,7 @@ class SvxNodeIdx
{
public:
virtual ~SvxNodeIdx() {}
- virtual ULONG GetIdx() const = 0;
+ virtual sal_uLong GetIdx() const = 0;
virtual SvxNodeIdx* Clone() const = 0; // Cloning itself
};
@@ -75,7 +77,7 @@ class SvxPosition
public:
virtual ~SvxPosition() {}
- virtual ULONG GetNodeIdx() const = 0;
+ virtual sal_uLong GetNodeIdx() const = 0;
virtual xub_StrLen GetCntIdx() const = 0;
virtual SvxPosition* Clone() const = 0; // Cloning itself
@@ -84,24 +86,27 @@ public:
typedef Color* ColorPtr;
-SV_DECL_PTRARR( SvxRTFColorTbl, ColorPtr, 16, 4 )
+typedef std::deque< ColorPtr > SvxRTFColorTbl;
DECLARE_TABLE( SvxRTFFontTbl, Font* )
DECLARE_TABLE( SvxRTFStyleTbl, SvxRTFStyleType* )
typedef SvxRTFItemStackType* SvxRTFItemStackTypePtr;
SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1, 1 )
-SV_DECL_PTRARR_STACK( SvxRTFItemStack, SvxRTFItemStackTypePtr, 0, 1 )
+
+// SvxRTFItemStack can't be "std::stack< SvxRTFItemStackTypePtr >" type, because
+// the methods are using operator[] in sw/source/filter/rtf/rtftbl.cxx file
+typedef std::deque< SvxRTFItemStackTypePtr > SvxRTFItemStack;
// own helper classes for the RTF Parser
struct SvxRTFStyleType
{
SfxItemSet aAttrSet; // the attributes of Style (+ derivate!)
String sName;
- USHORT nBasedOn, nNext;
- BOOL bBasedOnIsSet;
- BYTE nOutlineNo;
- BOOL bIsCharFmt;
+ sal_uInt16 nBasedOn, nNext;
+ sal_Bool bBasedOnIsSet;
+ sal_uInt8 nOutlineNo;
+ sal_Bool bIsCharFmt;
- SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange );
+ SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange );
};
@@ -128,14 +133,14 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType
HEX_MODE
} nMode;
- USHORT nType;
+ sal_uInt16 nType;
sal_uInt32 uPicLen;
- USHORT nWidth, nHeight;
- USHORT nGoalWidth, nGoalHeight;
- USHORT nBitsPerPixel;
- USHORT nPlanes;
- USHORT nWidthBytes;
- USHORT nScalX, nScalY;
+ sal_uInt16 nWidth, nHeight;
+ sal_uInt16 nGoalWidth, nGoalHeight;
+ sal_uInt16 nBitsPerPixel;
+ sal_uInt16 nPlanes;
+ sal_uInt16 nWidthBytes;
+ sal_uInt16 nScalX, nScalY;
short nCropT, nCropB, nCropL, nCropR;
PictPropertyNameValuePairs aPropertyPairs;
SvxRTFPictureType() { ResetValues(); }
@@ -148,7 +153,7 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType
// the SlotIds from POOL.
struct RTFPlainAttrMapIds
{
- USHORT nCaseMap,
+ sal_uInt16 nCaseMap,
nBgColor,
nColor,
nContour,
@@ -191,7 +196,7 @@ struct RTFPlainAttrMapIds
// the SlotIds from POOL.
struct RTFPardAttrMapIds
{
- USHORT nLinespacing,
+ sal_uInt16 nLinespacing,
nAdjust,
nTabStop,
nHyphenzone,
@@ -242,23 +247,23 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser
long nVersionNo;
int nDfltFont;
- BOOL bNewDoc : 1; // FALSE - Reading in an existing
- BOOL bNewGroup : 1; // TRUE - there was an opening parenthesis
- BOOL bIsSetDfltTab : 1; // TRUE - DefTab was loaded
- BOOL bChkStyleAttr : 1; // TRUE - StyleSheets are evaluated
- BOOL bCalcValue : 1; // TRUE - Twip values adapt to App
- BOOL bPardTokenRead : 1; // TRUE - Token \pard was detected
- BOOL bReadDocInfo : 1; // TRUE - DocInfo to read
- BOOL bIsLeftToRightDef : 1; // TRUE - in LeftToRight char run def.
- // FALSE - in RightToLeft char run def.
- BOOL bIsInReadStyleTab : 1; // TRUE - in ReadStyleTable
+ sal_Bool bNewDoc : 1; // FALSE - Reading in an existing
+ sal_Bool bNewGroup : 1; // TRUE - there was an opening parenthesis
+ sal_Bool bIsSetDfltTab : 1; // TRUE - DefTab was loaded
+ sal_Bool bChkStyleAttr : 1; // TRUE - StyleSheets are evaluated
+ sal_Bool bCalcValue : 1; // TRUE - Twip values adapt to App
+ sal_Bool bPardTokenRead : 1; // TRUE - Token \pard was detected
+ sal_Bool bReadDocInfo : 1; // TRUE - DocInfo to read
+ sal_Bool bIsLeftToRightDef : 1; // TRUE - in LeftToRight char run def.
+ // FALSE - in RightToLeft char run def.
+ sal_Bool bIsInReadStyleTab : 1; // TRUE - in ReadStyleTable
void ClearColorTbl();
void ClearFontTbl();
void ClearStyleTbl();
void ClearAttrStack();
- SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=FALSE ); // Create new ItemStackType:s
+ SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=sal_False ); // Create new ItemStackType:s
void _ClearStyleAttr( SvxRTFItemStackType& rStkType );
// Sets all the attributes that are different from the current
@@ -317,7 +322,7 @@ protected:
virtual void InsertText() = 0;
- virtual void MovePos( int bForward = TRUE ) = 0;
+ virtual void MovePos( int bForward = sal_True ) = 0;
virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos,
xub_StrLen& rCntPos )=0;
virtual void SetAttrInDoc( SvxRTFItemStackType &rSet );
@@ -331,7 +336,7 @@ protected:
SvStream& rIn,
::com::sun::star::uno::Reference<
::com::sun::star::document::XDocumentProperties> i_xDocProps,
- int bReadNewDoc = TRUE );
+ int bReadNewDoc = sal_True );
virtual ~SvxRTFParser();
int IsNewDoc() const { return bNewDoc; }
@@ -355,8 +360,8 @@ protected:
// Query/Set the mapping IDs for the Pard/Plain attributes
//(Set: It is noted in the pointers, which thus does not create a copy)
- void AddPardAttr( USHORT nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); }
- void AddPlainAttr( USHORT nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); }
+ void AddPardAttr( sal_uInt16 nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); }
+ void AddPlainAttr( sal_uInt16 nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); }
SvxRTFStyleTbl& GetStyleTbl() { return aStyleTbl; }
SvxRTFItemStack& GetAttrStack() { return aAttrStack; }
@@ -368,7 +373,7 @@ protected:
// Read the graphics data and make up for the graphics and the picture
// meta data.
// Return - TRUE: the graphic is valid
- BOOL ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType );
+ sal_Bool ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType );
// Change the ASCII-HexCodes into binary characters. If invalid data is
// found (strings not 0-9 | a-f | A-F, then USHRT_MAX is returned,
// otherwise the number of the converted character.
@@ -378,8 +383,8 @@ public:
virtual SvParserState CallParser();
- inline const Color& GetColor( USHORT nId ) const;
- const Font& GetFont( USHORT nId ); // Changes the dflt Font
+ inline const Color& GetColor( size_t nId ) const;
+ const Font& GetFont( sal_uInt16 nId ); // Changes the dflt Font
virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0;
@@ -392,8 +397,8 @@ public:
RTFPlainAttrMapIds& GetPlainMap()
{ return (RTFPlainAttrMapIds&)*aPlainMap.GetData(); }
// to be able to assign them from the outside as for example table cells
- void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE );
- void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE );
+ void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False );
+ void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False );
// for asynchronous read from the SvStream
virtual void Continue( int nToken );
@@ -415,9 +420,9 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType
SvxNodeIdx *pSttNd, *pEndNd;
xub_StrLen nSttCnt, nEndCnt;
SvxRTFItemStackList* pChildList;
- USHORT nStyleNo;
+ sal_uInt16 nStyleNo;
- SvxRTFItemStackType( SfxItemPool&, const USHORT* pWhichRange,
+ SvxRTFItemStackType( SfxItemPool&, const sal_uInt16* pWhichRange,
const SvxPosition& );
~SvxRTFItemStackType();
@@ -426,7 +431,7 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType
public:
SvxRTFItemStackType( const SvxRTFItemStackType&, const SvxPosition&,
- int bCopyAttr = FALSE );
+ int bCopyAttr = sal_False );
//cmc, I'm very suspicios about SetStartPos, it doesn't change
//its children's starting position, and the implementation looks
//bad, consider this deprecated.
@@ -435,8 +440,8 @@ public:
void MoveFullNode(const SvxNodeIdx &rOldNode,
const SvxNodeIdx &rNewNode);
- ULONG GetSttNodeIdx() const { return pSttNd->GetIdx(); }
- ULONG GetEndNodeIdx() const { return pEndNd->GetIdx(); }
+ sal_uLong GetSttNodeIdx() const { return pSttNd->GetIdx(); }
+ sal_uLong GetEndNodeIdx() const { return pEndNd->GetIdx(); }
const SvxNodeIdx& GetSttNode() const { return *pSttNd; }
const SvxNodeIdx& GetEndNode() const { return *pEndNd; }
@@ -447,7 +452,7 @@ public:
SfxItemSet& GetAttrSet() { return aAttrSet; }
const SfxItemSet& GetAttrSet() const { return aAttrSet; }
- USHORT StyleNo() const { return nStyleNo; }
+ sal_uInt16 StyleNo() const { return nStyleNo; }
void SetRTFDefaults( const SfxItemSet& rDefaults );
};
@@ -455,10 +460,10 @@ public:
// ----------- Inline Implementations --------------
-inline const Color& SvxRTFParser::GetColor( USHORT nId ) const
+inline const Color& SvxRTFParser::GetColor( size_t nId ) const
{
ColorPtr pColor = (ColorPtr)pDfltColor;
- if( nId < aColorTbl.Count() )
+ if( nId < aColorTbl.size() )
pColor = aColorTbl[ nId ];
return *pColor;
}
@@ -466,7 +471,7 @@ inline const Color& SvxRTFParser::GetColor( USHORT nId ) const
inline SfxItemSet& SvxRTFParser::GetAttrSet()
{
SvxRTFItemStackTypePtr pTmp;
- if( bNewGroup || 0 == ( pTmp = aAttrStack.Top()) )
+ if( bNewGroup || 0 == ( pTmp = aAttrStack.empty() ? 0 : aAttrStack.back()) )
pTmp = _GetAttrSet();
return pTmp->aAttrSet;
}
diff --git a/editeng/inc/editeng/swafopt.hxx b/editeng/inc/editeng/swafopt.hxx
index f22b13f403..0f1583744a 100644..100755
--- a/editeng/inc/editeng/swafopt.hxx
+++ b/editeng/inc/editeng/swafopt.hxx
@@ -45,54 +45,54 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags
sal_Unicode cBullet;
sal_Unicode cByInputBullet;
- USHORT nAutoCmpltWordLen, nAutoCmpltListLen;
- USHORT nAutoCmpltExpandKey;
+ sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen;
+ sal_uInt16 nAutoCmpltExpandKey;
- BYTE nRightMargin;
+ sal_uInt8 nRightMargin;
- BOOL bAutoCorrect : 1;
- BOOL bCptlSttSntnc : 1;
- BOOL bCptlSttWrd : 1;
- BOOL bChkFontAttr : 1;
+ sal_Bool bAutoCorrect : 1;
+ sal_Bool bCptlSttSntnc : 1;
+ sal_Bool bCptlSttWrd : 1;
+ sal_Bool bChkFontAttr : 1;
- BOOL bChgUserColl : 1;
- BOOL bChgEnumNum : 1;
+ sal_Bool bChgUserColl : 1;
+ sal_Bool bChgEnumNum : 1;
- BOOL bAFmtByInput : 1;
- BOOL bDelEmptyNode : 1;
- BOOL bSetNumRule : 1;
+ sal_Bool bAFmtByInput : 1;
+ sal_Bool bDelEmptyNode : 1;
+ sal_Bool bSetNumRule : 1;
- BOOL bChgOrdinalNumber : 1;
- BOOL bChgToEnEmDash : 1;
- BOOL bAddNonBrkSpace : 1;
- BOOL bChgWeightUnderl : 1;
- BOOL bSetINetAttr : 1;
+ sal_Bool bChgOrdinalNumber : 1;
+ sal_Bool bChgToEnEmDash : 1;
+ sal_Bool bAddNonBrkSpace : 1;
+ sal_Bool bChgWeightUnderl : 1;
+ sal_Bool bSetINetAttr : 1;
- BOOL bSetBorder : 1;
- BOOL bCreateTable : 1;
- BOOL bReplaceStyles : 1;
- BOOL bDummy : 1;
+ sal_Bool bSetBorder : 1;
+ sal_Bool bCreateTable : 1;
+ sal_Bool bReplaceStyles : 1;
+ sal_Bool bDummy : 1;
- BOOL bWithRedlining : 1;
+ sal_Bool bWithRedlining : 1;
- BOOL bRightMargin : 1;
+ sal_Bool bRightMargin : 1;
- BOOL bAutoCompleteWords : 1;
- BOOL bAutoCmpltCollectWords : 1;
- BOOL bAutoCmpltEndless : 1;
+ sal_Bool bAutoCompleteWords : 1;
+ sal_Bool bAutoCmpltCollectWords : 1;
+ sal_Bool bAutoCmpltEndless : 1;
// -- under NT here starts a new long
- BOOL bAutoCmpltAppendBlanc : 1;
- BOOL bAutoCmpltShowAsTip : 1;
+ sal_Bool bAutoCmpltAppendBlanc : 1;
+ sal_Bool bAutoCmpltShowAsTip : 1;
- BOOL bAFmtDelSpacesAtSttEnd : 1;
- BOOL bAFmtDelSpacesBetweenLines : 1;
- BOOL bAFmtByInpDelSpacesAtSttEnd : 1;
- BOOL bAFmtByInpDelSpacesBetweenLines : 1;
+ sal_Bool bAFmtDelSpacesAtSttEnd : 1;
+ sal_Bool bAFmtDelSpacesBetweenLines : 1;
+ sal_Bool bAFmtByInpDelSpacesAtSttEnd : 1;
+ sal_Bool bAFmtByInpDelSpacesBetweenLines : 1;
- BOOL bAutoCmpltKeepList : 1;
+ sal_Bool bAutoCmpltKeepList : 1;
// some dummies for any new options
- BOOL bDummy6 : 1,
+ sal_Bool bDummy6 : 1,
bDummy7 : 1,
bDummy8 : 1
;
diff --git a/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx
index 568225ccde..eb0411c6b4 100644..100755
--- a/editeng/inc/editeng/tstpitem.hxx
+++ b/editeng/inc/editeng/tstpitem.hxx
@@ -84,7 +84,7 @@ public:
String GetValueString() const;
// the "old" operator==()
- BOOL IsEqual( const SvxTabStop& rTS ) const
+ sal_Bool IsEqual( const SvxTabStop& rTS ) const
{
return ( nTabPos == rTS.nTabPos &&
eAdjustment == rTS.eAdjustment &&
@@ -93,9 +93,9 @@ public:
}
// For the SortedArray:
- BOOL operator==( const SvxTabStop& rTS ) const
+ sal_Bool operator==( const SvxTabStop& rTS ) const
{ return nTabPos == rTS.nTabPos; }
- BOOL operator <( const SvxTabStop& rTS ) const
+ sal_Bool operator <( const SvxTabStop& rTS ) const
{ return nTabPos < rTS.nTabPos; }
SvxTabStop& operator=( const SvxTabStop& rTS )
@@ -124,27 +124,27 @@ class EDITENG_DLLPUBLIC SvxTabStopItem : public SfxPoolItem, private SvxTabStopA
public:
TYPEINFO();
- SvxTabStopItem( USHORT nWhich );
- SvxTabStopItem( const USHORT nTabs,
- const USHORT nDist,
+ SvxTabStopItem( sal_uInt16 nWhich );
+ SvxTabStopItem( const sal_uInt16 nTabs,
+ const sal_uInt16 nDist,
const SvxTabAdjust eAdjst /*= SVX_TAB_ADJUST_DEFAULT*/,
- USHORT nWhich );
+ sal_uInt16 nWhich );
SvxTabStopItem( const SvxTabStopItem& rTSI );
// Returns index of the tab or TAB_NOTFOUND
- USHORT GetPos( const SvxTabStop& rTab ) const;
+ sal_uInt16 GetPos( const SvxTabStop& rTab ) const;
// Returns index of the tab at nPos, or TAB_NOTFOUND
- USHORT GetPos( const long nPos ) const;
+ sal_uInt16 GetPos( const long nPos ) const;
// unprivatized:
- USHORT Count() const { return SvxTabStopArr::Count(); }
- BOOL Insert( const SvxTabStop& rTab );
- void Insert( const SvxTabStopItem* pTabs, USHORT nStart = 0,
- USHORT nEnd = USHRT_MAX );
+ sal_uInt16 Count() const { return SvxTabStopArr::Count(); }
+ sal_Bool Insert( const SvxTabStop& rTab );
+ void Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart = 0,
+ sal_uInt16 nEnd = USHRT_MAX );
void Remove( SvxTabStop& rTab )
{ SvxTabStopArr::Remove( rTab ); }
- void Remove( const USHORT nPos, const USHORT nLen = 1 )
+ void Remove( const sal_uInt16 nPos, const sal_uInt16 nLen = 1 )
{ SvxTabStopArr::Remove( nPos, nLen ); }
// Assignment operator, equality operator (caution: expensive!)
@@ -155,7 +155,7 @@ public:
// { return !( operator==( rTSI ) ); }
// SortedArrays returns only Stackobjects!
- const SvxTabStop& operator[]( const USHORT nPos ) const
+ const SvxTabStop& operator[]( const sal_uInt16 nPos ) const
{
DBG_ASSERT( GetStart() &&
nPos < Count(), "op[]" );
@@ -166,8 +166,8 @@ public:
// "pure virtual Methods" from SfxPoolItem
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,
@@ -175,8 +175,8 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
- virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const;
+ virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
using SvxTabStopArr::Insert;
using SvxTabStopArr::Remove;
diff --git a/editeng/inc/editeng/twolinesitem.hxx b/editeng/inc/editeng/twolinesitem.hxx
index 71c80f8957..6bcf02b0bd 100644..100755
--- a/editeng/inc/editeng/twolinesitem.hxx
+++ b/editeng/inc/editeng/twolinesitem.hxx
@@ -44,7 +44,7 @@ class EDITENG_DLLPUBLIC SvxTwoLinesItem : public SfxPoolItem
sal_Bool bOn;
public:
TYPEINFO();
- SvxTwoLinesItem( sal_Bool bOn /*= TRUE*/,
+ SvxTwoLinesItem( sal_Bool bOn /*= sal_True*/,
sal_Unicode nStartBracket /*= 0*/,
sal_Unicode nEndBracket /*= 0*/,
sal_uInt16 nId );
@@ -54,20 +54,18 @@ public:
// "pure virtual Methods" from SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
- virtual SvStream& Store(SvStream &, USHORT nIVer) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVer) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nIVer) 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 );
- virtual USHORT GetVersion( USHORT nFFVer ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFFVer ) const;
SvxTwoLinesItem& operator=( const SvxTwoLinesItem& rCpy )
{
diff --git a/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx
index 141fd9fa39..1655b2967a 100644..100755
--- a/editeng/inc/editeng/txtrange.hxx
+++ b/editeng/inc/editeng/txtrange.hxx
@@ -62,56 +62,56 @@ class EDITENG_DLLPUBLIC TextRanger
PolyPolygon *mpPolyPolygon; // Surface polygon
PolyPolygon *mpLinePolyPolygon; // Line polygon
Rectangle *pBound; // Comprehensive rectangle
- USHORT nCacheSize; // Cache-Size
- USHORT nRight; // Distance Contour-Text
- USHORT nLeft; // Distance Text-Contour
- USHORT nUpper; // Distance Contour-Text
- USHORT nLower; // Distance Text-Contour
+ sal_uInt16 nCacheSize; // Cache-Size
+ sal_uInt16 nRight; // Distance Contour-Text
+ sal_uInt16 nLeft; // Distance Text-Contour
+ sal_uInt16 nUpper; // Distance Contour-Text
+ sal_uInt16 nLower; // Distance Text-Contour
sal_uInt32 nPointCount; // Number of polygon points
- BOOL bSimple : 1; // Just outside edge
- BOOL bInner : 1; // TRUE: Objekt inline (EditEngine);
+ sal_Bool bSimple : 1; // Just outside edge
+ sal_Bool bInner : 1; // TRUE: Objekt inline (EditEngine);
// FALSE: Objekt flow (StarWriter);
- BOOL bVertical :1; // for vertical writing mode
- BOOL bFlag3 :1;
- BOOL bFlag4 :1;
- BOOL bFlag5 :1;
- BOOL bFlag6 :1;
- BOOL bFlag7 :1;
+ sal_Bool bVertical :1; // for vertical writing mode
+ sal_Bool bFlag3 :1;
+ sal_Bool bFlag4 :1;
+ sal_Bool bFlag5 :1;
+ sal_Bool bFlag6 :1;
+ sal_Bool bFlag7 :1;
TextRanger( const TextRanger& ); // not implemented
const Rectangle& _GetBoundRect();
public:
TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
const basegfx::B2DPolyPolygon* pLinePolyPolygon,
- USHORT nCacheSize, USHORT nLeft, USHORT nRight,
- BOOL bSimple, BOOL bInner, BOOL bVert = sal_False );
+ sal_uInt16 nCacheSize, sal_uInt16 nLeft, sal_uInt16 nRight,
+ sal_Bool bSimple, sal_Bool bInner, sal_Bool bVert = sal_False );
~TextRanger();
LongDqPtr GetTextRanges( const Range& rRange );
- USHORT GetRight() const { return nRight; }
- USHORT GetLeft() const { return nLeft; }
- USHORT GetUpper() const { return nUpper; }
- USHORT GetLower() const { return nLower; }
+ sal_uInt16 GetRight() const { return nRight; }
+ sal_uInt16 GetLeft() const { return nLeft; }
+ sal_uInt16 GetUpper() const { return nUpper; }
+ sal_uInt16 GetLower() const { return nLower; }
sal_uInt32 GetPointCount() const { return nPointCount; }
- BOOL IsSimple() const { return bSimple; }
- BOOL IsInner() const { return bInner; }
- BOOL IsVertical() const { return bVertical; }
- BOOL HasBorder() const { return nRight || nLeft; }
+ sal_Bool IsSimple() const { return bSimple; }
+ sal_Bool IsInner() const { return bInner; }
+ sal_Bool IsVertical() const { return bVertical; }
+ sal_Bool HasBorder() const { return nRight || nLeft; }
const PolyPolygon& GetPolyPolygon() const { return *mpPolyPolygon; }
const PolyPolygon* GetLinePolygon() const { return mpLinePolyPolygon; }
const Rectangle& GetBoundRect()
{ return pBound ? static_cast< const Rectangle& >(*pBound) : _GetBoundRect(); }
- void SetUpper( USHORT nNew ){ nUpper = nNew; }
- void SetLower( USHORT nNew ){ nLower = nNew; }
- void SetVertical( BOOL bNew );
- BOOL IsFlag3() const { return bFlag3; }
- void SetFlag3( BOOL bNew ) { bFlag3 = bNew; }
- BOOL IsFlag4() const { return bFlag4; }
- void SetFlag4( BOOL bNew ) { bFlag4 = bNew; }
- BOOL IsFlag5() const { return bFlag5; }
- void SetFlag5( BOOL bNew ) { bFlag5 = bNew; }
- BOOL IsFlag6() const { return bFlag6; }
- void SetFlag6( BOOL bNew ) { bFlag6 = bNew; }
- BOOL IsFlag7() const { return bFlag7; }
- void SetFlag7( BOOL bNew ) { bFlag7 = bNew; }
+ void SetUpper( sal_uInt16 nNew ){ nUpper = nNew; }
+ void SetLower( sal_uInt16 nNew ){ nLower = nNew; }
+ void SetVertical( sal_Bool bNew );
+ sal_Bool IsFlag3() const { return bFlag3; }
+ void SetFlag3( sal_Bool bNew ) { bFlag3 = bNew; }
+ sal_Bool IsFlag4() const { return bFlag4; }
+ void SetFlag4( sal_Bool bNew ) { bFlag4 = bNew; }
+ sal_Bool IsFlag5() const { return bFlag5; }
+ void SetFlag5( sal_Bool bNew ) { bFlag5 = bNew; }
+ sal_Bool IsFlag6() const { return bFlag6; }
+ void SetFlag6( sal_Bool bNew ) { bFlag6 = bNew; }
+ sal_Bool IsFlag7() const { return bFlag7; }
+ void SetFlag7( sal_Bool bNew ) { bFlag7 = bNew; }
};
diff --git a/editeng/inc/editeng/udlnitem.hxx b/editeng/inc/editeng/udlnitem.hxx
index ab01ff6123..c06bae4e81 100644..100755
--- a/editeng/inc/editeng/udlnitem.hxx
+++ b/editeng/inc/editeng/udlnitem.hxx
@@ -52,7 +52,7 @@ public:
TYPEINFO();
SvxTextLineItem( const FontUnderline eSt,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -61,22 +61,20 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetValueCount() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetValueCount() 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 );
// MS VC4.0 messes things up
- void SetValue( USHORT nNewVal )
+ void SetValue( sal_uInt16 nNewVal )
{SfxEnumItem::SetValue(nNewVal); }
virtual int HasBoolValue() const;
- virtual BOOL GetBoolValue() const;
- virtual void SetBoolValue( BOOL bVal );
+ virtual sal_Bool GetBoolValue() const;
+ virtual void SetBoolValue( sal_Bool bVal );
virtual int operator==( const SfxPoolItem& ) const;
@@ -91,7 +89,7 @@ public:
FontUnderline GetLineStyle() const
{ return (FontUnderline)GetValue(); }
void SetLineStyle( FontUnderline eNew )
- { SetValue((USHORT) eNew); }
+ { SetValue((sal_uInt16) eNew); }
const Color& GetColor() const { return mColor; }
void SetColor( const Color& rCol ) { mColor = rCol; }
@@ -107,11 +105,11 @@ public:
TYPEINFO();
SvxUnderlineItem( const FontUnderline eSt,
- const USHORT nId );
+ const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
};
// class SvxOverlineItem ------------------------------------------------
@@ -124,11 +122,11 @@ public:
TYPEINFO();
SvxOverlineItem( const FontUnderline eSt,
- const USHORT nId );
+ const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
};
#endif // #ifndef _SVX_UDLNITEM_HXX
diff --git a/editeng/inc/editeng/ulspitem.hxx b/editeng/inc/editeng/ulspitem.hxx
index 6f58c5bfbf..d0e38e8dc3 100644..100755
--- a/editeng/inc/editeng/ulspitem.hxx
+++ b/editeng/inc/editeng/ulspitem.hxx
@@ -45,26 +45,26 @@ namespace rtl
This item describes the Upper- and Lower space of a page or paragraph.
*/
-#define ULSPACE_16_VERSION ((USHORT)0x0001)
+#define ULSPACE_16_VERSION ((sal_uInt16)0x0001)
class EDITENG_DLLPUBLIC SvxULSpaceItem : public SfxPoolItem
{
- USHORT nUpper; // Upper space
- USHORT nLower; // Lower space
- USHORT nPropUpper, nPropLower; // relative or absolute (=100%)
+ sal_uInt16 nUpper; // Upper space
+ sal_uInt16 nLower; // Lower space
+ sal_uInt16 nPropUpper, nPropLower; // relative or absolute (=100%)
public:
TYPEINFO();
- SvxULSpaceItem( const USHORT nId );
- SvxULSpaceItem( const USHORT nUp, const USHORT nLow,
- const USHORT nId );
+ SvxULSpaceItem( const sal_uInt16 nId );
+ SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow,
+ const sal_uInt16 nId );
inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy );
// "pure virtual Methods" from SfxPoolItem
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,
@@ -72,24 +72,24 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
- virtual bool ScaleMetrics( long nMult, long nDiv );
- virtual bool HasMetrics() const;
-
- inline void SetUpper( const USHORT nU, const USHORT nProp = 100 );
- inline void SetLower( const USHORT nL, const USHORT nProp = 100 );
-
- void SetUpperValue( const USHORT nU ) { nUpper = nU; }
- void SetLowerValue( const USHORT nL ) { nLower = nL; }
- void SetPropUpper( const USHORT nU ) { nPropUpper = nU; }
- void SetPropLower( const USHORT nL ) { nPropLower = nL; }
-
- USHORT GetUpper() const { return nUpper; }
- USHORT GetLower() const { return nLower; }
- USHORT GetPropUpper() const { return nPropUpper; }
- USHORT GetPropLower() const { return nPropLower; }
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
+ virtual bool ScaleMetrics( long nMult, long nDiv );
+ virtual bool HasMetrics() const;
+
+ inline void SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp = 100 );
+ inline void SetLower( const sal_uInt16 nL, const sal_uInt16 nProp = 100 );
+
+ void SetUpperValue( const sal_uInt16 nU ) { nUpper = nU; }
+ void SetLowerValue( const sal_uInt16 nL ) { nLower = nL; }
+ void SetPropUpper( const sal_uInt16 nU ) { nPropUpper = nU; }
+ void SetPropLower( const sal_uInt16 nL ) { nPropLower = nL; }
+
+ sal_uInt16 GetUpper() const { return nUpper; }
+ sal_uInt16 GetLower() const { return nLower; }
+ sal_uInt16 GetPropUpper() const { return nPropUpper; }
+ sal_uInt16 GetPropLower() const { return nPropLower; }
};
inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy )
@@ -101,13 +101,13 @@ inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy )
return *this;
}
-inline void SvxULSpaceItem::SetUpper( const USHORT nU, const USHORT nProp )
+inline void SvxULSpaceItem::SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp )
{
- nUpper = USHORT((ULONG(nU) * nProp ) / 100); nPropUpper = nProp;
+ nUpper = sal_uInt16((sal_uInt32(nU) * nProp ) / 100); nPropUpper = nProp;
}
-inline void SvxULSpaceItem::SetLower( const USHORT nL, const USHORT nProp )
+inline void SvxULSpaceItem::SetLower( const sal_uInt16 nL, const sal_uInt16 nProp )
{
- nLower = USHORT((ULONG(nL) * nProp ) / 100); nPropLower = nProp;
+ nLower = sal_uInt16((sal_uInt32(nL) * nProp ) / 100); nPropLower = nProp;
}
#endif
diff --git a/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx
index b352548440..f065cdc0b3 100644..100755
--- a/editeng/inc/editeng/unoedhlp.hxx
+++ b/editeng/inc/editeng/unoedhlp.hxx
@@ -50,20 +50,20 @@ class EditEngine;
class EDITENG_DLLPUBLIC SvxEditSourceHint : public TextHint
{
private:
- ULONG mnStart;
- ULONG mnEnd;
+ sal_uLong mnStart;
+ sal_uLong mnEnd;
public:
TYPEINFO();
- SvxEditSourceHint( ULONG nId );
- SvxEditSourceHint( ULONG nId, ULONG nValue, ULONG nStart=0, ULONG nEnd=0 );
-
- ULONG GetValue() const;
- ULONG GetStartValue() const;
- ULONG GetEndValue() const;
- void SetValue( ULONG n );
- void SetStartValue( ULONG n );
- void SetEndValue( ULONG n );
+ SvxEditSourceHint( sal_uLong nId );
+ SvxEditSourceHint( sal_uLong nId, sal_uLong nValue, sal_uLong nStart=0, sal_uLong nEnd=0 );
+
+ sal_uLong GetValue() const;
+ sal_uLong GetStartValue() const;
+ sal_uLong GetEndValue() const;
+ void SetValue( sal_uLong n );
+ void SetStartValue( sal_uLong n );
+ void SetEndValue( sal_uLong n );
};
/** Helper class for common functionality in edit sources
@@ -102,7 +102,7 @@ public:
@return sal_True, if the range has been successfully determined
*/
- static sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex );
+ static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex );
/** Convert point from edit engine to user coordinate space
diff --git a/editeng/inc/editeng/unoedprx.hxx b/editeng/inc/editeng/unoedprx.hxx
index 2dfd05ec77..a82ab075f5 100644..100755
--- a/editeng/inc/editeng/unoedprx.hxx
+++ b/editeng/inc/editeng/unoedprx.hxx
@@ -42,20 +42,20 @@ public:
SvxAccessibleTextAdapter();
virtual ~SvxAccessibleTextAdapter();
- 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 = 0 ) const;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) 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 sal_Int32 CalcLogicalIndex( USHORT nPara, USHORT nEEIndex );
- virtual USHORT CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex );
+ virtual sal_Int32 CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex );
+ virtual sal_uInt16 CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex );
- 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 );
@@ -64,46 +64,46 @@ public:
virtual SfxItemPool* GetPool() const;
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
- virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
- virtual 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 sal_Bool IsValid() 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 nIndex ) 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 nIndex ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
+ 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
// (not needed for accessibility, only for new import API)
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 );
//XTextCopy
virtual void CopyText(const SvxTextForwarder& rSource);
void SetForwarder( SvxTextForwarder& );
- sal_Bool HaveImageBullet( USHORT nPara ) const;
- sal_Bool HaveTextBullet( USHORT nPara ) const;
+ sal_Bool HaveImageBullet( sal_uInt16 nPara ) const;
+ sal_Bool HaveTextBullet( sal_uInt16 nPara ) const;
/** Query whether all text in given selection is editable
@@ -125,7 +125,7 @@ public:
virtual ~SvxAccessibleTextEditViewAdapter();
// SvxViewForwarder interface
- 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;
diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx
index db401d59ce..24b90f8ccb 100644..100755
--- a/editeng/inc/editeng/unoedsrc.hxx
+++ b/editeng/inc/editeng/unoedsrc.hxx
@@ -152,25 +152,25 @@ class EDITENG_DLLPUBLIC SvxTextForwarder
public:
virtual ~SvxTextForwarder();
- virtual USHORT GetParagraphCount() const = 0;
- virtual USHORT GetTextLen( USHORT nParagraph ) const = 0;
+ virtual sal_uInt16 GetParagraphCount() const = 0;
+ virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const = 0;
virtual String GetText( const ESelection& rSel ) const = 0;
- virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const = 0;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const = 0;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) = 0;
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const = 0;
+ virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const = 0;
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) = 0;
virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0;
- virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const = 0;
+ virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const = 0;
- virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const = 0;
- virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const = 0;
+ virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0;
+ virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const = 0;
virtual void QuickInsertText( const String& rText, const ESelection& rSel ) = 0;
virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0;
virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0;
virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0;
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0;
- virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) = 0;
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0;
+ virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) = 0;
virtual SfxItemPool* GetPool() const = 0;
@@ -178,7 +178,7 @@ public:
// implementation functions for XParagraphAppend and XTextPortionAppend
virtual void AppendParagraph() = 0;
- virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ) = 0;
+ virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ) = 0;
// XTextCopy
virtual void CopyText(const SvxTextForwarder& rSource) = 0;
@@ -187,7 +187,7 @@ public:
@return sal_False, if no longer valid
*/
- virtual BOOL IsValid() const = 0;
+ virtual sal_Bool IsValid() const = 0;
/** Query language of character at given position on the underlying edit engine
@@ -197,14 +197,14 @@ public:
@param nIndex[0 .. m-1]
Index of character to query language of
*/
- virtual LanguageType GetLanguage( USHORT nPara, USHORT nIndex ) const = 0;
+ virtual LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
/** Query number of fields in the underlying edit engine
@param nPara[0 .. n-1]
Index of paragraph to query field number in
*/
- virtual USHORT GetFieldCount( USHORT nPara ) const = 0;
+ virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const = 0;
/** Query information for given field number in the underlying edit engine
@@ -214,14 +214,14 @@ public:
@param nField[0 .. m-1]
Index of field to query information of
*/
- virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const = 0;
+ virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const = 0;
/** Query information regarding bullets for given paragraph on the underlying edit engine
@param nPara[0 .. n-1]
Index of paragraph to query bullet info on
*/
- virtual EBulletInfo GetBulletInfo( USHORT nPara ) const = 0;
+ virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const = 0;
/** Query the bounding rectangle of the given character
@@ -244,7 +244,7 @@ public:
left corner of text. The coordinates returned here are to be
interpreted in the map mode given by GetMapMode().
*/
- virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const = 0;
+ virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
/** Query the bounding rectangle of the given paragraph
@@ -255,7 +255,7 @@ public:
left corner of text. The coordinates returned here are to be
interpreted in the map mode given by GetMapMode().
*/
- virtual Rectangle GetParaBounds( USHORT nPara ) const = 0;
+ virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const = 0;
/** Query the map mode of the underlying EditEngine/Outliner
@@ -292,7 +292,7 @@ public:
@return sal_True, if the point is over any text and both rPara and rIndex are valid
*/
- virtual sal_Bool GetIndexAtPoint( const Point& rPoint, USHORT& rPara, USHORT& rIndex ) const = 0;
+ virtual sal_Bool GetIndexAtPoint( const Point& rPoint, sal_uInt16& rPara, sal_uInt16& rIndex ) const = 0;
/** Get the start and the end index of the word at the given index
@@ -317,7 +317,7 @@ public:
@return sal_True, if the result is non-empty
*/
- virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& rStart, USHORT& rEnd ) const = 0;
+ virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& rStart, sal_uInt16& rEnd ) const = 0;
/** Query range of similar attributes
@@ -334,7 +334,7 @@ public:
@return sal_True, if the range has been successfully determined
*/
- virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const = 0;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
/** Query number of lines in the formatted paragraph
@@ -344,7 +344,7 @@ public:
@return number of lines in given paragraph
*/
- virtual USHORT GetLineCount( USHORT nPara ) const = 0;
+ virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const = 0;
/** Query line length
@@ -355,7 +355,7 @@ public:
Index of line in paragraph to query line length of
*/
- virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const = 0;
+ virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const = 0;
/** Query bounds of line in paragraph
@@ -372,7 +372,7 @@ public:
Index of line in paragraph to query line length of
*/
- virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const = 0;
+ virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const = 0;
/** Query the line number for a index in the paragraphs text
@@ -385,7 +385,7 @@ public:
@returns [0 .. k-1]
The line number of the chara in the paragraph
*/
- virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const = 0;
+ virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
/** Delete given text range and reformat text
@@ -414,7 +414,7 @@ public:
@return sal_True if text have been successfully reformatted
*/
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ) = 0;
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ) = 0;
/** Get the outline depth of given paragraph
@@ -424,7 +424,7 @@ public:
@return the outline level of the given paragraph. The range is
[0,n), where n is the maximal outline level.
*/
- virtual sal_Int16 GetDepth( USHORT nPara ) const = 0;
+ virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const = 0;
/** Set the outline depth of given paragraph
@@ -435,11 +435,11 @@ public:
The depth to set on the given paragraph. The range is
[0,n), where n is the maximal outline level.
- @return TRUE, if depth could be successfully set. Reasons for
+ @return sal_True, if depth could be successfully set. Reasons for
failure are e.g. the text does not support outline level
(EditEngine), or the depth range is exceeded.
*/
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ) = 0;
+ virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) = 0;
virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara );
virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
@@ -463,7 +463,7 @@ public:
@return sal_False, if no longer valid
*/
- virtual BOOL IsValid() const = 0;
+ virtual sal_Bool IsValid() const = 0;
/** Query visible area of the view containing the text
diff --git a/editeng/inc/editeng/unofdesc.hxx b/editeng/inc/editeng/unofdesc.hxx
index f46aeb32b8..f46aeb32b8 100644..100755
--- a/editeng/inc/editeng/unofdesc.hxx
+++ b/editeng/inc/editeng/unofdesc.hxx
diff --git a/editeng/inc/editeng/unofield.hxx b/editeng/inc/editeng/unofield.hxx
index 33f5ae25b6..33f5ae25b6 100644..100755
--- a/editeng/inc/editeng/unofield.hxx
+++ b/editeng/inc/editeng/unofield.hxx
diff --git a/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx
index e615611a63..3bcf45cb63 100644..100755
--- a/editeng/inc/editeng/unofored.hxx
+++ b/editeng/inc/editeng/unofored.hxx
@@ -44,17 +44,17 @@ public:
SvxEditEngineForwarder( EditEngine& rEngine );
virtual ~SvxEditEngineForwarder();
- 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 );
@@ -63,36 +63,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& rField, USHORT nPara, xub_StrLen nPos );
- 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& rField, sal_uInt16 nPara, xub_StrLen nPos );
+ 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 nIndex ) 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 nIndex ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
+ 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 );
//XTextCopy
virtual void CopyText(const SvxTextForwarder& rSource);
};
diff --git a/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx
index 65e4016cdb..7c17672646 100644..100755
--- a/editeng/inc/editeng/unoforou.hxx
+++ b/editeng/inc/editeng/unoforou.hxx
@@ -42,7 +42,7 @@ class EDITENG_DLLPUBLIC SvxOutlinerForwarder : public SvxTextForwarder
{
private:
Outliner& rOutliner;
- BOOL bOutlinerText;
+ sal_Bool bOutlinerText;
/** this pointer may be null or point to an item set for the attribs of
the selection maAttribsSelection */
@@ -56,23 +56,23 @@ private:
mutable SfxItemSet* mpParaAttribsCache;
/** if we have a cached para attribute item set, this is the paragraph of it */
- mutable USHORT mnParaAttribsCache;
+ mutable sal_uInt16 mnParaAttribsCache;
public:
- SvxOutlinerForwarder( Outliner& rOutl, BOOL bOutlText = FALSE );
+ SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText = sal_False );
virtual ~SvxOutlinerForwarder();
- 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 = 0 ) const;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) 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 );
@@ -81,33 +81,33 @@ public:
virtual SfxItemPool* GetPool() const;
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
- virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
Outliner& GetOutliner() const { return rOutliner; }
- 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 nPara, USHORT nLine ) const;
- virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) 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 nPara, sal_uInt16 nLine ) const;
+ virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
+ virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const;
+ virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara );
virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
@@ -121,7 +121,7 @@ public:
// 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 );
//XTextCopy
virtual void CopyText(const SvxTextForwarder& rSource);
};
diff --git a/editeng/inc/editeng/unoipset.hxx b/editeng/inc/editeng/unoipset.hxx
index 685d0aa398..685d0aa398 100644..100755
--- a/editeng/inc/editeng/unoipset.hxx
+++ b/editeng/inc/editeng/unoipset.hxx
diff --git a/editeng/inc/editeng/unolingu.hxx b/editeng/inc/editeng/unolingu.hxx
index 1989780262..b521917188 100644..100755
--- a/editeng/inc/editeng/unolingu.hxx
+++ b/editeng/inc/editeng/unolingu.hxx
@@ -55,17 +55,17 @@ class Window;
class SvxLinguConfigUpdate
{
- static INT32 nCurrentDataFilesChangedCheckValue;
- static INT16 nNeedUpdating; // n == -1 => needs to be checked
+ static sal_Int32 nCurrentDataFilesChangedCheckValue;
+ static sal_Int16 nNeedUpdating; // n == -1 => needs to be checked
// n == 0 => already updated, nothing to be done
// n == 1 => needs to be updated
- static INT32 CalcDataFilesChangedCheckValue();
+ static sal_Int32 CalcDataFilesChangedCheckValue();
public:
EDITENG_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False );
- static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False );
+ static sal_Bool IsNeedUpdateAll( sal_Bool bForceCheck = sal_False );
};
///////////////////////////////////////////////////////////////////////////
@@ -155,15 +155,15 @@ struct SvxAlternativeSpelling
String aReplacement;
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord;
- INT16 nChangedPos,
+ sal_Int16 nChangedPos,
nChangedLength;
- BOOL bIsAltSpelling;
+ sal_Bool bIsAltSpelling;
inline SvxAlternativeSpelling();
};
inline SvxAlternativeSpelling::SvxAlternativeSpelling() :
- nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(FALSE)
+ nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(sal_False)
{
}
diff --git a/editeng/inc/editeng/unonrule.hxx b/editeng/inc/editeng/unonrule.hxx
index 9b5e80b7ff..9b5e80b7ff 100644..100755
--- a/editeng/inc/editeng/unonrule.hxx
+++ b/editeng/inc/editeng/unonrule.hxx
diff --git a/editeng/inc/editeng/unopracc.hxx b/editeng/inc/editeng/unopracc.hxx
index da4d92d2b7..da4d92d2b7 100644..100755
--- a/editeng/inc/editeng/unopracc.hxx
+++ b/editeng/inc/editeng/unopracc.hxx
diff --git a/editeng/inc/editeng/unoprnms.hxx b/editeng/inc/editeng/unoprnms.hxx
index 8adbc60f36..8adbc60f36 100644..100755
--- a/editeng/inc/editeng/unoprnms.hxx
+++ b/editeng/inc/editeng/unoprnms.hxx
diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx
index 32f9af59f7..72a9d5ffbc 100644..100755
--- a/editeng/inc/editeng/unotext.hxx
+++ b/editeng/inc/editeng/unotext.hxx
@@ -192,7 +192,7 @@ public:
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 = 0 ) const;
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) 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 );
@@ -209,37 +209,37 @@ public:
virtual void QuickInsertLineBreak( const ESelection& rSel );
virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
- virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+ virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
virtual sal_Bool IsValid() const;
virtual void SetNotifyHdl( const Link& );
- 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 nIndex ) 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 nIndex ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
+ 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 );
//XTextCopy
virtual void CopyText(const SvxTextForwarder& rSource);
};
diff --git a/editeng/inc/editeng/unoviwed.hxx b/editeng/inc/editeng/unoviwed.hxx
index 7e023fd377..62e6215178 100644..100755
--- a/editeng/inc/editeng/unoviwed.hxx
+++ b/editeng/inc/editeng/unoviwed.hxx
@@ -45,7 +45,7 @@ public:
SvxEditEngineViewForwarder( EditView& rView );
virtual ~SvxEditEngineViewForwarder();
- 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/editeng/inc/editeng/unoviwou.hxx b/editeng/inc/editeng/unoviwou.hxx
index b0efc092b8..da28f8d05d 100644..100755
--- a/editeng/inc/editeng/unoviwou.hxx
+++ b/editeng/inc/editeng/unoviwou.hxx
@@ -48,7 +48,7 @@ public:
SvxDrawOutlinerViewForwarder( OutlinerView& rOutl, const Point& rShapePosTopLeft );
virtual ~SvxDrawOutlinerViewForwarder();
- 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/editeng/inc/editeng/wghtitem.hxx b/editeng/inc/editeng/wghtitem.hxx
index 79884f91d2..adbe0ab806 100644..100755
--- a/editeng/inc/editeng/wghtitem.hxx
+++ b/editeng/inc/editeng/wghtitem.hxx
@@ -53,7 +53,7 @@ public:
TYPEINFO();
SvxWeightItem( const FontWeight eWght /*= WEIGHT_NORMAL*/,
- const USHORT nId );
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem + SfxEnumItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -62,17 +62,17 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
- virtual String GetValueTextByPos( USHORT nPos ) const;
- virtual USHORT GetValueCount() const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual String GetValueTextByPos( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetValueCount() 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 int HasBoolValue() const;
- virtual BOOL GetBoolValue() const;
- virtual void SetBoolValue( BOOL bVal );
+ virtual sal_Bool GetBoolValue() const;
+ virtual void SetBoolValue( sal_Bool bVal );
inline SvxWeightItem& operator=(const SvxWeightItem& rWeight) {
SetValue( rWeight.GetValue() );
@@ -83,7 +83,7 @@ public:
FontWeight GetWeight() const
{ return (FontWeight)GetValue(); }
void SetWeight( FontWeight eNew )
- { SetValue( (USHORT)eNew ); }
+ { SetValue( (sal_uInt16)eNew ); }
};
#endif // #ifndef _SVX_WGHTITEM_HXX
diff --git a/editeng/inc/editeng/widwitem.hxx b/editeng/inc/editeng/widwitem.hxx
index 9b0d0e89ec..0e280288c2 100644..100755
--- a/editeng/inc/editeng/widwitem.hxx
+++ b/editeng/inc/editeng/widwitem.hxx
@@ -52,12 +52,12 @@ class EDITENG_DLLPUBLIC SvxWidowsItem: public SfxByteItem
public:
TYPEINFO();
- SvxWidowsItem( const BYTE nL /*= 0*/, const USHORT nId );
+ SvxWidowsItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT ) const;
- virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const;
+ virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/writingmodeitem.hxx b/editeng/inc/editeng/writingmodeitem.hxx
index a7d569d158..89efe83bce 100644..100755
--- a/editeng/inc/editeng/writingmodeitem.hxx
+++ b/editeng/inc/editeng/writingmodeitem.hxx
@@ -42,15 +42,15 @@ public:
TYPEINFO();
SvxWritingModeItem( ::com::sun::star::text::WritingMode eValue /*= com::sun::star::text::WritingMode_LR_TB*/,
- USHORT nWhich /*= SDRATTR_TEXTDIRECTION*/ );
+ sal_uInt16 nWhich /*= SDRATTR_TEXTDIRECTION*/ );
virtual ~SvxWritingModeItem();
SvxWritingModeItem& operator=( const SvxWritingModeItem& rItem );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const;
- virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -59,10 +59,8 @@ public:
String &rText,
const IntlWrapper * = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const;
+ 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 );
};
#endif // #ifndef _SVX_WRITINGMODEITEM_HXX
diff --git a/editeng/inc/editeng/wrlmitem.hxx b/editeng/inc/editeng/wrlmitem.hxx
index 8e7038e6df..9226fca3ef 100644..100755
--- a/editeng/inc/editeng/wrlmitem.hxx
+++ b/editeng/inc/editeng/wrlmitem.hxx
@@ -52,13 +52,13 @@ class EDITENG_DLLPUBLIC SvxWordLineModeItem : public SfxBoolItem
public:
TYPEINFO();
- SvxWordLineModeItem( const BOOL bWordLineMode /*= FALSE*/,
- const USHORT nId );
+ SvxWordLineModeItem( const sal_Bool bWordLineMode /*= sal_False*/,
+ const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/editeng/inc/editeng/xmlcnitm.hxx b/editeng/inc/editeng/xmlcnitm.hxx
index 0c048c7c3c..f4469fb93e 100644..100755
--- a/editeng/inc/editeng/xmlcnitm.hxx
+++ b/editeng/inc/editeng/xmlcnitm.hxx
@@ -63,8 +63,8 @@ public:
virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) 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 SfxPoolItem *Clone( SfxItemPool * = 0) const
{ return new SvXMLAttrContainerItem( *this ); }
diff --git a/editeng/inc/editxml.hxx b/editeng/inc/editxml.hxx
index 8d103edde3..8d103edde3 100644..100755
--- a/editeng/inc/editxml.hxx
+++ b/editeng/inc/editxml.hxx
diff --git a/editeng/inc/helpid.hrc b/editeng/inc/helpid.hrc
index ad64c838bc..83a7288c52 100644..100755
--- a/editeng/inc/helpid.hrc
+++ b/editeng/inc/helpid.hrc
@@ -27,52 +27,31 @@
#ifndef _EDITENG_HELPID_HRC
#define _EDITENG_HELPID_HRC
-// include ---------------------------------------------------------------
-
-#include <svl/solar.hrc>
-
-// Help-Ids --------------------------------------------------------------
-#define HID_EDITENG_SPELLER_WORDLANGUAGE (HID_EDIT_START)
-#define HID_EDITENG_SPELLER_PARALANGUAGE (HID_EDIT_START + 1)
-#define HID_EDITENG_SPELLER_ADDWORD (HID_EDIT_START + 2)
-#define HID_EDITENG_SPELLER_AUTOCORRECT (HID_EDIT_START + 3)
-#define HID_EDITENG_SPELLER_IGNORE (HID_EDIT_START + 4)
-#define HID_EDITENG_SPELLER_START (HID_EDIT_START + 5)
-#define HID_AUTOCORR_HELP_END (HID_EDIT_START + 6)
-#define HID_AUTOCORR_HELP_START (HID_EDIT_START + 7)
-#define HID_AUTOCORR_HELP_WORD HID_AUTOCORR_HELP_START
-
-#define HID_AUTOCORR_HELP_SENT (HID_AUTOCORR_HELP_START+1)
-#define HID_AUTOCORR_HELP_SENTWORD (HID_AUTOCORR_HELP_START+2)
-#define HID_AUTOCORR_HELP_ACORWORD (HID_AUTOCORR_HELP_START+3)
-
-#define HID_AUTOCORR_HELP_ACORSENTWORD (HID_AUTOCORR_HELP_START+5)
-
-#define HID_AUTOCORR_HELP_CHGTOENEMDASH (HID_AUTOCORR_HELP_START+7)
-#define HID_AUTOCORR_HELP_WORDENEMDASH (HID_AUTOCORR_HELP_START+8)
-#define HID_AUTOCORR_HELP_SENTENEMDASH (HID_AUTOCORR_HELP_START+9)
-#define HID_AUTOCORR_HELP_SENTWORDENEMDASH (HID_AUTOCORR_HELP_START+10)
-#define HID_AUTOCORR_HELP_ACORWORDENEMDASH (HID_AUTOCORR_HELP_START+11)
-
-#define HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH (HID_AUTOCORR_HELP_START+13)
-#define HID_AUTOCORR_HELP_CHGQUOTES (HID_AUTOCORR_HELP_START+15)
-#define HID_AUTOCORR_HELP_CHGSGLQUOTES (HID_AUTOCORR_HELP_START+16)
-#define HID_AUTOCORR_HELP_SETINETATTR (HID_AUTOCORR_HELP_START+17)
-#define HID_AUTOCORR_HELP_INGNOREDOUBLESPACE (HID_AUTOCORR_HELP_START+18)
-#define HID_AUTOCORR_HELP_CHGWEIGHTUNDERL (HID_AUTOCORR_HELP_START+19)
-#define HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL (HID_AUTOCORR_HELP_START+20)
-#define HID_AUTOCORR_HELP_CHGORDINALNUMBER (HID_AUTOCORR_HELP_START+21) // HID_EDIT_START + 28
-
-// please adjust ACT_SVX_HID_END2 below if you add entries here!
-
-// -----------------------------------------------------------------------
-// Overrun check ---------------------------------------------------------
-// -----------------------------------------------------------------------
-
-#define ACT_SVX_HID_END (HID_EDIT_START+28)
-#if ACT_SVX_HID_END > HID_EDIT_END
-#error Resource overflow on #line, #file
-#endif
+#define HID_EDITENG_SPELLER_WORDLANGUAGE "EDITENG_HID_EDITENG_SPELLER_WORDLANGUAGE"
+#define HID_EDITENG_SPELLER_PARALANGUAGE "EDITENG_HID_EDITENG_SPELLER_PARALANGUAGE"
+#define HID_EDITENG_SPELLER_ADDWORD "EDITENG_HID_EDITENG_SPELLER_ADDWORD"
+#define HID_EDITENG_SPELLER_AUTOCORRECT "EDITENG_HID_EDITENG_SPELLER_AUTOCORRECT"
+#define HID_EDITENG_SPELLER_IGNORE "EDITENG_HID_EDITENG_SPELLER_IGNORE"
+#define HID_EDITENG_SPELLER_START "EDITENG_HID_EDITENG_SPELLER_START"
+
+#define HID_AUTOCORR_HELP_WORD "EDITENG_HID_AUTOCORR_HELP_START"
+#define HID_AUTOCORR_HELP_SENT "EDITENG_HID_AUTOCORR_HELP_SENT"
+#define HID_AUTOCORR_HELP_SENTWORD "EDITENG_HID_AUTOCORR_HELP_SENTWORD"
+#define HID_AUTOCORR_HELP_ACORWORD "EDITENG_HID_AUTOCORR_HELP_ACORWORD"
+#define HID_AUTOCORR_HELP_ACORSENTWORD "EDITENG_HID_AUTOCORR_HELP_ACORSENTWORD"
+#define HID_AUTOCORR_HELP_CHGTOENEMDASH "EDITENG_HID_AUTOCORR_HELP_CHGTOENEMDASH"
+#define HID_AUTOCORR_HELP_WORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_WORDENEMDASH"
+#define HID_AUTOCORR_HELP_SENTENEMDASH "EDITENG_HID_AUTOCORR_HELP_SENTENEMDASH"
+#define HID_AUTOCORR_HELP_SENTWORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_SENTWORDENEMDASH"
+#define HID_AUTOCORR_HELP_ACORWORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_ACORWORDENEMDASH"
+#define HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH"
+#define HID_AUTOCORR_HELP_CHGQUOTES "EDITENG_HID_AUTOCORR_HELP_CHGQUOTES"
+#define HID_AUTOCORR_HELP_CHGSGLQUOTES "EDITENG_HID_AUTOCORR_HELP_CHGSGLQUOTES"
+#define HID_AUTOCORR_HELP_SETINETATTR "EDITENG_HID_AUTOCORR_HELP_SETINETATTR"
+#define HID_AUTOCORR_HELP_INGNOREDOUBLESPACE "EDITENG_HID_AUTOCORR_HELP_INGNOREDOUBLESPACE"
+#define HID_AUTOCORR_HELP_CHGWEIGHTUNDERL "EDITENG_HID_AUTOCORR_HELP_CHGWEIGHTUNDERL"
+#define HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL "EDITENG_HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL"
+#define HID_AUTOCORR_HELP_CHGORDINALNUMBER "EDITENG_HID_AUTOCORR_HELP_CHGORDINALNUMBER"
#endif
diff --git a/editeng/inc/pch/precompiled_editeng.cxx b/editeng/inc/pch/precompiled_editeng.cxx
index 2b5afa0f3c..2b5afa0f3c 100644..100755
--- a/editeng/inc/pch/precompiled_editeng.cxx
+++ b/editeng/inc/pch/precompiled_editeng.cxx
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index e6672c127b..57cd0397f3 100644..100755
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -738,7 +738,6 @@
#include "svtools/parhtml.hxx"
#include "svtools/parrtf.hxx"
#include "unotools/pathoptions.hxx"
-#include "svl/pickerhelper.hxx"
#include "svl/poolitem.hxx"
#include "unotools/printwarningoptions.hxx"
#include "svl/ptitem.hxx"
@@ -853,7 +852,7 @@
#include "vcl/cursor.hxx"
#include "vcl/decoview.hxx"
#include "vcl/dndhelp.hxx"
-#include "vcl/fldunit.hxx"
+#include "tools/fldunit.hxx"
#include "vcl/fntstyle.hxx"
#include "unotools/fontcvt.hxx"
#include "vcl/gdimtf.hxx"
@@ -872,7 +871,7 @@
#include "vcl/unohelp.hxx"
#include "vcl/unohelp2.hxx"
#include "vcl/wall.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "xmloff/DashStyle.hxx"
#include "xmloff/GradientStyle.hxx"
#include "xmloff/HatchStyle.hxx"
diff --git a/editeng/prj/build.lst b/editeng/prj/build.lst
index 551a21bc37..bba7f26667 100644..100755
--- a/editeng/prj/build.lst
+++ b/editeng/prj/build.lst
@@ -1,13 +1,3 @@
-ed editeng : l10n svtools xmloff linguistic NULL
-ed editeng usr1 - all ed_mkout NULL
-ed editeng\inc nmake - all ed_inc NULL
-ed editeng\source\items nmake - all ed_items ed_inc NULL
-ed editeng\source\editeng nmake - all ed_eeng ed_inc NULL
-ed editeng\source\misc nmake - all ed_misc ed_inc NULL
-ed editeng\source\outliner nmake - all ed_outl ed_inc NULL
-ed editeng\source\rtf nmake - all ed_rtf ed_inc NULL
-ed editeng\source\uno nmake - all ed_uno ed_inc NULL
-ed editeng\source\xml nmake - all ed_xml ed_inc NULL
-ed editeng\source\accessibility nmake - all ed_accessibility ed_inc NULL
-ed editeng\util nmake - all ed_util ed_rtf ed_eeng ed_items ed_outl ed_uno ed_xml ed_accessibility ed_misc NULL
+ed editeng : L10N:l10n svtools xmloff linguistic NULL
+ed editeng\prj nmake - all ed_prj NULL
diff --git a/editeng/prj/d.lst b/editeng/prj/d.lst
index 364c1a8fdd..e69de29bb2 100644..100755
--- a/editeng/prj/d.lst
+++ b/editeng/prj/d.lst
@@ -1,14 +0,0 @@
-mkdir: %COMMON_DEST%\bin%_EXT%\hid
-mkdir: %COMMON_DEST%\res%_EXT%
-
-..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
-..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
-..\%__SRC%\lib\iediteng.lib %_DEST%\lib%_EXT%\iediteng.lib
-..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
-..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
-
-mkdir: %_DEST%\inc%_EXT%\svx
-..\inc\editeng\*.h %_DEST%\inc%_EXT%\editeng\*.h
-..\inc\editeng\*.hrc %_DEST%\inc%_EXT%\editeng\*.hrc
-..\inc\editeng\*.hxx %_DEST%\inc%_EXT%\editeng\*.hxx
-
diff --git a/editeng/util/makefile.pmk b/editeng/prj/makefile.mk
index 73050245fd..e312a7ccab 100644..100755
--- a/editeng/util/makefile.pmk
+++ b/editeng/prj/makefile.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,19 +25,16 @@
#
#*************************************************************************
-# define EDITENG_DLLIMPLEMENTATION (see @ editengdllapi.h)
-CDEFS += -DEDITENG_DLLIMPLEMENTATION
+PRJ=..
+TARGET=prj
-.IF "$(ENABLE_GTK)" != ""
-CFLAGS+=-DENABLE_GTK
-.ENDIF
-
-.IF "$(ENABLE_KDE)" != ""
-CFLAGS+=-DENABLE_KDE
-.ENDIF
+.INCLUDE : settings.mk
-.IF "$(ENABLE_KDE4)" != ""
-CFLAGS+=-DENABLE_KDE4
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
.ENDIF
-VISIBILITY_HIDDEN=TRUE
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/editeng/source/accessibility/AccessibleComponentBase.cxx b/editeng/source/accessibility/AccessibleComponentBase.cxx
index 181e048592..181e048592 100644..100755
--- a/editeng/source/accessibility/AccessibleComponentBase.cxx
+++ b/editeng/source/accessibility/AccessibleComponentBase.cxx
diff --git a/editeng/source/accessibility/AccessibleContextBase.cxx b/editeng/source/accessibility/AccessibleContextBase.cxx
index 39a280c18a..39a280c18a 100644..100755
--- a/editeng/source/accessibility/AccessibleContextBase.cxx
+++ b/editeng/source/accessibility/AccessibleContextBase.cxx
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 59b7112b42..b2c1478bca 100644..100755
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -191,14 +191,14 @@ namespace accessibility
"AccessibleEditableTextPara::getLocale: paragraph index value overflow");
// return locale of first character in the paragraph
- return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< USHORT >( GetParagraphIndex() ), 0 ));
+ return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 ));
}
void AccessibleEditableTextPara::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex )
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
if( GetSelection( nStart, nEnd ) )
{
@@ -232,13 +232,13 @@ namespace accessibility
DBG_ASSERT(nParaIndex >= 0 && nParaIndex <= USHRT_MAX,
"AccessibleEditableTextPara::implGetLineBoundary: paragraph index value overflow");
- const sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< USHORT >( nParaIndex ) );
+ const sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) );
CheckPosition(nIndex);
rBoundary.startPos = rBoundary.endPos = -1;
- const USHORT nLineCount=rCacheTF.GetLineCount( static_cast< USHORT >( nParaIndex ) );
+ const sal_uInt16 nLineCount=rCacheTF.GetLineCount( static_cast< sal_uInt16 >( nParaIndex ) );
if( nIndex == nTextLen )
{
@@ -246,7 +246,7 @@ namespace accessibility
if( nLineCount <= 1 )
rBoundary.startPos = 0;
else
- rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( static_cast< USHORT >( nParaIndex ),
+ rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ),
nLineCount-1 );
rBoundary.endPos = nTextLen;
@@ -254,15 +254,15 @@ namespace accessibility
else
{
// normal line search
- USHORT nLine;
+ sal_uInt16 nLine;
sal_Int32 nCurIndex;
for( nLine=0, nCurIndex=0; nLine<nLineCount; ++nLine )
{
- nCurIndex += rCacheTF.GetLineLen( static_cast< USHORT >( nParaIndex ), nLine);
+ nCurIndex += rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLine);
if( nCurIndex > nIndex )
{
- rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen(static_cast< USHORT >( nParaIndex ), nLine);
+ rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine);
rBoundary.endPos = nCurIndex;
break;
}
@@ -398,9 +398,9 @@ namespace accessibility
GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
"AccessibleEditableTextPara::MakeSelection: index value overflow");
- USHORT nParaIndex = static_cast< USHORT >( GetParagraphIndex() );
- return ESelection( nParaIndex, static_cast< USHORT >( nStartEEIndex ),
- nParaIndex, static_cast< USHORT >( nEndEEIndex ) );
+ sal_uInt16 nParaIndex = static_cast< sal_uInt16 >( GetParagraphIndex() );
+ return ESelection( nParaIndex, static_cast< sal_uInt16 >( nStartEEIndex ),
+ nParaIndex, static_cast< sal_uInt16 >( nEndEEIndex ) );
}
ESelection AccessibleEditableTextPara::MakeSelection( sal_Int32 nEEIndex )
@@ -445,12 +445,12 @@ namespace accessibility
CheckPosition( nEnd );
}
- sal_Bool AccessibleEditableTextPara::GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((uno::RuntimeException))
+ sal_Bool AccessibleEditableTextPara::GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((uno::RuntimeException))
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
ESelection aSelection;
- USHORT nPara = static_cast< USHORT > ( GetParagraphIndex() );
+ sal_uInt16 nPara = static_cast< sal_uInt16 > ( GetParagraphIndex() );
if( !GetEditViewForwarder().GetSelection( aSelection ) )
return sal_False;
@@ -504,11 +504,11 @@ namespace accessibility
return GetTextForwarder().GetText( MakeSelection(nStartIndex, nEndIndex) );
}
- USHORT AccessibleEditableTextPara::GetTextLen() const SAL_THROW((uno::RuntimeException))
+ sal_uInt16 AccessibleEditableTextPara::GetTextLen() const SAL_THROW((uno::RuntimeException))
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
- return GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) );
+ return GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) );
}
sal_Bool AccessibleEditableTextPara::IsVisible() const
@@ -659,7 +659,7 @@ namespace accessibility
DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
"AccessibleEditableTextPara::HaveChildren: paragraph index value overflow");
- return GetTextForwarder().HaveImageBullet( static_cast< USHORT >(GetParagraphIndex()) );
+ return GetTextForwarder().HaveImageBullet( static_cast< sal_uInt16 >(GetParagraphIndex()) );
}
sal_Bool AccessibleEditableTextPara::IsActive() const SAL_THROW((uno::RuntimeException))
@@ -785,7 +785,7 @@ namespace accessibility
}
}
- sal_Bool AccessibleEditableTextPara::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex )
+ sal_Bool AccessibleEditableTextPara::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex )
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
@@ -797,8 +797,8 @@ namespace accessibility
return GetTextForwarder().GetAttributeRun( nStartIndex,
nEndIndex,
- static_cast< USHORT >(GetParagraphIndex()),
- static_cast< USHORT >(nIndex) );
+ static_cast< sal_uInt16 >(GetParagraphIndex()),
+ static_cast< sal_uInt16 >(nIndex) );
}
uno::Any SAL_CALL AccessibleEditableTextPara::queryInterface (const uno::Type & rType) throw (uno::RuntimeException)
@@ -1054,7 +1054,7 @@ namespace accessibility
SvxTextForwarder& rCacheTF = GetTextForwarder();
Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) );
- EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< USHORT > (GetParagraphIndex()) );
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 > (GetParagraphIndex()) );
if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
aBulletInfo.bVisible &&
@@ -1081,7 +1081,7 @@ namespace accessibility
"AccessibleEditableTextPara::getBounds: index value overflow");
SvxTextForwarder& rCacheTF = GetTextForwarder();
- Rectangle aRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) );
+ Rectangle aRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) );
// convert to screen coordinates
Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
@@ -1179,7 +1179,7 @@ namespace accessibility
// #104444# Added to XAccessibleComponent interface
svtools::ColorConfig aColorConfig;
- UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
@@ -1296,7 +1296,7 @@ namespace accessibility
CheckPosition( nIndex );
SvxTextForwarder& rCacheTF = GetTextForwarder();
- Rectangle aRect = rCacheTF.GetCharBounds( static_cast< USHORT >( GetParagraphIndex() ), static_cast< USHORT >( nIndex ) );
+ Rectangle aRect = rCacheTF.GetCharBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ), static_cast< sal_uInt16 >( nIndex ) );
// convert to screen
Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
@@ -1335,7 +1335,7 @@ namespace accessibility
SolarMutexGuard aGuard;
- USHORT nPara, nIndex;
+ sal_uInt16 nPara, nIndex;
// offset from surrounding cell/shape
Point aOffset( GetEEOffset() );
@@ -1346,7 +1346,7 @@ namespace accessibility
Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) );
// re-offset to parent (paragraph)
- Rectangle aParaRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) );
+ Rectangle aParaRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) );
aLogPoint.Move( aParaRect.Left(), aParaRect.Top() );
if( rCacheTF.GetIndexAtPoint( aLogPoint, nPara, nIndex ) &&
@@ -1486,7 +1486,7 @@ namespace accessibility
// implGetAttributeRunBoundary() method there
case AccessibleTextType::ATTRIBUTE_RUN:
{
- const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) );
+ const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) );
if( nIndex == nTextLen )
{
@@ -1495,7 +1495,7 @@ namespace accessibility
}
else
{
- USHORT nStartIndex, nEndIndex;
+ sal_uInt16 nStartIndex, nEndIndex;
if( GetAttributeRun(nStartIndex, nEndIndex, nIndex) )
{
@@ -1534,8 +1534,8 @@ namespace accessibility
// implGetAttributeRunBoundary() method there
case AccessibleTextType::ATTRIBUTE_RUN:
{
- const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) );
- USHORT nStartIndex, nEndIndex;
+ const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) );
+ sal_uInt16 nStartIndex, nEndIndex;
if( nIndex == nTextLen )
{
@@ -1591,7 +1591,7 @@ namespace accessibility
{
case AccessibleTextType::ATTRIBUTE_RUN:
{
- USHORT nStartIndex, nEndIndex;
+ sal_uInt16 nStartIndex, nEndIndex;
if( GetAttributeRun(nStartIndex, nEndIndex, nIndex) )
{
@@ -1832,7 +1832,7 @@ namespace accessibility
// AccessibleEmptyEditSource relies on this behaviour
GetEditViewForwarder( sal_True );
SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder(); // MUST be after GetEditViewForwarder(), see method docs
- USHORT nPara = static_cast< USHORT >( GetParagraphIndex() );
+ sal_uInt16 nPara = static_cast< sal_uInt16 >( GetParagraphIndex() );
DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
"AccessibleEditableTextPara::setAttributes: index value overflow");
@@ -2081,9 +2081,9 @@ namespace accessibility
SvxAccessibleTextAdapter& rT = GetTextForwarder();
const sal_Int32 nPara = GetParagraphIndex();
- USHORT nHyperLinks = 0;
- USHORT nFields = rT.GetFieldCount( nPara );
- for ( USHORT n = 0; n < nFields; n++ )
+ sal_uInt16 nHyperLinks = 0;
+ sal_uInt16 nFields = rT.GetFieldCount( nPara );
+ for ( sal_uInt16 n = 0; n < nFields; n++ )
{
EFieldInfo aField = rT.GetFieldInfo( nPara, n );
if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
@@ -2099,20 +2099,20 @@ namespace accessibility
SvxAccessibleTextAdapter& rT = GetTextForwarder();
const sal_Int32 nPara = GetParagraphIndex();
- USHORT nHyperLink = 0;
- USHORT nFields = rT.GetFieldCount( nPara );
- for ( USHORT n = 0; n < nFields; n++ )
+ sal_uInt16 nHyperLink = 0;
+ sal_uInt16 nFields = rT.GetFieldCount( nPara );
+ for ( sal_uInt16 n = 0; n < nFields; n++ )
{
EFieldInfo aField = rT.GetFieldInfo( nPara, n );
if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
{
if ( nHyperLink == nLinkIndex )
{
- USHORT nEEStart = aField.aPosition.nIndex;
+ sal_uInt16 nEEStart = aField.aPosition.nIndex;
// Translate EE Index to accessible index
- USHORT nStart = rT.CalcEditEngineIndex( nPara, nEEStart );
- USHORT nEnd = nStart + aField.aCurrentText.Len();
+ sal_uInt16 nStart = rT.CalcEditEngineIndex( nPara, nEEStart );
+ sal_uInt16 nEnd = nStart + aField.aCurrentText.Len();
xRef = new AccessibleHyperlink( rT, new SvxFieldItem( *aField.pFieldItem ), nPara, nEEStart, nStart, nEnd, aField.aCurrentText );
break;
}
@@ -2130,13 +2130,13 @@ namespace accessibility
// SvxAccessibleTextIndex aIndex;
// aIndex.SetIndex(nPara, nCharIndex, rT);
-// const USHORT nEEIndex = aIndex.GetEEIndex();
+// const sal_uInt16 nEEIndex = aIndex.GetEEIndex();
- const USHORT nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex );
+ const sal_uInt16 nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex );
sal_Int32 nHLIndex = 0;
- USHORT nHyperLink = 0;
- USHORT nFields = rT.GetFieldCount( nPara );
- for ( USHORT n = 0; n < nFields; n++ )
+ sal_uInt16 nHyperLink = 0;
+ sal_uInt16 nFields = rT.GetFieldCount( nPara );
+ for ( sal_uInt16 n = 0; n < nFields; n++ )
{
EFieldInfo aField = rT.GetFieldInfo( nPara, n );
if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
@@ -2167,8 +2167,8 @@ namespace accessibility
if (bValidPara)
{
// we explicitly allow for the index to point at the character right behind the text
- if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< USHORT >(nPara) ))
- nRes = rCacheTF.GetLineNumberAtIndex( static_cast< USHORT >(nPara), static_cast< USHORT >(nIndex) );
+ if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< sal_uInt16 >(nPara) ))
+ nRes = rCacheTF.GetLineNumberAtIndex( static_cast< sal_uInt16 >(nPara), static_cast< sal_uInt16 >(nIndex) );
else
throw lang::IndexOutOfBoundsException();
}
@@ -2187,10 +2187,10 @@ namespace accessibility
DBG_ASSERT( bValidPara, "getTextAtLineNumber: current paragraph index out of range" );
if (bValidPara)
{
- if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< USHORT >(nPara) ))
+ if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< sal_uInt16 >(nPara) ))
{
- USHORT nStart = 0, nEnd = 0;
- rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< USHORT >(nPara), static_cast< USHORT >(nLineNo) );
+ sal_uInt16 nStart = 0, nEnd = 0;
+ rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< sal_uInt16 >(nPara), static_cast< sal_uInt16 >(nLineNo) );
if (nStart != 0xFFFF && nEnd != 0xFFFF)
{
try
diff --git a/editeng/source/accessibility/AccessibleHyperlink.cxx b/editeng/source/accessibility/AccessibleHyperlink.cxx
index f36868cb1b..284cc8a11b 100644..100755
--- a/editeng/source/accessibility/AccessibleHyperlink.cxx
+++ b/editeng/source/accessibility/AccessibleHyperlink.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star;
namespace accessibility
{
- AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD )
+ AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD )
: rTA( r )
{
pFld = p;
diff --git a/editeng/source/accessibility/AccessibleHyperlink.hxx b/editeng/source/accessibility/AccessibleHyperlink.hxx
index 2a1fe19211..d670aff911 100644..100755
--- a/editeng/source/accessibility/AccessibleHyperlink.hxx
+++ b/editeng/source/accessibility/AccessibleHyperlink.hxx
@@ -52,12 +52,12 @@ namespace accessibility
SvxAccessibleTextAdapter& rTA;
SvxFieldItem* pFld;
- USHORT nPara, nRealIdx; // EE values
+ sal_uInt16 nPara, nRealIdx; // EE values
sal_Int32 nStartIdx, nEndIdx; // translated values
::rtl::OUString aDescription;
public:
- AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD );
+ AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD );
~AccessibleHyperlink();
// XAccessibleAction
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index 3d65307c4c..e1dd35b030 100644..100755
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -219,7 +219,7 @@ namespace accessibility
"AccessibleImageBullet::getLocale: paragraph index value overflow");
// return locale of first character in the paragraph
- return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< USHORT >( GetParagraphIndex() ), 0 ));
+ return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 ));
}
void SAL_CALL AccessibleImageBullet::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
@@ -272,8 +272,8 @@ namespace accessibility
"AccessibleEditableTextPara::getBounds: index value overflow");
SvxTextForwarder& rCacheTF = GetTextForwarder();
- EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< USHORT > (GetParagraphIndex()) );
- Rectangle aParentRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) );
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 > (GetParagraphIndex()) );
+ Rectangle aParentRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) );
if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
aBulletInfo.bVisible &&
@@ -365,7 +365,7 @@ namespace accessibility
// #104444# Added to XAccessibleComponent interface
svtools::ColorConfig aColorConfig;
- UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx
index 99932e13fe..99932e13fe 100644..100755
--- a/editeng/source/accessibility/AccessibleParaManager.cxx
+++ b/editeng/source/accessibility/AccessibleParaManager.cxx
diff --git a/editeng/source/accessibility/AccessibleSelectionBase.cxx b/editeng/source/accessibility/AccessibleSelectionBase.cxx
index 7235169368..7235169368 100644..100755
--- a/editeng/source/accessibility/AccessibleSelectionBase.cxx
+++ b/editeng/source/accessibility/AccessibleSelectionBase.cxx
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index ad35aab519..b6a55541ec 100644..100755
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -103,8 +103,8 @@ namespace accessibility
nEndIndex >= 0 && nEndIndex <= USHRT_MAX ,
"AccessibleStaticTextBase_Impl::MakeSelection: index value overflow");
- return ESelection( static_cast< USHORT >(nStartPara), static_cast< USHORT >(nStartIndex),
- static_cast< USHORT >(nEndPara), static_cast< USHORT >(nEndIndex) );
+ return ESelection( static_cast< sal_uInt16 >(nStartPara), static_cast< sal_uInt16 >(nStartIndex),
+ static_cast< sal_uInt16 >(nEndPara), static_cast< sal_uInt16 >(nEndIndex) );
}
//------------------------------------------------------------------------
@@ -345,7 +345,7 @@ namespace accessibility
sal_Int32 nIndex = 0;
if( mpTextParagraph )
- nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< USHORT >(nParagraph) );
+ nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< sal_uInt16 >(nParagraph) );
return nIndex;
}
@@ -399,7 +399,7 @@ namespace accessibility
nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX ,
"AccessibleStaticTextBase_Impl::Index2Internal: index value overflow");
- return EPosition( static_cast< USHORT >(nCurrPara), static_cast< USHORT >(nFlatIndex - nCurrIndex + nCurrCount) );
+ return EPosition( static_cast< sal_uInt16 >(nCurrPara), static_cast< sal_uInt16 >(nFlatIndex - nCurrIndex + nCurrCount) );
}
}
@@ -411,7 +411,7 @@ namespace accessibility
nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX ,
"AccessibleStaticTextBase_Impl::Index2Internal: index value overflow");
- return EPosition( static_cast< USHORT >(nCurrPara-1), static_cast< USHORT >(nFlatIndex - nCurrIndex + nCurrCount) );
+ return EPosition( static_cast< sal_uInt16 >(nCurrPara-1), static_cast< sal_uInt16 >(nFlatIndex - nCurrIndex + nCurrCount) );
}
// not found? Out of bounds
@@ -727,8 +727,8 @@ namespace accessibility
// #112814# Use correct index offset
if ( ( nIndex = rPara.getIndexAtPoint( aPoint ) ) != -1 )
- return mpImpl->Internal2Index( EPosition(sal::static_int_cast<USHORT>(i),
- sal::static_int_cast<USHORT>(nIndex)) );
+ return mpImpl->Internal2Index( EPosition(sal::static_int_cast<sal_uInt16>(i),
+ sal::static_int_cast<sal_uInt16>(nIndex)) );
}
return -1;
diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx
index 30d6467227..8f10f038b9 100644..100755
--- a/editeng/source/accessibility/AccessibleStringWrap.cxx
+++ b/editeng/source/accessibility/AccessibleStringWrap.cxx
@@ -68,7 +68,7 @@ sal_Bool AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle&
else
{
sal_Int32 aXArray[2];
- mrDev.GetCaretPositions( maText, aXArray, static_cast< USHORT >(nIndex), 1 );
+ mrDev.GetCaretPositions( maText, aXArray, static_cast< sal_uInt16 >(nIndex), 1 );
rRect.Left() = 0;
rRect.Top() = 0;
rRect.SetSize( Size(mrDev.GetTextHeight(), labs(aXArray[0] - aXArray[1])) );
diff --git a/editeng/source/accessibility/accessibility.src b/editeng/source/accessibility/accessibility.src
index d7ed9ff738..d7ed9ff738 100644..100755
--- a/editeng/source/accessibility/accessibility.src
+++ b/editeng/source/accessibility/accessibility.src
diff --git a/editeng/source/accessibility/makefile.mk b/editeng/source/accessibility/makefile.mk
deleted file mode 100644
index 530b6cac8b..0000000000
--- a/editeng/source/accessibility/makefile.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# 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=editeng
-TARGET=accessibility
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/AccessibleStringWrap.obj \
- $(SLO)$/AccessibleContextBase.obj \
- $(SLO)$/AccessibleComponentBase.obj \
- $(SLO)$/AccessibleSelectionBase.obj \
- $(SLO)$/AccessibleStaticTextBase.obj \
- $(SLO)$/AccessibleParaManager.obj \
- $(SLO)$/AccessibleEditableTextPara.obj \
- $(SLO)$/AccessibleHyperlink.obj \
- $(SLO)$/AccessibleImageBullet.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 8fe6ddcf57..59647d6a90 100644..100755
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -76,13 +76,13 @@ EditAttrib::~EditAttrib()
// -------------------------------------------------------------------------
// class EditCharAttrib
// -------------------------------------------------------------------------
-EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE )
: EditAttrib( rAttr )
{
nStart = nS;
nEnd = nE;
- bFeature = FALSE;
- bEdge = FALSE;
+ bFeature = sal_False;
+ bEdge = sal_False;
DBG_ASSERT( ( rAttr.Which() >= EE_ITEMS_START ) && ( rAttr.Which() <= EE_ITEMS_END ), "EditCharAttrib CTOR: Invalid id!" );
DBG_ASSERT( ( rAttr.Which() < EE_FEATURE_START ) || ( rAttr.Which() > EE_FEATURE_END ) || ( nE == (nS+1) ), "EditCharAttrib CTOR: Invalid feature!" );
@@ -96,7 +96,7 @@ void EditCharAttrib::SetFont( SvxFont&, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribFont
// -------------------------------------------------------------------------
-EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTINFO || rAttr.Which() == EE_CHAR_FONTINFO_CJK || rAttr.Which() == EE_CHAR_FONTINFO_CTL, "Not a Font attribute!" );
@@ -115,7 +115,7 @@ void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribItalic
// -------------------------------------------------------------------------
-EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_ITALIC || rAttr.Which() == EE_CHAR_ITALIC_CJK || rAttr.Which() == EE_CHAR_ITALIC_CTL, "Not a Italic attribute!" );
@@ -129,7 +129,7 @@ void EditCharAttribItalic::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribWeight
// -------------------------------------------------------------------------
-EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_WEIGHT || rAttr.Which() == EE_CHAR_WEIGHT_CJK || rAttr.Which() == EE_CHAR_WEIGHT_CTL, "Not a Weight attribute!" );
@@ -143,7 +143,7 @@ void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribUnderline
// -------------------------------------------------------------------------
-EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_UNDERLINE, "Not a Underline attribute!" );
@@ -159,7 +159,7 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
// -------------------------------------------------------------------------
// class EditCharAttribOverline
// -------------------------------------------------------------------------
-EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_OVERLINE, "Not a overline attribute!" );
@@ -175,7 +175,7 @@ void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
// -------------------------------------------------------------------------
// class EditCharAttribFontHeight
// -------------------------------------------------------------------------
-EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTHEIGHT || rAttr.Which() == EE_CHAR_FONTHEIGHT_CJK || rAttr.Which() == EE_CHAR_FONTHEIGHT_CTL, "Not a Height attribute!" );
@@ -190,7 +190,7 @@ void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribFontWidth
// -------------------------------------------------------------------------
-EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTWIDTH, "Not a Width attribute!" );
@@ -204,7 +204,7 @@ void EditCharAttribFontWidth::SetFont( SvxFont& /*rFont*/, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribStrikeout
// -------------------------------------------------------------------------
-EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, "Not a Size attribute!" );
@@ -218,7 +218,7 @@ void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribColor
// -------------------------------------------------------------------------
-EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_COLOR, "Not a Color attribute!" );
@@ -232,7 +232,7 @@ void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribLanguage
// -------------------------------------------------------------------------
-EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( ( rAttr.Which() == EE_CHAR_LANGUAGE ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CJK ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CTL ), "Not a Language attribute!" );
@@ -246,7 +246,7 @@ void EditCharAttribLanguage::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribShadow
// -------------------------------------------------------------------------
-EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_SHADOW, "Not a Shadow attribute!" );
@@ -254,26 +254,22 @@ EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT
void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* )
{
- rFont.SetShadow( (BOOL)((const SvxShadowedItem*)GetItem())->GetValue() );
+ rFont.SetShadow( (sal_Bool)((const SvxShadowedItem*)GetItem())->GetValue() );
}
// -------------------------------------------------------------------------
// class EditCharAttribEscapement
// -------------------------------------------------------------------------
-EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Not a escapement attribute!" );
}
-#if defined( WIN ) && !defined( WNT )
-#pragma optimize ("", off)
-#endif
-
void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
{
- USHORT nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
- rFont.SetPropr( (BYTE)nProp );
+ sal_uInt16 nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
+ rFont.SetPropr( (sal_uInt8)nProp );
short nEsc = ((const SvxEscapementItem*)GetItem())->GetEsc();
if ( nEsc == DFLT_ESC_AUTO_SUPER )
@@ -283,15 +279,10 @@ void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
rFont.SetEscapement( nEsc );
}
-#if defined( WIN ) && !defined( WNT )
-#pragma optimize ("", on)
-#endif
-
-
// -------------------------------------------------------------------------
// class EditCharAttribOutline
// -------------------------------------------------------------------------
-EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_OUTLINE, "Not a Outline attribute!" );
@@ -299,16 +290,16 @@ EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHOR
void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* )
{
- rFont.SetOutline( (BOOL)((const SvxContourItem*)GetItem())->GetValue() );
+ rFont.SetOutline( (sal_Bool)((const SvxContourItem*)GetItem())->GetValue() );
}
// -------------------------------------------------------------------------
// class EditCharAttribTab
// -------------------------------------------------------------------------
-EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos )
+EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos )
: EditCharAttrib( rAttr, nPos, nPos+1 )
{
- SetFeature( TRUE );
+ SetFeature( sal_True );
}
void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
@@ -318,10 +309,10 @@ void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribLineBreak
// -------------------------------------------------------------------------
-EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos )
+EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos )
: EditCharAttrib( rAttr, nPos, nPos+1 )
{
- SetFeature( TRUE );
+ SetFeature( sal_True );
}
void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
@@ -331,10 +322,10 @@ void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribField
// -------------------------------------------------------------------------
-EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos )
+EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos )
: EditCharAttrib( rAttr, nPos, nPos+1 )
{
- SetFeature( TRUE ); // !!!
+ SetFeature( sal_True ); // !!!
pTxtColor = 0;
pFldColor = 0;
}
@@ -344,7 +335,7 @@ void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* )
if ( pFldColor )
{
rFont.SetFillColor( *pFldColor );
- rFont.SetTransparent( FALSE );
+ rFont.SetTransparent( sal_False );
}
if ( pTxtColor )
rFont.SetColor( *pTxtColor );
@@ -364,28 +355,28 @@ EditCharAttribField::~EditCharAttribField()
Reset();
}
-BOOL EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
+sal_Bool EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
{
if ( aFieldValue != rAttr.aFieldValue )
- return FALSE;
+ return sal_False;
if ( ( pTxtColor && !rAttr.pTxtColor ) || ( !pTxtColor && rAttr.pTxtColor ) )
- return FALSE;
+ return sal_False;
if ( ( pTxtColor && rAttr.pTxtColor ) && ( *pTxtColor != *rAttr.pTxtColor ) )
- return FALSE;
+ return sal_False;
if ( ( pFldColor && !rAttr.pFldColor ) || ( !pFldColor && rAttr.pFldColor ) )
- return FALSE;
+ return sal_False;
if ( ( pFldColor && rAttr.pFldColor ) && ( *pFldColor != *rAttr.pFldColor ) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------------
// class EditCharAttribPairKerning
// -------------------------------------------------------------------------
-EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_PAIRKERNING, "Not a Pair Kerning!" );
@@ -399,7 +390,7 @@ void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribKerning
// -------------------------------------------------------------------------
-EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_KERNING, "Not a Kerning!" );
@@ -413,7 +404,7 @@ void EditCharAttribKerning::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribWordLineMode
// -------------------------------------------------------------------------
-EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_WLM, "Not a Kerning!" );
@@ -427,7 +418,7 @@ void EditCharAttribWordLineMode::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribEmphasisMark
// -------------------------------------------------------------------------
-EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_EMPHASISMARK, "Not a Emphasis attribute!" );
@@ -441,7 +432,7 @@ void EditCharAttribEmphasisMark::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribRelief
// -------------------------------------------------------------------------
-EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_RELIEF, "Not a relief attribute!" );
diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx
index 07cc3f75aa..e4d73082b1 100644..100755
--- a/editeng/source/editeng/editattr.hxx
+++ b/editeng/source/editeng/editattr.hxx
@@ -57,7 +57,7 @@ class SvxCharReliefItem;
class SfxVoidItem;
-#define CH_FEATURE_OLD (BYTE) 0xFF
+#define CH_FEATURE_OLD (sal_uInt8) 0xFF
#define CH_FEATURE (sal_Unicode) 0x01
// DEF_METRIC: For my pool, the DefMetric should always appear when
@@ -84,7 +84,7 @@ public:
// RemoveFromPool must always be called before the destructor!!
void RemoveFromPool( SfxItemPool& rPool );
- USHORT Which() const { return pItem->Which(); }
+ sal_uInt16 Which() const { return pItem->Which(); }
const SfxPoolItem* GetItem() const { return pItem; }
};
@@ -97,72 +97,72 @@ class EditCharAttrib : public EditAttrib
{
protected:
- USHORT nStart;
- USHORT nEnd;
- BOOL bFeature :1;
- BOOL bEdge :1;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
+ sal_Bool bFeature :1;
+ sal_Bool bEdge :1;
public:
- EditCharAttrib( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
- USHORT& GetStart() { return nStart; }
- USHORT& GetEnd() { return nEnd; }
+ sal_uInt16& GetStart() { return nStart; }
+ sal_uInt16& GetEnd() { return nEnd; }
- USHORT GetStart() const { return nStart; }
- USHORT GetEnd() const { return nEnd; }
+ sal_uInt16 GetStart() const { return nStart; }
+ sal_uInt16 GetEnd() const { return nEnd; }
- inline USHORT GetLen() const;
+ inline sal_uInt16 GetLen() const;
- inline void MoveForward( USHORT nDiff );
- inline void MoveBackward( USHORT nDiff );
+ inline void MoveForward( sal_uInt16 nDiff );
+ inline void MoveBackward( sal_uInt16 nDiff );
- inline void Expand( USHORT nDiff );
- inline void Collaps( USHORT nDiff );
+ inline void Expand( sal_uInt16 nDiff );
+ inline void Collaps( sal_uInt16 nDiff );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
- BOOL IsIn( USHORT nIndex )
+ sal_Bool IsIn( sal_uInt16 nIndex )
{ return ( ( nStart <= nIndex ) && ( nEnd >= nIndex ) ); }
- BOOL IsInside( USHORT nIndex )
+ sal_Bool IsInside( sal_uInt16 nIndex )
{ return ( ( nStart < nIndex ) && ( nEnd > nIndex ) ); }
- BOOL IsEmpty()
+ sal_Bool IsEmpty()
{ return nStart == nEnd; }
- BOOL IsFeature() const { return bFeature; }
- void SetFeature( BOOL b) { bFeature = b; }
+ sal_Bool IsFeature() const { return bFeature; }
+ void SetFeature( sal_Bool b) { bFeature = b; }
- BOOL IsEdge() const { return bEdge; }
- void SetEdge( BOOL b ) { bEdge = b; }
+ sal_Bool IsEdge() const { return bEdge; }
+ void SetEdge( sal_Bool b ) { bEdge = b; }
};
-inline USHORT EditCharAttrib::GetLen() const
+inline sal_uInt16 EditCharAttrib::GetLen() const
{
DBG_ASSERT( nEnd >= nStart, "EditCharAttrib: nEnd < nStart!" );
return nEnd-nStart;
}
-inline void EditCharAttrib::MoveForward( USHORT nDiff )
+inline void EditCharAttrib::MoveForward( sal_uInt16 nDiff )
{
DBG_ASSERT( ((long)nEnd + nDiff) <= 0xFFFF, "EditCharAttrib: MoveForward?!" );
nStart = nStart + nDiff;
nEnd = nEnd + nDiff;
}
-inline void EditCharAttrib::MoveBackward( USHORT nDiff )
+inline void EditCharAttrib::MoveBackward( sal_uInt16 nDiff )
{
DBG_ASSERT( ((long)nStart - nDiff) >= 0, "EditCharAttrib: MoveBackward?!" );
nStart = nStart - nDiff;
nEnd = nEnd - nDiff;
}
-inline void EditCharAttrib::Expand( USHORT nDiff )
+inline void EditCharAttrib::Expand( sal_uInt16 nDiff )
{
DBG_ASSERT( ( ((long)nEnd + nDiff) <= (long)0xFFFF ), "EditCharAttrib: Expand?!" );
DBG_ASSERT( !bFeature, "Please do not expand any features!" );
nEnd = nEnd + nDiff;
}
-inline void EditCharAttrib::Collaps( USHORT nDiff )
+inline void EditCharAttrib::Collaps( sal_uInt16 nDiff )
{
DBG_ASSERT( (long)nEnd - nDiff >= (long)nStart, "EditCharAttrib: Collaps?!" );
DBG_ASSERT( !bFeature, "Please do not shrink any Features!" );
@@ -175,83 +175,83 @@ inline void EditCharAttrib::Collaps( USHORT nDiff )
class EditCharAttribFont: public EditCharAttrib
{
public:
- EditCharAttribFont( const SvxFontItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribWeight
// -------------------------------------------------------------------------
class EditCharAttribWeight : public EditCharAttrib
{
public:
- EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribItalic
// -------------------------------------------------------------------------
class EditCharAttribItalic : public EditCharAttrib
{
public:
- EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribShadow
// -------------------------------------------------------------------------
class EditCharAttribShadow : public EditCharAttrib
{
public:
- EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribEscapement
// -------------------------------------------------------------------------
class EditCharAttribEscapement : public EditCharAttrib
{
public:
- EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribOutline
// -------------------------------------------------------------------------
class EditCharAttribOutline : public EditCharAttrib
{
public:
- EditCharAttribOutline( const SvxContourItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribStrikeout
// -------------------------------------------------------------------------
class EditCharAttribStrikeout : public EditCharAttrib
{
public:
- EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribUnderline
// -------------------------------------------------------------------------
class EditCharAttribUnderline : public EditCharAttrib
{
public:
- EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
@@ -262,7 +262,7 @@ public:
class EditCharAttribOverline : public EditCharAttrib
{
public:
- EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
@@ -273,7 +273,7 @@ public:
class EditCharAttribEmphasisMark : public EditCharAttrib
{
public:
- EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
@@ -284,78 +284,78 @@ public:
class EditCharAttribRelief : public EditCharAttrib
{
public:
- EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribFontHeight
// -------------------------------------------------------------------------
class EditCharAttribFontHeight : public EditCharAttrib
{
public:
- EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribFontWidth
// -------------------------------------------------------------------------
class EditCharAttribFontWidth : public EditCharAttrib
{
public:
- EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribColor
// -------------------------------------------------------------------------
class EditCharAttribColor : public EditCharAttrib
{
public:
- EditCharAttribColor( const SvxColorItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribLanguage
// -------------------------------------------------------------------------
class EditCharAttribLanguage : public EditCharAttrib
{
public:
- EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribTab
// -------------------------------------------------------------------------
class EditCharAttribTab : public EditCharAttrib
{
public:
- EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos );
+ EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribLineBreak
// -------------------------------------------------------------------------
class EditCharAttribLineBreak : public EditCharAttrib
{
public:
- EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos );
+ EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribField
// -------------------------------------------------------------------------
class EditCharAttribField: public EditCharAttrib
@@ -367,12 +367,12 @@ class EditCharAttribField: public EditCharAttrib
EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) const;
public:
- EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos );
+ EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos );
EditCharAttribField( const EditCharAttribField& rAttr );
~EditCharAttribField();
- BOOL operator == ( const EditCharAttribField& rAttr ) const;
- BOOL operator != ( const EditCharAttribField& rAttr ) const
+ sal_Bool operator == ( const EditCharAttribField& rAttr ) const;
+ sal_Bool operator != ( const EditCharAttribField& rAttr ) const
{ return !(operator == ( rAttr ) ); }
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
@@ -390,35 +390,35 @@ public:
}
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribPairKerning
// -------------------------------------------------------------------------
class EditCharAttribPairKerning : public EditCharAttrib
{
public:
- EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribKerning
// -------------------------------------------------------------------------
class EditCharAttribKerning : public EditCharAttrib
{
public:
- EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
-// -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// class EditCharAttribWordLineMode
// -------------------------------------------------------------------------
class EditCharAttribWordLineMode: public EditCharAttrib
{
public:
- EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT nStart, USHORT nEnd );
+ EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index f56b1483c8..2b22328738 100644..100755
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -88,7 +88,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
case EE_PARA_NUMBULLET:
{
aDebStr += "NumItem ";
- for ( USHORT nLevel = 0; nLevel < 3; nLevel++ )
+ for ( sal_uInt16 nLevel = 0; nLevel < 3; nLevel++ )
{
aDebStr += "Level";
aDebStr += ByteString::CreateFromInt32( nLevel );
@@ -148,14 +148,14 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
else if ( ((SvxLineSpacingItem&)rItem).GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
aDebStr += "Prop: ";
- aDebStr += ByteString::CreateFromInt32( (ULONG)((SvxLineSpacingItem&)rItem).GetPropLineSpace() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uLong)((SvxLineSpacingItem&)rItem).GetPropLineSpace() );
}
else
aDebStr += "Unsupported Type!";
break;
case EE_PARA_JUST:
aDebStr += "SvxAdust=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAdjustItem&)rItem).GetAdjust() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAdjustItem&)rItem).GetAdjust() );
break;
case EE_PARA_TABS:
{
@@ -165,7 +165,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
if ( rTabs.Count() )
{
aDebStr += "( ";
- for ( USHORT i = 0; i < rTabs.Count(); i++ )
+ for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ )
{
const SvxTabStop& rTab = rTabs[i];
aDebStr += ByteString::CreateFromInt32( rTab.GetTabPos() );
@@ -179,17 +179,17 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
case EE_CHAR_LANGUAGE_CJK:
case EE_CHAR_LANGUAGE_CTL:
aDebStr += "Language=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxLanguageItem&)rItem).GetLanguage() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxLanguageItem&)rItem).GetLanguage() );
break;
case EE_CHAR_COLOR:
{
aDebStr += "Color= ";
Color aColor( ((SvxColorItem&)rItem).GetValue() );
- aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetRed() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetRed() );
aDebStr += ", ";
- aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetGreen() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetGreen() );
aDebStr += ", ";
- aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetBlue() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetBlue() );
}
break;
case EE_CHAR_FONTINFO:
@@ -199,7 +199,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
aDebStr += "Font=";
aDebStr += ByteString( ((SvxFontItem&)rItem).GetFamilyName(), RTL_TEXTENCODING_ASCII_US );
aDebStr += " (CharSet: ";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxFontItem&)rItem).GetCharSet() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxFontItem&)rItem).GetCharSet() );
aDebStr += ')';
}
break;
@@ -229,41 +229,41 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
case EE_CHAR_WEIGHT_CJK:
case EE_CHAR_WEIGHT_CTL:
aDebStr += "FontWeight=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWeightItem&)rItem).GetWeight() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWeightItem&)rItem).GetWeight() );
break;
case EE_CHAR_UNDERLINE:
aDebStr += "FontUnderline=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetLineStyle() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxUnderlineItem&)rItem).GetLineStyle() );
break;
case EE_CHAR_OVERLINE:
aDebStr += "FontOverline=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxOverlineItem&)rItem).GetLineStyle() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxOverlineItem&)rItem).GetLineStyle() );
break;
case EE_CHAR_EMPHASISMARK:
aDebStr += "FontUnderline=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxEmphasisMarkItem&)rItem).GetEmphasisMark() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxEmphasisMarkItem&)rItem).GetEmphasisMark() );
break;
case EE_CHAR_RELIEF:
aDebStr += "FontRelief=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxCharReliefItem&)rItem).GetValue() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxCharReliefItem&)rItem).GetValue() );
break;
case EE_CHAR_STRIKEOUT:
aDebStr += "FontStrikeout=";
- aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxCrossedOutItem&)rItem).GetStrikeout() );
+ aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxCrossedOutItem&)rItem).GetStrikeout() );
break;
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
aDebStr += "FontPosture=";
- aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxPostureItem&)rItem).GetPosture() );
+ aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxPostureItem&)rItem).GetPosture() );
break;
case EE_CHAR_OUTLINE:
aDebStr += "FontOutline=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxContourItem&)rItem).GetValue() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxContourItem&)rItem).GetValue() );
break;
case EE_CHAR_SHADOW:
aDebStr += "FontShadowed=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxShadowedItem&)rItem).GetValue() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxShadowedItem&)rItem).GetValue() );
break;
case EE_CHAR_ESCAPEMENT:
aDebStr += "Escape=";
@@ -273,7 +273,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
break;
case EE_CHAR_PAIRKERNING:
aDebStr += "PairKerning=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAutoKernItem&)rItem).GetValue() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAutoKernItem&)rItem).GetValue() );
break;
case EE_CHAR_KERNING:
{
@@ -290,7 +290,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
break;
case EE_CHAR_WLM:
aDebStr += "WordLineMode=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWordLineModeItem&)rItem).GetValue() );
+ aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWordLineModeItem&)rItem).GetValue() );
break;
case EE_CHAR_XMLATTRIBS:
aDebStr += "XMLAttribs=...";
@@ -299,9 +299,9 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
return aDebStr;
}
-void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL bShowALL )
+void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL )
{
- for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+ for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
{
fprintf( fp, "\nWhich: %i\t", nWhich );
if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_OFF )
@@ -320,7 +320,7 @@ void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL
}
}
-void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
+void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
{
#if defined UNX
FILE* fp = fopen( "/tmp/debug.log", "w" );
@@ -338,7 +338,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
fprintf( fp, "================================================================================" );
fprintf( fp, "\n================== Document ================================================" );
fprintf( fp, "\n================================================================================" );
- for ( USHORT nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++)
+ for ( sal_uInt16 nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++)
{
ParaPortion* pPPortion = pEE->pImpEditEngine->GetParaPortions().GetObject(nPortion );
@@ -348,11 +348,11 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
if ( pStyle )
fprintf( fp, " %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
fprintf( fp, "\nParagraph attribute:" );
- DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), FALSE, FALSE );
+ DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), sal_False, sal_False );
fprintf( fp, "\nCharacter attribute:" );
- BOOL bZeroAttr = FALSE;
- USHORT z;
+ sal_Bool bZeroAttr = sal_False;
+ sal_uInt16 z;
for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ )
{
EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z );
@@ -366,7 +366,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
aCharAttribs += '\t';
aCharAttribs += ByteString::CreateFromInt32( pAttr->GetEnd() );
if ( pAttr->IsEmpty() )
- bZeroAttr = TRUE;
+ bZeroAttr = sal_True;
fprintf( fp, "%s => ", aCharAttribs.GetBuffer() );
ByteString aDebStr = DbgOutItem( rPool, *pAttr->GetItem() );
@@ -375,7 +375,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
if ( bZeroAttr )
fprintf( fp, "\nNULL-Attribute!" );
- USHORT nTextPortions = pPPortion->GetTextPortions().Count();
+ sal_uInt16 nTextPortions = pPPortion->GetTextPortions().Count();
ByteString aPortionStr("\nText portions: #");
aPortionStr += ByteString::CreateFromInt32( nTextPortions );
aPortionStr += " \nA";
@@ -385,7 +385,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
aPortionStr += "\nA";
aPortionStr += ByteString::CreateFromInt32( nPortion );
aPortionStr += ": ";
- ULONG n = 0;
+ sal_uLong n = 0;
for ( z = 0; z < nTextPortions; z++ )
{
TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z );
@@ -395,7 +395,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
aPortionStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
aPortionStr += ")";
aPortionStr += "[";
- aPortionStr += ByteString::CreateFromInt32( (USHORT)pPortion->GetKind() );
+ aPortionStr += ByteString::CreateFromInt32( (sal_uInt16)pPortion->GetKind() );
aPortionStr += "]";
aPortionStr += ";";
n += pPortion->GetLen();
@@ -411,7 +411,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
fprintf( fp, "\n\nLines:" );
// First the content ...
- USHORT nLine;
+ sal_uInt16 nLine;
for ( nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ )
{
EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
@@ -432,8 +432,8 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
if ( pEE->pImpEditEngine->GetStyleSheetPool() )
{
- ULONG nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0;
- fprintf( fp, "\n\n================================================================================" );
+ sal_uLong nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0;
+ fprintf( fp, "\n\n ================================================================================" );
fprintf( fp, "\n================== Stylesheets =============================================" );
fprintf( fp, "\n================================================================================" );
fprintf( fp, "\n#Template: %lu\n", nStyles );
@@ -444,7 +444,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
fprintf( fp, "\nTemplate: %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
fprintf( fp, "\nParent: %s", ByteString( pStyle->GetParent(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
fprintf( fp, "\nFollow: %s", ByteString( pStyle->GetFollow(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
- DbgOutItemSet( fp, pStyle->GetItemSet(), FALSE, FALSE );
+ DbgOutItemSet( fp, pStyle->GetItemSet(), sal_False, sal_False );
fprintf( fp, "\n----------------------------------" );
pStyle = aIter.Next();
@@ -454,7 +454,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
fprintf( fp, "\n\n================================================================================" );
fprintf( fp, "\n================== Defaults ================================================" );
fprintf( fp, "\n================================================================================" );
- DbgOutItemSet( fp, pEE->pImpEditEngine->GetEmptyItemSet(), TRUE, TRUE );
+ DbgOutItemSet( fp, pEE->pImpEditEngine->GetEmptyItemSet(), sal_True, sal_True );
fprintf( fp, "\n\n================================================================================" );
fprintf( fp, "\n================== EditEngine & Views ======================================" );
@@ -466,7 +466,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
fprintf( fp, "\nMinAutoPaperSize: %li x %li", pEE->GetMinAutoPaperSize().Width(), pEE->GetMinAutoPaperSize().Height() );
fprintf( fp, "\nUpdate: %i", pEE->GetUpdateMode() );
fprintf( fp, "\nNumber of Views: %i", pEE->GetViewCount() );
- for ( USHORT nView = 0; nView < pEE->GetViewCount(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < pEE->GetViewCount(); nView++ )
{
EditView* pV = pEE->GetView( nView );
DBG_ASSERT( pV, "View not found!" );
@@ -483,7 +483,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
fprintf( fp, "\n\n================================================================================" );
fprintf( fp, "\n================== Current View ===========================================" );
fprintf( fp, "\n================================================================================" );
- DbgOutItemSet( fp, pEE->GetActiveView()->GetAttribs(), TRUE, FALSE );
+ DbgOutItemSet( fp, pEE->GetActiveView()->GetAttribs(), sal_True, sal_False );
}
fclose( fp );
if ( bInfoBox )
@@ -492,7 +492,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
{
- USHORT z;
+ sal_uInt16 z;
ByteString aDebStr( "Paragraph Length = " );
aDebStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() );
@@ -510,7 +510,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
}
aDebStr += "\nText portions:";
- USHORT n = 0;
+ sal_uInt16 n = 0;
for ( z = 0; z < pPPortion->GetTextPortions().Count(); z++ )
{
TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z );
@@ -525,7 +525,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
aDebStr += "\nTotal length: ";
aDebStr += ByteString::CreateFromInt32( n );
aDebStr += "\nSorted after Start:";
- for ( USHORT x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ )
+ for ( sal_uInt16 x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ )
{
EditCharAttrib* pCurAttrib = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( x );
aDebStr += "\nStart: ";
@@ -539,7 +539,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
ByteString EditDbg::GetTextPortionInfo( TextPortionList& rPortions )
{
ByteString aDebStr;
- for ( USHORT z = 0; z < rPortions.Count(); z++ )
+ for ( sal_uInt16 z = 0; z < rPortions.Count(); z++ )
{
TextPortion* pPortion = rPortions.GetObject( z );
aDebStr += " ";
@@ -559,28 +559,28 @@ void EditDbg::ShowPortionData( ParaPortion* pPortion )
}
-BOOL ParaPortion::DbgCheckTextPortions()
+sal_Bool ParaPortion::DbgCheckTextPortions()
{
// check, if Portion length ok:
- USHORT nXLen = 0;
- for ( USHORT nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ )
+ sal_uInt16 nXLen = 0;
+ for ( sal_uInt16 nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ )
nXLen = nXLen + aTextPortionList[nPortion]->GetLen();
- return nXLen == pNode->Len() ? TRUE : FALSE;
+ return nXLen == pNode->Len() ? sal_True : sal_False;
}
-BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart )
+sal_Bool CheckOrderedList( CharAttribArray& rAttribs, sal_Bool bStart )
{
- USHORT nPrev = 0;
- for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+ sal_uInt16 nPrev = 0;
+ for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
{
EditCharAttrib* pAttr = rAttribs[nAttr];
- USHORT nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd();
+ sal_uInt16 nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd();
if ( nCur < nPrev )
- return FALSE;
+ return sal_False;
nPrev = nCur;
}
- return TRUE;
+ return sal_True;
}
#endif
diff --git a/editeng/source/editeng/editdbg.hxx b/editeng/source/editeng/editdbg.hxx
index 45cff0d210..041d3b3954 100644..100755
--- a/editeng/source/editeng/editdbg.hxx
+++ b/editeng/source/editeng/editdbg.hxx
@@ -42,12 +42,12 @@ class SfxItemPool;
class SfxPoolItem;
ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem );
-void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL bShowALL );
+void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL );
class EditDbg
{
public:
- static void ShowEditEngineData( EditEngine* pEditEngine, BOOL bInfoBox = TRUE );
+ static void ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True );
static void ShowPortionData( ParaPortion* pPortion );
static ByteString GetPortionInfo( ParaPortion* pPPortion );
static ByteString GetTextPortionInfo( TextPortionList& rPortions );
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index cb6161ec5d..08758a8f64 100644..100755
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -72,10 +72,10 @@ using namespace ::com::sun::star;
// ------------------------------------------------------------
-USHORT GetScriptItemId( USHORT nItemId, short nScriptType )
+sal_uInt16 GetScriptItemId( sal_uInt16 nItemId, short nScriptType )
{
- USHORT nId = nItemId;
-
+ sal_uInt16 nId = nItemId;
+
if ( ( nScriptType == i18n::ScriptType::ASIAN ) ||
( nScriptType == i18n::ScriptType::COMPLEX ) )
{
@@ -102,11 +102,11 @@ USHORT GetScriptItemId( USHORT nItemId, short nScriptType )
return nId;
}
-BOOL IsScriptItemValid( USHORT nItemId, short nScriptType )
+sal_Bool IsScriptItemValid( sal_uInt16 nItemId, short nScriptType )
{
- BOOL bValid = TRUE;
-
- switch ( nItemId )
+ sal_Bool bValid = sal_True;
+
+ switch ( nItemId )
{
case EE_CHAR_LANGUAGE:
bValid = nScriptType == i18n::ScriptType::LATIN;
@@ -224,31 +224,31 @@ SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
{ SID_FIELD, SFX_ITEM_POOLABLE }
};
-USHORT aV1Map[] = {
+sal_uInt16 aV1Map[] = {
3999, 4001, 4002, 4003, 4004, 4005, 4006,
4007, 4008, 4009, 4010, 4011, 4012, 4013, 4017, 4018, 4019 // MI: 4019?
};
-USHORT aV2Map[] = {
+sal_uInt16 aV2Map[] = {
3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009,
4010, 4011, 4012, 4013, 4014, 4015, 4016, 4018, 4019, 4020
};
-USHORT aV3Map[] = {
+sal_uInt16 aV3Map[] = {
3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007,
4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019,
4020, 4021
};
-USHORT aV4Map[] = {
- 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
- 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
- 4014, 4015, 4016, 4017, 4018,
+sal_uInt16 aV4Map[] = {
+ 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
+ 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
+ 4014, 4015, 4016, 4017, 4018,
/* CJK Items inserted here: EE_CHAR_LANGUAGE - EE_CHAR_XMLATTRIBS */
4034, 4035, 4036, 4037
};
-USHORT aV5Map[] = {
+sal_uInt16 aV5Map[] = {
3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023,
@@ -258,10 +258,6 @@ USHORT aV5Map[] = {
};
SV_IMPL_PTRARR( DummyContentList, ContentNode* );
-SV_IMPL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo );
-SV_IMPL_VARARR( WritingDirectionInfos, WritingDirectionInfo );
-// SV_IMPL_VARARR( ExtraCharInfos, ExtraCharInfo );
-
int SAL_CALL CompareStart( const void* pFirst, const void* pSecond )
{
@@ -272,7 +268,7 @@ int SAL_CALL CompareStart( const void* pFirst, const void* pSecond )
return 0;
}
-EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE )
{
// Create a new attribute in the pool
const SfxPoolItem& rNew = rPool.Put( rAttr );
@@ -422,8 +418,8 @@ EditLine::EditLine()
nTxtWidth = 0;
nCrsrHeight = 0;
nMaxAscent = 0;
- bHangingPunctuation = FALSE;
- bInvalid = TRUE;
+ bHangingPunctuation = sal_False;
+ bInvalid = sal_True;
}
EditLine::EditLine( const EditLine& r )
@@ -442,7 +438,7 @@ EditLine::EditLine( const EditLine& r )
nTxtWidth = 0;
nCrsrHeight = 0;
nMaxAscent = 0;
- bInvalid = TRUE;
+ bInvalid = sal_True;
}
EditLine::~EditLine()
@@ -471,21 +467,21 @@ EditLine* EditLine::Clone() const
return pL;
}
-BOOL operator == ( const EditLine& r1, const EditLine& r2 )
+sal_Bool operator == ( const EditLine& r1, const EditLine& r2 )
{
if ( r1.nStart != r2.nStart )
- return FALSE;
+ return sal_False;
if ( r1.nEnd != r2.nEnd )
- return FALSE;
+ return sal_False;
if ( r1.nStartPortion != r2.nStartPortion )
- return FALSE;
+ return sal_False;
if ( r1.nEndPortion != r2.nEndPortion )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
EditLine& EditLine::operator = ( const EditLine& r )
@@ -498,7 +494,7 @@ EditLine& EditLine::operator = ( const EditLine& r )
}
-BOOL operator != ( const EditLine& r1, const EditLine& r2 )
+sal_Bool operator != ( const EditLine& r1, const EditLine& r2 )
{
return !( r1 == r2 );
}
@@ -509,11 +505,11 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion )
Size aTmpSz;
TextPortion* pPortion;
- USHORT nIndex = GetStart();
+ sal_uInt16 nIndex = GetStart();
DBG_ASSERT( rParaPortion.GetTextPortions().Count(), "GetTextSize before CreatePortions !" );
- for ( USHORT n = nStartPortion; n <= nEndPortion; n++ )
+ for ( sal_uInt16 n = nStartPortion; n <= nEndPortion; n++ )
{
pPortion = rParaPortion.GetTextPortions().GetObject(n);
switch ( pPortion->GetKind() )
@@ -537,7 +533,7 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion )
nIndex = nIndex + pPortion->GetLen();
}
- SetHeight( (USHORT)aSz.Height() );
+ SetHeight( (sal_uInt16)aSz.Height() );
return aSz;
}
@@ -552,22 +548,22 @@ EditLineList::~EditLineList()
void EditLineList::Reset()
{
- for ( USHORT nLine = 0; nLine < Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < Count(); nLine++ )
delete GetObject(nLine);
Remove( 0, Count() );
}
-void EditLineList::DeleteFromLine( USHORT nDelFrom )
+void EditLineList::DeleteFromLine( sal_uInt16 nDelFrom )
{
DBG_ASSERT( nDelFrom <= (Count() - 1), "DeleteFromLine: Out of range" );
- for ( USHORT nL = nDelFrom; nL < Count(); nL++ )
+ for ( sal_uInt16 nL = nDelFrom; nL < Count(); nL++ )
delete GetObject(nL);
Remove( nDelFrom, Count()-nDelFrom );
}
-USHORT EditLineList::FindLine( USHORT nChar, BOOL bInclEnd )
+sal_uInt16 EditLineList::FindLine( sal_uInt16 nChar, sal_Bool bInclEnd )
{
- for ( USHORT nLine = 0; nLine < Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < Count(); nLine++ )
{
EditLine* pLine = GetObject( nLine );
if ( ( bInclEnd && ( pLine->GetEnd() >= nChar ) ) ||
@@ -581,26 +577,26 @@ USHORT EditLineList::FindLine( USHORT nChar, BOOL bInclEnd )
return ( Count() - 1 );
}
-BOOL EditPaM::DbgIsBuggy( EditDoc& rDoc )
+sal_Bool EditPaM::DbgIsBuggy( EditDoc& rDoc )
{
if ( !pNode )
- return TRUE;
+ return sal_True;
if ( rDoc.GetPos( pNode ) >= rDoc.Count() )
- return TRUE;
+ return sal_True;
if ( nIndex > pNode->Len() )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL EditSelection::DbgIsBuggy( EditDoc& rDoc )
+sal_Bool EditSelection::DbgIsBuggy( EditDoc& rDoc )
{
if ( aStartPaM.DbgIsBuggy( rDoc ) )
- return TRUE;
+ return sal_True;
if ( aEndPaM.DbgIsBuggy( rDoc ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
EditSelection::EditSelection()
@@ -629,20 +625,20 @@ EditSelection& EditSelection::operator = ( const EditPaM& rPaM )
return *this;
}
-BOOL EditSelection::IsInvalid() const
+sal_Bool EditSelection::IsInvalid() const
{
EditPaM aEmptyPaM;
if ( aStartPaM == aEmptyPaM )
- return TRUE;
+ return sal_True;
if ( aEndPaM == aEmptyPaM )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL EditSelection::Adjust( const ContentList& rNodes )
+sal_Bool EditSelection::Adjust( const ContentList& rNodes )
{
DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index out of range in Adjust(1)" );
DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index out of range in Adjust(2)" );
@@ -650,17 +646,17 @@ BOOL EditSelection::Adjust( const ContentList& rNodes )
ContentNode* pStartNode = aStartPaM.GetNode();
ContentNode* pEndNode = aEndPaM.GetNode();
- USHORT nStartNode = rNodes.GetPos( pStartNode );
- USHORT nEndNode = rNodes.GetPos( pEndNode );
+ sal_uInt16 nStartNode = rNodes.GetPos( pStartNode );
+ sal_uInt16 nEndNode = rNodes.GetPos( pEndNode );
DBG_ASSERT( nStartNode != USHRT_MAX, "Node out of range in Adjust(1)" );
DBG_ASSERT( nEndNode != USHRT_MAX, "Node out of range in Adjust(2)" );
- BOOL bSwap = FALSE;
+ sal_Bool bSwap = sal_False;
if ( nStartNode > nEndNode )
- bSwap = TRUE;
+ bSwap = sal_True;
else if ( ( nStartNode == nEndNode ) && ( aStartPaM.GetIndex() > aEndPaM.GetIndex() ) )
- bSwap = TRUE;
+ bSwap = sal_True;
if ( bSwap )
{
@@ -672,15 +668,15 @@ BOOL EditSelection::Adjust( const ContentList& rNodes )
return bSwap;
}
-BOOL operator == ( const EditPaM& r1, const EditPaM& r2 )
+sal_Bool operator == ( const EditPaM& r1, const EditPaM& r2 )
{
if ( r1.GetNode() != r2.GetNode() )
- return FALSE;
+ return sal_False;
if ( r1.GetIndex() != r2.GetIndex() )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
EditPaM& EditPaM::operator = ( const EditPaM& rPaM )
@@ -690,7 +686,7 @@ EditPaM& EditPaM::operator = ( const EditPaM& rPaM )
return *this;
}
-BOOL operator != ( const EditPaM& r1, const EditPaM& r2 )
+sal_Bool operator != ( const EditPaM& r1, const EditPaM& r2 )
{
return !( r1 == r2 );
}
@@ -714,7 +710,7 @@ ContentNode::~ContentNode()
delete pWrongList;
}
-void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemPool )
+void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool& rItemPool )
{
if ( !nNew )
return;
@@ -725,10 +721,10 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
// an existing special case, must (n-1) opportunities be provided with
// bResort. The most likely possibility receives no bResort, so that is
// not sorted anew when all attributes are the same.
- BOOL bResort = FALSE;
- BOOL bExpandedEmptyAtIndexNull = FALSE;
+ sal_Bool bResort = sal_False;
+ sal_Bool bExpandedEmptyAtIndexNull = sal_False;
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
while ( pAttrib )
{
@@ -750,7 +746,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
// if ( pAttrib->GetStart() == nIndex )
pAttrib->Expand( nNew );
if ( pAttrib->GetStart() == 0 )
- bExpandedEmptyAtIndexNull = TRUE;
+ bExpandedEmptyAtIndexNull = sal_True;
}
// 1: Attribute starts before, goes to index ...
else if ( pAttrib->GetEnd() == nIndex ) // Start must be before
@@ -765,7 +761,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
pAttrib->Expand( nNew );
}
else
- bResort = TRUE;
+ bResort = sal_True;
}
// 2: Attribute starts before, goes past the Index...
else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
@@ -779,24 +775,24 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
if ( pAttrib->IsFeature() )
{
pAttrib->MoveForward( nNew );
- bResort = TRUE;
+ bResort = sal_True;
}
else
{
- BOOL bExpand = FALSE;
+ sal_Bool bExpand = sal_False;
if ( nIndex == 0 )
{
- bExpand = TRUE;
+ bExpand = sal_True;
if( bExpandedEmptyAtIndexNull )
{
// Check if this kind of attribut was empty and expanded here...
- USHORT nW = pAttrib->GetItem()->Which();
- for ( USHORT nA = 0; nA < nAttr; nA++ )
+ sal_uInt16 nW = pAttrib->GetItem()->Which();
+ for ( sal_uInt16 nA = 0; nA < nAttr; nA++ )
{
EditCharAttrib* pA = aCharAttribList.GetAttribs()[nA];
if ( ( pA->GetStart() == 0 ) && ( pA->GetItem()->Which() == nW ) )
{
- bExpand = FALSE;
+ bExpand = sal_False;
break;
}
}
@@ -806,7 +802,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
if ( bExpand )
{
pAttrib->Expand( nNew );
- bResort = TRUE;
+ bResort = sal_True;
}
else
{
@@ -817,7 +813,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
}
if ( pAttrib->IsEdge() )
- pAttrib->SetEdge( FALSE );
+ pAttrib->SetEdge( sal_False );
DBG_ASSERT( !pAttrib->IsFeature() || ( pAttrib->GetLen() == 1 ), "Expand: FeaturesLen != 1" );
@@ -826,7 +822,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
if ( pAttrib->IsEmpty() )
{
OSL_FAIL( "Empty Attribute after ExpandAttribs?" );
- bResort = TRUE;
+ bResort = sal_True;
aCharAttribList.GetAttribs().Remove( nAttr );
rItemPool.Remove( *pAttrib->GetItem() );
delete pAttrib;
@@ -841,31 +837,31 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP
if ( pWrongList )
{
- BOOL bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex );
+ sal_Bool bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex );
pWrongList->TextInserted( nIndex, nNew, bSep );
}
#ifdef EDITDEBUG
- DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Expand: Start List distorted" );
+ DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Expand: Start List distorted" );
#endif
}
-void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& rItemPool )
+void ContentNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted, SfxItemPool& rItemPool )
{
if ( !nDeleted )
return;
// Since features are treated differently than normal character attributes,
// can also the order of the start list be change!
- BOOL bResort = FALSE;
- BOOL bDelAttr = FALSE;
- USHORT nEndChanges = nIndex+nDeleted;
+ sal_Bool bResort = sal_False;
+ sal_Bool bDelAttr = sal_False;
+ sal_uInt16 nEndChanges = nIndex+nDeleted;
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
while ( pAttrib )
{
- bDelAttr = FALSE;
+ bDelAttr = sal_False;
if ( pAttrib->GetEnd() >= nIndex )
{
// Move all Attribute behind the insert point...
@@ -881,7 +877,7 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r
if ( !pAttrib->IsFeature() && ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) )
pAttrib->GetEnd() = nIndex; // empty
else
- bDelAttr = TRUE;
+ bDelAttr = sal_True;
}
// 2. Attribute starts earlier, ends inside or behind it ...
else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
@@ -899,7 +895,7 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r
if ( pAttrib->IsFeature() )
{
pAttrib->MoveBackward( nDeleted );
- bResort = TRUE;
+ bResort = sal_True;
}
else
{
@@ -914,14 +910,14 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r
DBG_ASSERT( ( pAttrib->GetEnd() <= Len()) || bDelAttr, "Collaps: Attribute larger than paragraph!" );
if ( bDelAttr )
{
- bResort = TRUE;
+ bResort = sal_True;
aCharAttribList.GetAttribs().Remove( nAttr );
rItemPool.Remove( *pAttrib->GetItem() );
delete pAttrib;
nAttr--;
}
else if ( pAttrib->IsEmpty() )
- aCharAttribList.HasEmptyAttribs() = TRUE;
+ aCharAttribList.HasEmptyAttribs() = sal_True;
nAttr++;
pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
@@ -934,17 +930,17 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r
pWrongList->TextDeleted( nIndex, nDeleted );
#ifdef EDITDEBUG
- DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Collaps: Start list distorted" );
+ DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Collaps: Start list distorted" );
#endif
}
-void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs )
+void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, sal_Bool bKeepEndingAttribs )
{
DBG_ASSERT( pPrevNode, "Copy of attributes to a null pointer?" );
xub_StrLen nCut = pPrevNode->Len();
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttrib = GetAttrib( pPrevNode->GetCharAttribs().GetAttribs(), nAttr );
while ( pAttrib )
{
@@ -993,22 +989,22 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
{
DBG_ASSERT( pNextNode, "Copy of attributes to a null pointer?" );
- USHORT nNewStart = Len();
+ sal_uInt16 nNewStart = Len();
#ifdef EDITDEBUG
DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute before AppendAttribs broken" );
#endif
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttrib = GetAttrib( pNextNode->GetCharAttribs().GetAttribs(), nAttr );
while ( pAttrib )
{
// Move all attributes in the current node (this)
- BOOL bMelted = FALSE;
+ sal_Bool bMelted = sal_False;
if ( ( pAttrib->GetStart() == 0 ) && ( !pAttrib->IsFeature() ) )
{
// Attributes can possibly be summarized as:
- USHORT nTmpAttr = 0;
+ sal_uInt16 nTmpAttr = 0;
EditCharAttrib* pTmpAttrib = GetAttrib( aCharAttribList.GetAttribs(), nTmpAttr );
while ( !bMelted && pTmpAttrib )
{
@@ -1022,7 +1018,7 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
pNextNode->GetCharAttribs().GetAttribs().Remove( nAttr );
// Unsubscribe from the pool?!
delete pAttrib;
- bMelted = TRUE;
+ bMelted = sal_True;
}
}
++nTmpAttr;
@@ -1071,7 +1067,7 @@ void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyl
GetContentAttribs().GetItems(), pS == NULL );
}
-void ContentNode::SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont )
+void ContentNode::SetStyleSheet( SfxStyleSheet* pS, sal_Bool bRecalcFont )
{
aContentAttribs.SetStyleSheet( pS );
if ( bRecalcFont )
@@ -1112,10 +1108,10 @@ ContentAttribs::~ContentAttribs()
{
}
-SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab )
+SvxTabStop ContentAttribs::FindTabStop( long nCurPos, sal_uInt16 nDefTab )
{
const SvxTabStopItem& rTabs = (const SvxTabStopItem&) GetItem( EE_PARA_TABS );
- for ( USHORT i = 0; i < rTabs.Count(); i++ )
+ for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ )
{
const SvxTabStop& rTab = rTabs[i];
if ( rTab.GetTabPos() > nCurPos )
@@ -1131,7 +1127,7 @@ SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab )
void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS )
{
- BOOL bStyleChanged = ( pStyle != pS );
+ sal_Bool bStyleChanged = ( pStyle != pS );
pStyle = pS;
// Only when other style sheet, not when current style sheet modified
if ( pStyle && bStyleChanged )
@@ -1140,7 +1136,7 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS )
// which are specified in the style, so that the attributes of the
// style can have an affect.
const SfxItemSet& rStyleAttribs = pStyle->GetItemSet();
- for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+ for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
{
// Don't change bullet on/off
if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON ) )
@@ -1149,23 +1145,23 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS )
}
}
-const SfxPoolItem& ContentAttribs::GetItem( USHORT nWhich )
+const SfxPoolItem& ContentAttribs::GetItem( sal_uInt16 nWhich )
{
// Hard paragraph attributes take precedence!
SfxItemSet* pTakeFrom = &aAttribSet;
- if ( pStyle && ( aAttribSet.GetItemState( nWhich, FALSE ) != SFX_ITEM_ON ) )
+ if ( pStyle && ( aAttribSet.GetItemState( nWhich, sal_False ) != SFX_ITEM_ON ) )
pTakeFrom = &pStyle->GetItemSet();
return pTakeFrom->Get( nWhich );
}
-BOOL ContentAttribs::HasItem( USHORT nWhich )
+sal_Bool ContentAttribs::HasItem( sal_uInt16 nWhich )
{
- BOOL bHasItem = FALSE;
- if ( aAttribSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_ON )
- bHasItem = TRUE;
+ sal_Bool bHasItem = sal_False;
+ if ( aAttribSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_ON )
+ bHasItem = sal_True;
else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_ON )
- bHasItem = TRUE;
+ bHasItem = sal_True;
return bHasItem;
}
@@ -1175,7 +1171,7 @@ ItemList::ItemList() : CurrentItem( 0 )
{
}
-const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich )
+const SfxPoolItem* ItemList::FindAttrib( sal_uInt16 nWhich )
{
for ( size_t i = 0, n = aItemPool.size(); i < n; ++i )
if ( aItemPool[ i ]->Which() == nWhich )
@@ -1211,21 +1207,21 @@ EditDoc::EditDoc( SfxItemPool* pPool )
if ( pPool )
{
pItemPool = pPool;
- bOwnerOfPool = FALSE;
+ bOwnerOfPool = sal_False;
}
else
{
- pItemPool = new EditEngineItemPool( FALSE );
- bOwnerOfPool = TRUE;
+ pItemPool = new EditEngineItemPool( sal_False );
+ bOwnerOfPool = sal_True;
}
-
+
nDefTab = DEFTAB;
- bIsVertical = FALSE;
- bIsFixedCellHeight = FALSE;
+ bIsVertical = sal_False;
+ bIsFixedCellHeight = sal_False;
// Don't create a empty node, Clear() will be called in EditEngine-CTOR
- SetModified( FALSE );
+ SetModified( sal_False );
};
EditDoc::~EditDoc()
@@ -1237,14 +1233,14 @@ EditDoc::~EditDoc()
void EditDoc::ImplDestroyContents()
{
- for ( USHORT nNode = Count(); nNode; )
+ for ( sal_uInt16 nNode = Count(); nNode; )
RemoveItemsFromPool( GetObject( --nNode ) );
DeleteAndDestroy( 0, Count() );
}
void EditDoc::RemoveItemsFromPool( ContentNode* pNode )
{
- for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
{
EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[nAttr];
GetItemPool().Remove( *pAttr->GetItem() );
@@ -1255,13 +1251,13 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
{
Font aPrevFont( rFont );
rFont.SetAlign( ALIGN_BASELINE );
- rFont.SetTransparent( TRUE );
+ rFont.SetTransparent( sal_True );
- USHORT nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType );
- USHORT nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType );
- USHORT nWhich_FontHeight = GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType );
- USHORT nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType );
- USHORT nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType );
+ sal_uInt16 nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType );
+ sal_uInt16 nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType );
+ sal_uInt16 nWhich_FontHeight = GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType );
+ sal_uInt16 nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType );
+ sal_uInt16 nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType );
if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SFX_ITEM_ON ) )
{
@@ -1295,8 +1291,8 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
{
const SvxEscapementItem& rEsc = (const SvxEscapementItem&) rSet.Get( EE_CHAR_ESCAPEMENT );
- USHORT nProp = rEsc.GetProp();
- rFont.SetPropr( (BYTE)nProp );
+ sal_uInt16 nProp = rEsc.GetProp();
+ rFont.SetPropr( (sal_uInt8)nProp );
short nEsc = rEsc.GetEsc();
if ( nEsc == DFLT_ESC_AUTO_SUPER )
@@ -1324,14 +1320,14 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
rFont = aPrevFont; // => The same ImpPointer for IsSameInstance
}
-void EditDoc::CreateDefFont( BOOL bUseStyles )
+void EditDoc::CreateDefFont( sal_Bool bUseStyles )
{
SfxItemSet aTmpSet( GetItemPool(), EE_PARA_START, EE_CHAR_END );
CreateFont( aDefFont, aTmpSet );
aDefFont.SetVertical( IsVertical() );
aDefFont.SetOrientation( IsVertical() ? 2700 : 0 );
- for ( USHORT nNode = 0; nNode < Count(); nNode++ )
+ for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ )
{
ContentNode* pNode = GetObject( nNode );
pNode->GetCharAttribs().GetDefFont() = aDefFont;
@@ -1358,11 +1354,11 @@ XubString EditDoc::GetSepStr( LineEnd eEnd )
XubString EditDoc::GetText( LineEnd eEnd ) const
{
- ULONG nLen = GetTextLen();
- USHORT nNodes = Count();
+ sal_uLong nLen = GetTextLen();
+ sal_uInt16 nNodes = Count();
String aSep = EditDoc::GetSepStr( eEnd );
- USHORT nSepSize = aSep.Len();
+ sal_uInt16 nSepSize = aSep.Len();
if ( nSepSize )
nLen += nNodes * nSepSize;
@@ -1373,8 +1369,8 @@ XubString EditDoc::GetText( LineEnd eEnd ) const
}
xub_Unicode* pStr = new xub_Unicode[nLen+1];
xub_Unicode* pCur = pStr;
- USHORT nLastNode = nNodes-1;
- for ( USHORT nNode = 0; nNode < nNodes; nNode++ )
+ sal_uInt16 nLastNode = nNodes-1;
+ for ( sal_uInt16 nNode = 0; nNode < nNodes; nNode++ )
{
XubString aTmp( GetParaAsString( GetObject(nNode) ) );
memcpy( pCur, aTmp.GetBuffer(), aTmp.Len()*sizeof(sal_Unicode) );
@@ -1391,24 +1387,24 @@ XubString EditDoc::GetText( LineEnd eEnd ) const
return aASCIIText;
}
-XubString EditDoc::GetParaAsString( USHORT nNode ) const
+XubString EditDoc::GetParaAsString( sal_uInt16 nNode ) const
{
return GetParaAsString( SaveGetObject( nNode ) );
}
-XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, BOOL bResolveFields ) const
+XubString EditDoc::GetParaAsString( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, sal_Bool bResolveFields ) const
{
if ( nEndPos > pNode->Len() )
nEndPos = pNode->Len();
DBG_ASSERT( nStartPos <= nEndPos, "Start and End reversed?" );
- USHORT nIndex = nStartPos;
+ sal_uInt16 nIndex = nStartPos;
XubString aStr;
EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex );
while ( nIndex < nEndPos )
{
- USHORT nEnd = nEndPos;
+ sal_uInt16 nEnd = nEndPos;
if ( pNextFeature && ( pNextFeature->GetStart() < nEnd ) )
nEnd = pNextFeature->GetStart();
else
@@ -1440,21 +1436,21 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT
return aStr;
}
-ULONG EditDoc::GetTextLen() const
+sal_uLong EditDoc::GetTextLen() const
{
- ULONG nLen = 0;
- for ( USHORT nNode = 0; nNode < Count(); nNode++ )
+ sal_uLong nLen = 0;
+ for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ )
{
ContentNode* pNode = GetObject( nNode );
nLen += pNode->Len();
// Fields can be longer than the placeholder in the Node
const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
- for ( USHORT nAttr = rAttrs.Count(); nAttr; )
+ for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; )
{
EditCharAttrib* pAttr = rAttrs[--nAttr];
if ( pAttr->Which() == EE_FEATURE_FIELD )
{
- USHORT nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len();
+ sal_uInt16 nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len();
if ( !nFieldLen )
nLen--;
else
@@ -1472,16 +1468,16 @@ EditPaM EditDoc::Clear()
ContentNode* pNode = new ContentNode( GetItemPool() );
Insert( pNode, 0 );
- CreateDefFont( FALSE );
+ CreateDefFont( sal_False );
- SetModified( FALSE );
+ SetModified( sal_False );
EditPaM aPaM( pNode, 0 );
return aPaM;
}
-void EditDoc::SetModified( BOOL b )
-{
+void EditDoc::SetModified( sal_Bool b )
+{
bModified = b;
if ( bModified )
{
@@ -1502,11 +1498,11 @@ EditPaM EditDoc::RemoveText()
ContentNode* pNode = new ContentNode( GetItemPool() );
Insert( pNode, 0 );
- pNode->SetStyleSheet( pPrevStyle, FALSE );
+ pNode->SetStyleSheet( pPrevStyle, sal_False );
pNode->GetContentAttribs().GetItems().Set( aPrevSet );
pNode->GetCharAttribs().GetDefFont() = aPrevFont;
- SetModified( TRUE );
+ SetModified( sal_True );
EditPaM aPaM( pNode, 0 );
return aPaM;
@@ -1521,7 +1517,7 @@ void EditDoc::InsertText( const EditPaM& rPaM, xub_Unicode c )
rPaM.GetNode()->Insert( c, rPaM.GetIndex() );
rPaM.GetNode()->ExpandAttribs( rPaM.GetIndex(), 1, GetItemPool() );
- SetModified( TRUE );
+ SetModified( sal_True );
}
EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr )
@@ -1535,16 +1531,16 @@ EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr )
aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() );
aPaM.GetIndex() = aPaM.GetIndex() + rStr.Len();
- SetModified( TRUE );
+ SetModified( sal_True );
return aPaM;
}
-EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs )
+EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs )
{
DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertParaBreak" );
ContentNode* pCurNode = aPaM.GetNode();
- USHORT nPos = GetPos( pCurNode );
+ sal_uInt16 nPos = GetPos( pCurNode );
XubString aStr = aPaM.GetNode()->Copy( aPaM.GetIndex() );
aPaM.GetNode()->Erase( aPaM.GetIndex() );
@@ -1552,7 +1548,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs )
ContentAttribs aContentAttribs( aPaM.GetNode()->GetContentAttribs() );
// for a new paragraph we like to have the bullet/numbering visible by default
- aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, TRUE), EE_PARA_BULLETSTATE );
+ aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_True), EE_PARA_BULLETSTATE );
// ContenNode constructor copies also the paragraph attributes
ContentNode* pNode = new ContentNode( aStr, aContentAttribs );
@@ -1575,7 +1571,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs )
Insert( pNode, nPos+1 );
- SetModified( TRUE );
+ SetModified( sal_True );
aPaM.SetNode( pNode );
aPaM.SetIndex( 0 );
@@ -1594,7 +1590,7 @@ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem )
DBG_ASSERT( pAttrib, "Why can not the feature be created?" );
aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttrib );
- SetModified( TRUE );
+ SetModified( sal_True );
aPaM.GetIndex()++;
return aPaM;
@@ -1611,27 +1607,27 @@ EditPaM EditDoc::ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight )
// the one to the right disappears.
RemoveItemsFromPool( pRight );
- USHORT nRight = GetPos( pRight );
+ sal_uInt16 nRight = GetPos( pRight );
Remove( nRight );
delete pRight;
- SetModified( TRUE );
+ SetModified( sal_True );
return aPaM;
}
-EditPaM EditDoc::RemoveChars( EditPaM aPaM, USHORT nChars )
+EditPaM EditDoc::RemoveChars( EditPaM aPaM, sal_uInt16 nChars )
{
// Maybe remove Features!
aPaM.GetNode()->Erase( aPaM.GetIndex(), nChars );
aPaM.GetNode()->CollapsAttribs( aPaM.GetIndex(), nChars, GetItemPool() );
- SetModified( TRUE );
+ SetModified( sal_True );
return aPaM;
}
-void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+void EditDoc::InsertAttribInSelection( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem )
{
DBG_ASSERT( pNode, "What to do with the attribute?" );
DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribute to large!" );
@@ -1666,17 +1662,17 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT
if ( pStartingAttrib )
pNode->GetCharAttribs().ResortAttribs();
- SetModified( TRUE );
+ SetModified( sal_True );
}
-BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich )
+sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich )
{
EditCharAttrib* pStarting;
EditCharAttrib* pEnding;
return RemoveAttribs( pNode, nStart, nEnd, pStarting, pEnding, nWhich );
}
-BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich )
+sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich )
{
DBG_ASSERT( pNode, "What to do with the attribute?" );
@@ -1687,23 +1683,23 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi
// This starts at the end of the selection => can be expanded
rpStarting = 0;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
DBG_ASSERT( nStart <= nEnd, "Small miscalculations in InsertAttribInSelection" );
// iterate over the attributes ...
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
while ( pAttr )
{
- BOOL bRemoveAttrib = FALSE;
- USHORT nAttrWhich = pAttr->Which();
+ sal_Bool bRemoveAttrib = sal_False;
+ sal_uInt16 nAttrWhich = pAttr->Which();
if ( ( nAttrWhich < EE_FEATURE_START ) && ( !nWhich || ( nAttrWhich == nWhich ) ) )
{
// Attribute starts in Selection
if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( pAttr->GetEnd() > nEnd )
{
pAttr->GetStart() = nEnd; // then it starts after this
@@ -1714,14 +1710,14 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi
else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
{
// Delete feature only if on the exact spot
- bRemoveAttrib = TRUE;
+ bRemoveAttrib = sal_True;
}
}
// Attribute ends in Selection
else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() )
{
pAttr->GetEnd() = nStart; // then it ends here
@@ -1730,13 +1726,13 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi
else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
{
// Delete feature only if on the exact spot
- bRemoveAttrib = TRUE;
+ bRemoveAttrib = sal_True;
}
}
// Attribute overlaps the selection
else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( pAttr->GetStart() == nStart )
{
pAttr->GetStart() = nEnd;
@@ -1753,7 +1749,7 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi
}
else // Attribute must be split ...
{
- USHORT nOldEnd = pAttr->GetEnd();
+ sal_uInt16 nOldEnd = pAttr->GetEnd();
pAttr->GetEnd() = nStart;
rpEnding = pAttr;
InsertAttrib( *pAttr->GetItem(), pNode, nEnd, nOldEnd );
@@ -1780,13 +1776,13 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi
// char attributes need to be sorted by start again
pNode->GetCharAttribs().ResortAttribs();
- SetModified( TRUE );
+ SetModified( sal_True );
}
return bChanged;
}
-void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, USHORT nStart, USHORT nEnd )
+void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd )
{
// This method no longer checks whether a corresponding attribute already
// exists at this place!
@@ -1794,10 +1790,10 @@ void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, US
DBG_ASSERT( pAttrib, "MakeCharAttrib failed!" );
pNode->GetCharAttribs().InsertAttrib( pAttrib );
- SetModified( TRUE );
+ SetModified( sal_True );
}
-void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+void EditDoc::InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem )
{
if ( nStart != nEnd )
{
@@ -1821,7 +1817,7 @@ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, cons
if ( pAttr->IsInside( nStart ) ) // split
{
// check again if really splitting, or return !
- USHORT nOldEnd = pAttr->GetEnd();
+ sal_uInt16 nOldEnd = pAttr->GetEnd();
pAttr->GetEnd() = nStart;
pAttr = MakeCharAttrib( GetItemPool(), *(pAttr->GetItem()), nStart, nOldEnd );
pNode->GetCharAttribs().InsertAttrib( pAttr );
@@ -1837,15 +1833,15 @@ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, cons
InsertAttrib( rPoolItem, pNode, nStart, nStart );
}
- SetModified( TRUE );
+ SetModified( sal_True );
}
-void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet )
+void EditDoc::FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet )
{
DBG_ASSERT( pNode, "Where to search?" );
DBG_ASSERT( nStartPos <= nEndPos, "Invalid region!" );
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
// No Selection...
if ( nStartPos == nEndPos )
@@ -1876,7 +1872,7 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos,
if ( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
rCurSet.Put( *pItem );
@@ -1926,7 +1922,7 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos,
if ( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
rCurSet.Put( *pItem );
@@ -1950,14 +1946,14 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos,
CharAttribList::CharAttribList()
{
DBG_CTOR( EE_CharAttribList, 0 );
- bHasEmptyAttribs = FALSE;
+ bHasEmptyAttribs = sal_False;
}
CharAttribList::~CharAttribList()
{
DBG_DTOR( EE_CharAttribList, 0 );
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
while ( pAttr )
{
@@ -1979,20 +1975,20 @@ void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib )
// (InsertBinTextObject!) binary search would not be optimal here.
// => Would bring something!
- const USHORT nCount = Count();
- const USHORT nStart = pAttrib->GetStart(); // may be better for Comp.Opt.
+ const sal_uInt16 nCount = Count();
+ const sal_uInt16 nStart = pAttrib->GetStart(); // may be better for Comp.Opt.
if ( pAttrib->IsEmpty() )
- bHasEmptyAttribs = TRUE;
+ bHasEmptyAttribs = sal_True;
- BOOL bInserted = FALSE;
- for ( USHORT x = 0; x < nCount; x++ )
+ sal_Bool bInserted = sal_False;
+ for ( sal_uInt16 x = 0; x < nCount; x++ )
{
EditCharAttribPtr pCurAttrib = aAttribs[x];
if ( pCurAttrib->GetStart() > nStart )
{
aAttribs.Insert( pAttrib, x );
- bInserted = TRUE;
+ bInserted = sal_True;
break;
}
}
@@ -2016,10 +2012,10 @@ void CharAttribList::ResortAttribs()
void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool )
{
- for ( USHORT n = 0; n < aAttribs.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < aAttribs.Count(); n++ )
{
EditCharAttrib* pAttr = aAttribs.GetObject( n );
- for ( USHORT nNext = n+1; nNext < aAttribs.Count(); nNext++ )
+ for ( sal_uInt16 nNext = n+1; nNext < aAttribs.Count(); nNext++ )
{
EditCharAttrib* p = aAttribs.GetObject( nNext );
if ( !pAttr->IsFeature() && ( p->GetStart() == pAttr->GetEnd() ) && ( p->Which() == pAttr->Which() ) )
@@ -2041,11 +2037,11 @@ void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool )
}
}
-EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
+EditCharAttrib* CharAttribList::FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos )
{
// Backwards, if one ends where the next starts.
// => The starting one is the valid one ...
- USHORT nAttr = aAttribs.Count()-1;
+ sal_uInt16 nAttr = aAttribs.Count()-1;
EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
while ( pAttr )
{
@@ -2056,11 +2052,11 @@ EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
return 0;
}
-EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const
+EditCharAttrib* CharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos ) const
{
DBG_ASSERT( nWhich, "FindNextAttrib: Which?" );
- const USHORT nAttribs = aAttribs.Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ const sal_uInt16 nAttribs = aAttribs.Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
EditCharAttrib* pAttr = aAttribs[ nAttr ];
if ( ( pAttr->GetStart() >= nFromPos ) && ( pAttr->Which() == nWhich ) )
@@ -2069,50 +2065,50 @@ EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos )
return 0;
}
-BOOL CharAttribList::HasAttrib( USHORT nWhich ) const
+sal_Bool CharAttribList::HasAttrib( sal_uInt16 nWhich ) const
{
- for ( USHORT nAttr = aAttribs.Count(); nAttr; )
+ for ( sal_uInt16 nAttr = aAttribs.Count(); nAttr; )
{
const EditCharAttrib* pAttr = aAttribs[--nAttr];
if ( pAttr->Which() == nWhich )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL CharAttribList::HasAttrib( USHORT nStartPos, USHORT nEndPos ) const
+sal_Bool CharAttribList::HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const
{
- BOOL bAttr = FALSE;
- for ( USHORT nAttr = aAttribs.Count(); nAttr && !bAttr; )
+ sal_Bool bAttr = sal_False;
+ for ( sal_uInt16 nAttr = aAttribs.Count(); nAttr && !bAttr; )
{
const EditCharAttrib* pAttr = aAttribs[--nAttr];
if ( ( pAttr->GetStart() < nEndPos ) && ( pAttr->GetEnd() > nStartPos ) )
- return bAttr = TRUE;
+ return bAttr = sal_True;
}
return bAttr;
}
-BOOL CharAttribList::HasBoundingAttrib( USHORT nBound )
+sal_Bool CharAttribList::HasBoundingAttrib( sal_uInt16 nBound )
{
// Backwards, if one ends where the next starts.
// => The starting one is the valid one ...
- USHORT nAttr = aAttribs.Count()-1;
+ sal_uInt16 nAttr = aAttribs.Count()-1;
EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
while ( pAttr && ( pAttr->GetEnd() >= nBound ) )
{
if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) )
- return TRUE;
+ return sal_True;
pAttr = GetAttrib( aAttribs, --nAttr );
}
- return FALSE;
+ return sal_False;
}
-EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos )
+EditCharAttrib* CharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos )
{
if ( !bHasEmptyAttribs )
return 0;
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
while ( pAttr && ( pAttr->GetStart() <= nPos ) )
{
@@ -2124,10 +2120,10 @@ EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos )
return 0;
}
-EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const
+EditCharAttrib* CharAttribList::FindFeature( sal_uInt16 nPos ) const
{
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttrib* pNextAttrib = GetAttrib( aAttribs, nAttr );
// first to the desired position ...
@@ -2150,7 +2146,7 @@ EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const
void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool )
{
- for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
{
EditCharAttrib* pAttr = aAttribs[nAttr];
if ( pAttr->IsEmpty() )
@@ -2161,30 +2157,30 @@ void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool )
nAttr--;
}
}
- bHasEmptyAttribs = FALSE;
+ bHasEmptyAttribs = sal_False;
}
-BOOL CharAttribList::DbgCheckAttribs()
+sal_Bool CharAttribList::DbgCheckAttribs()
{
#ifdef DBG_UTIL
- BOOL bOK = TRUE;
- for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
+ sal_Bool bOK = sal_True;
+ for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
{
EditCharAttrib* pAttr = aAttribs[nAttr];
if ( pAttr->GetStart() > pAttr->GetEnd() )
{
- bOK = FALSE;
+ bOK = sal_False;
OSL_FAIL( "Attribute is distorted" );
}
else if ( pAttr->IsFeature() && ( pAttr->GetLen() != 1 ) )
{
- bOK = FALSE;
+ bOK = sal_False;
OSL_FAIL( "Feature, Len != 1" );
}
}
return bOK;
#else
- return TRUE;
+ return sal_True;
#endif
}
@@ -2204,7 +2200,7 @@ SvxFontTable::~SvxFontTable()
}
}
-ULONG SvxFontTable::GetId( const SvxFontItem& rFontItem )
+sal_uLong SvxFontTable::GetId( const SvxFontItem& rFontItem )
{
SvxFontItem* pItem = First();
while ( pItem )
@@ -2256,7 +2252,7 @@ SvxColorItem* SvxColorList::GetObject( size_t nIndex )
return ( nIndex >= aColorList.size() ) ? NULL : aColorList[ nIndex ];
}
-EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts )
+EditEngineItemPool::EditEngineItemPool( sal_Bool bPersistenRefCounts )
: SfxItemPool( String( "EditEngineItemPool", RTL_TEXTENCODING_ASCII_US ), EE_ITEMS_START, EE_ITEMS_END,
aItemInfos, 0, bPersistenRefCounts )
{
@@ -2284,8 +2280,8 @@ SvStream& EditEngineItemPool::Store( SvStream& rStream ) const
// stored until then...
long nVersion = rStream.GetVersion();
- BOOL b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) )
- ? TRUE : FALSE;
+ sal_Bool b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) )
+ ? sal_True : sal_False;
EditEngineItemPool* pThis = (EditEngineItemPool*)this;
if ( b31Format )
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index d26e13f8fb..53685509a1 100644..100755
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -40,6 +40,8 @@
#include <tools/table.hxx>
#include <vector>
+#include <deque>
+
class ImpEditEngine;
class SvxTabStop;
class SvtCTLOptions;
@@ -50,45 +52,45 @@ DBG_NAMEEX( EE_TextPortion )
#define DEFTAB 720
void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent = true, short nScriptType = 0 );
-USHORT GetScriptItemId( USHORT nItemId, short nScriptType );
-BOOL IsScriptItemValid( USHORT nItemId, short nScriptType );
+sal_uInt16 GetScriptItemId( sal_uInt16 nItemId, short nScriptType );
+sal_Bool IsScriptItemValid( sal_uInt16 nItemId, short nScriptType );
-EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE );
+EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE );
class ContentNode;
class EditDoc;
struct EPaM
{
- USHORT nPara;
- USHORT nIndex;
+ sal_uInt16 nPara;
+ sal_uInt16 nIndex;
EPaM() { nPara = 0; nIndex = 0; }
- EPaM( USHORT nP, USHORT nI ) { nPara = nP; nIndex = nI; }
+ EPaM( sal_uInt16 nP, sal_uInt16 nI ) { nPara = nP; nIndex = nI; }
EPaM( const EPaM& r) { nPara = r.nPara; nIndex = r.nIndex; }
EPaM& operator = ( const EPaM& r ) { nPara = r.nPara; nIndex = r.nIndex; return *this; }
- inline BOOL operator == ( const EPaM& r ) const;
- inline BOOL operator < ( const EPaM& r ) const;
+ inline sal_Bool operator == ( const EPaM& r ) const;
+ inline sal_Bool operator < ( const EPaM& r ) const;
};
-inline BOOL EPaM::operator < ( const EPaM& r ) const
+inline sal_Bool EPaM::operator < ( const EPaM& r ) const
{
return ( ( nPara < r.nPara ) ||
- ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? TRUE : FALSE;
+ ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? sal_True : sal_False;
}
-inline BOOL EPaM::operator == ( const EPaM& r ) const
+inline sal_Bool EPaM::operator == ( const EPaM& r ) const
{
- return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? TRUE : FALSE;
+ return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? sal_True : sal_False;
}
struct ScriptTypePosInfo
{
short nScriptType;
- USHORT nStartPos;
- USHORT nEndPos;
+ sal_uInt16 nStartPos;
+ sal_uInt16 nEndPos;
- ScriptTypePosInfo( short _Type, USHORT _Start, USHORT _End )
+ ScriptTypePosInfo( short _Type, sal_uInt16 _Start, sal_uInt16 _End )
{
nScriptType = _Type;
nStartPos = _Start;
@@ -96,15 +98,15 @@ struct ScriptTypePosInfo
}
};
-SV_DECL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo, 0, 4 )
+typedef std::deque< ScriptTypePosInfo > ScriptTypePosInfos;
struct WritingDirectionInfo
{
- BYTE nType;
- USHORT nStartPos;
- USHORT nEndPos;
+ sal_uInt8 nType;
+ sal_uInt16 nStartPos;
+ sal_uInt16 nEndPos;
- WritingDirectionInfo( BYTE _Type, USHORT _Start, USHORT _End )
+ WritingDirectionInfo( sal_uInt8 _Type, sal_uInt16 _Start, sal_uInt16 _End )
{
nType = _Type;
nStartPos = _Start;
@@ -112,7 +114,8 @@ struct WritingDirectionInfo
}
};
-SV_DECL_VARARR( WritingDirectionInfos, WritingDirectionInfo, 0, 4 )
+
+typedef std::deque< WritingDirectionInfo > WritingDirectionInfos;
typedef EditCharAttrib* EditCharAttribPtr;
SV_DECL_PTRARR( CharAttribArray, EditCharAttribPtr, 0, 4 )
@@ -146,7 +149,7 @@ public:
SvxFontTable();
~SvxFontTable();
- ULONG GetId( const SvxFontItem& rFont );
+ sal_uLong GetId( const SvxFontItem& rFont );
};
// ----------------------------------------------------------------------
@@ -184,7 +187,7 @@ private:
public:
ItemList();
- const SfxPoolItem* FindAttrib( USHORT nWhich );
+ const SfxPoolItem* FindAttrib( sal_uInt16 nWhich );
const SfxPoolItem* First();
const SfxPoolItem* Next();
size_t Count() { return aItemPool.size(); };
@@ -206,13 +209,13 @@ public:
ContentAttribs( const ContentAttribs& );
~ContentAttribs(); // only for larger Tabs
- SvxTabStop FindTabStop( long nCurPos, USHORT nDefTab );
+ SvxTabStop FindTabStop( long nCurPos, sal_uInt16 nDefTab );
SfxItemSet& GetItems() { return aAttribSet; }
SfxStyleSheet* GetStyleSheet() const { return pStyle; }
void SetStyleSheet( SfxStyleSheet* pS );
- const SfxPoolItem& GetItem( USHORT nWhich );
- BOOL HasItem( USHORT nWhich );
+ const SfxPoolItem& GetItem( sal_uInt16 nWhich );
+ sal_Bool HasItem( sal_uInt16 nWhich );
};
// -------------------------------------------------------------------------
@@ -223,7 +226,7 @@ class CharAttribList
private:
CharAttribArray aAttribs;
SvxFont aDefFont; // faster than ever from the pool!
- BOOL bHasEmptyAttribs;
+ sal_Bool bHasEmptyAttribs;
CharAttribList( const CharAttribList& ) {;}
@@ -234,32 +237,32 @@ public:
void DeleteEmptyAttribs( SfxItemPool& rItemPool );
void RemoveItemsFromPool( SfxItemPool* pItemPool );
- EditCharAttrib* FindAttrib( USHORT nWhich, USHORT nPos );
- EditCharAttrib* FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const;
- EditCharAttrib* FindEmptyAttrib( USHORT nWhich, USHORT nPos );
- EditCharAttrib* FindFeature( USHORT nPos ) const;
+ EditCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
+ EditCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos ) const;
+ EditCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
+ EditCharAttrib* FindFeature( sal_uInt16 nPos ) const;
void ResortAttribs();
void OptimizeRanges( SfxItemPool& rItemPool );
- USHORT Count() { return aAttribs.Count(); }
+ sal_uInt16 Count() { return aAttribs.Count(); }
void Clear() { aAttribs.Remove( 0, aAttribs.Count()); }
void InsertAttrib( EditCharAttrib* pAttrib );
SvxFont& GetDefFont() { return aDefFont; }
- BOOL HasEmptyAttribs() const { return bHasEmptyAttribs; }
- BOOL& HasEmptyAttribs() { return bHasEmptyAttribs; }
- BOOL HasBoundingAttrib( USHORT nBound );
- BOOL HasAttrib( USHORT nWhich ) const;
- BOOL HasAttrib( USHORT nStartPos, USHORT nEndPos ) const;
+ sal_Bool HasEmptyAttribs() const { return bHasEmptyAttribs; }
+ sal_Bool& HasEmptyAttribs() { return bHasEmptyAttribs; }
+ sal_Bool HasBoundingAttrib( sal_uInt16 nBound );
+ sal_Bool HasAttrib( sal_uInt16 nWhich ) const;
+ sal_Bool HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const;
CharAttribArray& GetAttribs() { return aAttribs; }
const CharAttribArray& GetAttribs() const { return aAttribs; }
// Debug:
- BOOL DbgCheckAttribs();
+ sal_Bool DbgCheckAttribs();
};
// -------------------------------------------------------------------------
@@ -280,12 +283,12 @@ public:
ContentAttribs& GetContentAttribs() { return aContentAttribs; }
CharAttribList& GetCharAttribs() { return aCharAttribList; }
- void ExpandAttribs( USHORT nIndex, USHORT nNewChars, SfxItemPool& rItemPool );
- void CollapsAttribs( USHORT nIndex, USHORT nDelChars, SfxItemPool& rItemPool );
+ void ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNewChars, SfxItemPool& rItemPool );
+ void CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDelChars, SfxItemPool& rItemPool );
void AppendAttribs( ContentNode* pNextNode );
- void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs );
+ void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, sal_Bool bKeepEndingAttribs );
- void SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont = TRUE );
+ void SetStyleSheet( SfxStyleSheet* pS, sal_Bool bRecalcFont = sal_True );
void SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle );
SfxStyleSheet* GetStyleSheet() { return aContentAttribs.GetStyleSheet(); }
@@ -297,7 +300,7 @@ public:
void CreateWrongList();
void DestroyWrongList();
- BOOL IsFeature( USHORT nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); }
+ sal_Bool IsFeature( sal_uInt16 nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); }
};
typedef ContentNode* ContentNodePtr;
@@ -305,10 +308,10 @@ SV_DECL_PTRARR( DummyContentList, ContentNodePtr, 0, 4 )
class ContentList : public DummyContentList
{
- USHORT nLastCache;
+ sal_uInt16 nLastCache;
public:
ContentList() : DummyContentList( 0, 4 ), nLastCache(0) {}
- USHORT GetPos( const ContentNodePtr &rPtr ) const;
+ sal_uInt16 GetPos( const ContentNodePtr &rPtr ) const;
};
// -------------------------------------------------------------------------
@@ -318,27 +321,27 @@ class EditPaM
{
private:
ContentNode* pNode;
- USHORT nIndex;
+ sal_uInt16 nIndex;
public:
EditPaM() { pNode = NULL; nIndex = 0; }
- EditPaM( ContentNode* p, USHORT n ) { pNode = p; nIndex = n; }
+ EditPaM( ContentNode* p, sal_uInt16 n ) { pNode = p; nIndex = n; }
ContentNode* GetNode() const { return pNode; }
void SetNode( ContentNode* p) { pNode = p; }
- USHORT GetIndex() const { return nIndex; }
- USHORT& GetIndex() { return nIndex; }
- void SetIndex( USHORT n ) { nIndex = n; }
+ sal_uInt16 GetIndex() const { return nIndex; }
+ sal_uInt16& GetIndex() { return nIndex; }
+ void SetIndex( sal_uInt16 n ) { nIndex = n; }
- BOOL IsParaStart() const { return nIndex == 0; }
- BOOL IsParaEnd() const { return nIndex == pNode->Len(); }
+ sal_Bool IsParaStart() const { return nIndex == 0; }
+ sal_Bool IsParaEnd() const { return nIndex == pNode->Len(); }
- BOOL DbgIsBuggy( EditDoc& rDoc );
+ sal_Bool DbgIsBuggy( EditDoc& rDoc );
EditPaM& operator = ( const EditPaM& rPaM );
- friend BOOL operator == ( const EditPaM& r1, const EditPaM& r2 );
- friend BOOL operator != ( const EditPaM& r1, const EditPaM& r2 );
+ friend sal_Bool operator == ( const EditPaM& r1, const EditPaM& r2 );
+ friend sal_Bool operator != ( const EditPaM& r1, const EditPaM& r2 );
};
#define PORTIONKIND_TEXT 0
@@ -366,11 +369,11 @@ struct ExtraPortionInfo
long nPortionOffsetX;
- USHORT nMaxCompression100thPercent;
+ sal_uInt16 nMaxCompression100thPercent;
- BYTE nAsianCompressionTypes;
- BOOL bFirstCharIsRightPunktuation;
- BOOL bCompressed;
+ sal_uInt8 nAsianCompressionTypes;
+ sal_Bool bFirstCharIsRightPunktuation;
+ sal_Bool bCompressed;
sal_Int32* pOrgDXArray;
@@ -378,7 +381,7 @@ struct ExtraPortionInfo
ExtraPortionInfo();
~ExtraPortionInfo();
- void SaveOrgDXArray( const sal_Int32* pDXArray, USHORT nLen );
+ void SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen );
void DestroyOrgDXArray();
};
@@ -390,44 +393,44 @@ class TextPortion
{
private:
ExtraPortionInfo* pExtraInfos;
- USHORT nLen;
+ sal_uInt16 nLen;
Size aOutSz;
- BYTE nKind;
- BYTE nRightToLeft;
+ sal_uInt8 nKind;
+ sal_uInt8 nRightToLeft;
sal_Unicode nExtraValue;
TextPortion() { DBG_CTOR( EE_TextPortion, 0 );
- pExtraInfos = NULL; nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;}
+ pExtraInfos = NULL; nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = sal_False;}
public:
- TextPortion( USHORT nL ) : aOutSz( -1, -1 )
+ TextPortion( sal_uInt16 nL ) : aOutSz( -1, -1 )
{ DBG_CTOR( EE_TextPortion, 0 );
- pExtraInfos = NULL; nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;}
+ pExtraInfos = NULL; nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = sal_False;}
TextPortion( const TextPortion& r ) : aOutSz( r.aOutSz )
{ DBG_CTOR( EE_TextPortion, 0 );
pExtraInfos = NULL; nLen = r.nLen; nKind = r.nKind; nExtraValue = r.nExtraValue; nRightToLeft = r.nRightToLeft; }
~TextPortion() { DBG_DTOR( EE_TextPortion, 0 ); delete pExtraInfos; }
- USHORT GetLen() const { return nLen; }
- USHORT& GetLen() { return nLen; }
- void SetLen( USHORT nL ) { nLen = nL; }
+ sal_uInt16 GetLen() const { return nLen; }
+ sal_uInt16& GetLen() { return nLen; }
+ void SetLen( sal_uInt16 nL ) { nLen = nL; }
Size& GetSize() { return aOutSz; }
Size GetSize() const { return aOutSz; }
- BYTE& GetKind() { return nKind; }
- BYTE GetKind() const { return nKind; }
+ sal_uInt8& GetKind() { return nKind; }
+ sal_uInt8 GetKind() const { return nKind; }
- void SetRightToLeft( BYTE b ) { nRightToLeft = b; }
- BYTE GetRightToLeft() const { return nRightToLeft; }
- BOOL IsRightToLeft() const { return (nRightToLeft&1); }
+ void SetRightToLeft( sal_uInt8 b ) { nRightToLeft = b; }
+ sal_uInt8 GetRightToLeft() const { return nRightToLeft; }
+ sal_Bool IsRightToLeft() const { return (nRightToLeft&1); }
sal_Unicode GetExtraValue() const { return nExtraValue; }
void SetExtraValue( sal_Unicode n ) { nExtraValue = n; }
- BOOL HasValidSize() const { return aOutSz.Width() != (-1); }
+ sal_Bool HasValidSize() const { return aOutSz.Width() != (-1); }
ExtraPortionInfo* GetExtraInfos() const { return pExtraInfos; }
void SetExtraInfos( ExtraPortionInfo* p ) { delete pExtraInfos; pExtraInfos = p; }
@@ -446,9 +449,9 @@ public:
~TextPortionList();
void Reset();
- USHORT FindPortion( USHORT nCharPos, USHORT& rPortionStart, BOOL bPreferStartingPortion = FALSE );
- USHORT GetStartPos( USHORT nPortion );
- void DeleteFromPortion( USHORT nDelFrom );
+ sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False );
+ sal_uInt16 GetStartPos( sal_uInt16 nPortion );
+ void DeleteFromPortion( sal_uInt16 nDelFrom );
};
class ParaPortion;
@@ -463,84 +466,84 @@ class EditLine
private:
CharPosArray aPositions;
long nTxtWidth;
- USHORT nStartPosX;
- USHORT nStart; // could be replaced by nStartPortion
- USHORT nEnd; // could be replaced by nEndPortion
- USHORT nStartPortion;
- USHORT nEndPortion;
- USHORT nHeight; // Total height of the line
- USHORT nTxtHeight; // Pure Text height
- USHORT nCrsrHeight; // For contour flow high lines => cursor is large.
- USHORT nMaxAscent;
- BOOL bHangingPunctuation;
- BOOL bInvalid; // for skillful formatting
+ sal_uInt16 nStartPosX;
+ sal_uInt16 nStart; // could be replaced by nStartPortion
+ sal_uInt16 nEnd; // could be replaced by nEndPortion
+ sal_uInt16 nStartPortion;
+ sal_uInt16 nEndPortion;
+ sal_uInt16 nHeight; // Total height of the line
+ sal_uInt16 nTxtHeight; // Pure Text height
+ sal_uInt16 nCrsrHeight; // For contour flow high lines => cursor is large.
+ sal_uInt16 nMaxAscent;
+ sal_Bool bHangingPunctuation;
+ sal_Bool bInvalid; // for skillful formatting
public:
EditLine();
EditLine( const EditLine& );
~EditLine();
- BOOL IsIn( USHORT nIndex ) const
+ sal_Bool IsIn( sal_uInt16 nIndex ) const
{ return ( (nIndex >= nStart ) && ( nIndex < nEnd ) ); }
- BOOL IsIn( USHORT nIndex, BOOL bInclEnd ) const
+ sal_Bool IsIn( sal_uInt16 nIndex, sal_Bool bInclEnd ) const
{ return ( ( nIndex >= nStart ) && ( bInclEnd ? ( nIndex <= nEnd ) : ( nIndex < nEnd ) ) ); }
- void SetStart( USHORT n ) { nStart = n; }
- USHORT GetStart() const { return nStart; }
- USHORT& GetStart() { return nStart; }
+ void SetStart( sal_uInt16 n ) { nStart = n; }
+ sal_uInt16 GetStart() const { return nStart; }
+ sal_uInt16& GetStart() { return nStart; }
- void SetEnd( USHORT n ) { nEnd = n; }
- USHORT GetEnd() const { return nEnd; }
- USHORT& GetEnd() { return nEnd; }
+ void SetEnd( sal_uInt16 n ) { nEnd = n; }
+ sal_uInt16 GetEnd() const { return nEnd; }
+ sal_uInt16& GetEnd() { return nEnd; }
- void SetStartPortion( USHORT n ) { nStartPortion = n; }
- USHORT GetStartPortion() const { return nStartPortion; }
- USHORT& GetStartPortion() { return nStartPortion; }
+ void SetStartPortion( sal_uInt16 n ) { nStartPortion = n; }
+ sal_uInt16 GetStartPortion() const { return nStartPortion; }
+ sal_uInt16& GetStartPortion() { return nStartPortion; }
- void SetEndPortion( USHORT n ) { nEndPortion = n; }
- USHORT GetEndPortion() const { return nEndPortion; }
- USHORT& GetEndPortion() { return nEndPortion; }
+ void SetEndPortion( sal_uInt16 n ) { nEndPortion = n; }
+ sal_uInt16 GetEndPortion() const { return nEndPortion; }
+ sal_uInt16& GetEndPortion() { return nEndPortion; }
- void SetHeight( USHORT nH, USHORT nTxtH = 0, USHORT nCrsrH = 0 )
+ void SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH = 0, sal_uInt16 nCrsrH = 0 )
{ nHeight = nH;
nTxtHeight = ( nTxtH ? nTxtH : nH );
nCrsrHeight = ( nCrsrH ? nCrsrH : nTxtHeight );
}
- USHORT GetHeight() const { return nHeight; }
- USHORT GetTxtHeight() const { return nTxtHeight; }
- USHORT GetCrsrHeight() const { return nCrsrHeight; }
+ sal_uInt16 GetHeight() const { return nHeight; }
+ sal_uInt16 GetTxtHeight() const { return nTxtHeight; }
+ sal_uInt16 GetCrsrHeight() const { return nCrsrHeight; }
void SetTextWidth( long n ) { nTxtWidth = n; }
long GetTextWidth() const { return nTxtWidth; }
- void SetMaxAscent( USHORT n ) { nMaxAscent = n; }
- USHORT GetMaxAscent() const { return nMaxAscent; }
+ void SetMaxAscent( sal_uInt16 n ) { nMaxAscent = n; }
+ sal_uInt16 GetMaxAscent() const { return nMaxAscent; }
- void SetHangingPunctuation( BOOL b ) { bHangingPunctuation = b; }
- BOOL IsHangingPunctuation() const { return bHangingPunctuation; }
+ void SetHangingPunctuation( sal_Bool b ) { bHangingPunctuation = b; }
+ sal_Bool IsHangingPunctuation() const { return bHangingPunctuation; }
- USHORT GetLen() const { return nEnd - nStart; }
+ sal_uInt16 GetLen() const { return nEnd - nStart; }
- USHORT GetStartPosX() const { return nStartPosX; }
- void SetStartPosX( USHORT start ) { nStartPosX = start; }
+ sal_uInt16 GetStartPosX() const { return nStartPosX; }
+ void SetStartPosX( sal_uInt16 start ) { nStartPosX = start; }
Size CalcTextSize( ParaPortion& rParaPortion );
- BOOL IsInvalid() const { return bInvalid; }
- BOOL IsValid() const { return !bInvalid; }
- void SetInvalid() { bInvalid = TRUE; }
- void SetValid() { bInvalid = FALSE; }
+ sal_Bool IsInvalid() const { return bInvalid; }
+ sal_Bool IsValid() const { return !bInvalid; }
+ void SetInvalid() { bInvalid = sal_True; }
+ void SetValid() { bInvalid = sal_False; }
- BOOL IsEmpty() const { return (nEnd > nStart) ? FALSE : TRUE; }
+ sal_Bool IsEmpty() const { return (nEnd > nStart) ? sal_False : sal_True; }
CharPosArray& GetCharPosArray() { return aPositions; }
EditLine* Clone() const;
EditLine& operator = ( const EditLine& rLine );
- friend BOOL operator == ( const EditLine& r1, const EditLine& r2 );
- friend BOOL operator != ( const EditLine& r1, const EditLine& r2 );
+ friend sal_Bool operator == ( const EditLine& r1, const EditLine& r2 );
+ friend sal_Bool operator != ( const EditLine& r1, const EditLine& r2 );
};
@@ -557,8 +560,8 @@ public:
~EditLineList();
void Reset();
- void DeleteFromLine( USHORT nDelFrom );
- USHORT FindLine( USHORT nChar, BOOL bInclEnd );
+ void DeleteFromLine( sal_uInt16 nDelFrom );
+ sal_uInt16 FindLine( sal_uInt16 nChar, sal_Bool bInclEnd );
};
// -------------------------------------------------------------------------
@@ -576,15 +579,15 @@ private:
ScriptTypePosInfos aScriptInfos;
WritingDirectionInfos aWritingDirectionInfos;
- USHORT nInvalidPosStart;
- USHORT nFirstLineOffset; // For Writer-LineSpacing-Interpretation
- USHORT nBulletX;
- short nInvalidDiff;
+ sal_uInt16 nInvalidPosStart;
+ sal_uInt16 nFirstLineOffset; // For Writer-LineSpacing-Interpretation
+ sal_uInt16 nBulletX;
+ short nInvalidDiff;
- BOOL bInvalid : 1;
- BOOL bSimple : 1; // only linear Tap
- BOOL bVisible : 1; // Belongs to the node!
- BOOL bForceRepaint : 1;
+ sal_Bool bInvalid : 1;
+ sal_Bool bSimple : 1; // only linear Tap
+ sal_Bool bVisible : 1; // Belongs to the node!
+ sal_Bool bForceRepaint : 1;
ParaPortion( const ParaPortion& );
@@ -592,39 +595,39 @@ public:
ParaPortion( ContentNode* pNode );
~ParaPortion();
- USHORT GetLineNumber( USHORT nIndex );
+ sal_uInt16 GetLineNumber( sal_uInt16 nIndex );
EditLineList& GetLines() { return aLineList; }
- BOOL IsInvalid() const { return bInvalid; }
- BOOL IsSimpleInvalid() const { return bSimple; }
- void SetValid() { bInvalid = FALSE; bSimple = TRUE;}
+ sal_Bool IsInvalid() const { return bInvalid; }
+ sal_Bool IsSimpleInvalid() const { return bSimple; }
+ void SetValid() { bInvalid = sal_False; bSimple = sal_True;}
- BOOL MustRepaint() const { return bForceRepaint; }
- void SetMustRepaint( BOOL bRP ) { bForceRepaint = bRP; }
+ sal_Bool MustRepaint() const { return bForceRepaint; }
+ void SetMustRepaint( sal_Bool bRP ) { bForceRepaint = bRP; }
- USHORT GetBulletX() const { return nBulletX; }
- void SetBulletX( USHORT n ) { nBulletX = n; }
+ sal_uInt16 GetBulletX() const { return nBulletX; }
+ void SetBulletX( sal_uInt16 n ) { nBulletX = n; }
- void MarkInvalid( USHORT nStart, short nDiff);
- void MarkSelectionInvalid( USHORT nStart, USHORT nEnd );
+ void MarkInvalid( sal_uInt16 nStart, short nDiff);
+ void MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 nEnd );
- void SetVisible( BOOL bVisible );
- BOOL IsVisible() { return bVisible; }
+ void SetVisible( sal_Bool bVisible );
+ sal_Bool IsVisible() { return bVisible; }
long GetHeight() const { return ( bVisible ? nHeight : 0 ); }
- USHORT GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); }
+ sal_uInt16 GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); }
void ResetHeight() { nHeight = 0; nFirstLineOffset = 0; }
ContentNode* GetNode() const { return pNode; }
TextPortionList& GetTextPortions() { return aTextPortionList; }
- USHORT GetInvalidPosStart() const { return nInvalidPosStart; }
+ sal_uInt16 GetInvalidPosStart() const { return nInvalidPosStart; }
short GetInvalidDiff() const { return nInvalidDiff; }
- void CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine );
+ void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine );
- BOOL DbgCheckTextPortions();
+ sal_Bool DbgCheckTextPortions();
};
typedef ParaPortion* ParaPortionPtr;
@@ -635,19 +638,19 @@ SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0, 4 )
// -------------------------------------------------------------------------
class ParaPortionList : public DummyParaPortionList
{
- USHORT nLastCache;
+ sal_uInt16 nLastCache;
public:
ParaPortionList();
~ParaPortionList();
void Reset();
long GetYOffset( ParaPortion* pPPortion );
- USHORT FindParagraph( long nYOffset );
+ sal_uInt16 FindParagraph( long nYOffset );
- inline ParaPortion* SaveGetObject( USHORT nPos ) const
+ inline ParaPortion* SaveGetObject( sal_uInt16 nPos ) const
{ return ( nPos < Count() ) ? GetObject( nPos ) : 0; }
- USHORT GetPos( const ParaPortionPtr &rPtr ) const;
+ sal_uInt16 GetPos( const ParaPortionPtr &rPtr ) const;
// temporary:
void DbgCheck( EditDoc& rDoc );
@@ -674,17 +677,17 @@ public:
const EditPaM& Min() const { return aStartPaM; }
const EditPaM& Max() const { return aEndPaM; }
- BOOL HasRange() const { return aStartPaM != aEndPaM; }
- BOOL IsInvalid() const;
- BOOL DbgIsBuggy( EditDoc& rDoc );
+ sal_Bool HasRange() const { return aStartPaM != aEndPaM; }
+ sal_Bool IsInvalid() const;
+ sal_Bool DbgIsBuggy( EditDoc& rDoc );
- BOOL Adjust( const ContentList& rNodes );
+ sal_Bool Adjust( const ContentList& rNodes );
EditSelection& operator = ( const EditPaM& r );
- BOOL operator == ( const EditSelection& r ) const
+ sal_Bool operator == ( const EditSelection& r ) const
{ return ( ( aStartPaM == r.aStartPaM ) && ( aEndPaM == r.aEndPaM ) )
- ? TRUE : FALSE; }
- BOOL operator != ( const EditSelection& r ) const { return !( r == *this ); }
+ ? sal_True : sal_False; }
+ sal_Bool operator != ( const EditSelection& r ) const { return !( r == *this ); }
};
// -------------------------------------------------------------------------
@@ -693,16 +696,16 @@ public:
class DeletedNodeInfo
{
private:
- ULONG nInvalidAdressPtr;
- USHORT nInvalidParagraph;
+ sal_uIntPtr nInvalidAdressPtr;
+ sal_uInt16 nInvalidParagraph;
public:
- DeletedNodeInfo( ULONG nInvAdr, USHORT nPos )
+ DeletedNodeInfo( sal_uIntPtr nInvAdr, sal_uInt16 nPos )
{ nInvalidAdressPtr = nInvAdr;
nInvalidParagraph = nPos; }
- ULONG GetInvalidAdress() { return nInvalidAdressPtr; }
- USHORT GetPosition() { return nInvalidParagraph; }
+ sal_uIntPtr GetInvalidAdress() { return nInvalidAdressPtr; }
+ sal_uInt16 GetPosition() { return nInvalidParagraph; }
};
typedef DeletedNodeInfo* DeletedNodeInfoPtr;
@@ -718,12 +721,12 @@ private:
Link aModifyHdl;
SvxFont aDefFont; //faster than ever from the pool!!
- USHORT nDefTab;
- BOOL bIsVertical;
- BOOL bIsFixedCellHeight;
+ sal_uInt16 nDefTab;
+ sal_Bool bIsVertical;
+ sal_Bool bIsFixedCellHeight;
- BOOL bOwnerOfPool;
- BOOL bModified;
+ sal_Bool bOwnerOfPool;
+ sal_Bool bModified;
protected:
void ImplDestroyContents();
@@ -732,56 +735,56 @@ public:
EditDoc( SfxItemPool* pItemPool );
~EditDoc();
- BOOL IsModified() const { return bModified; }
- void SetModified( BOOL b );
+ sal_Bool IsModified() const { return bModified; }
+ void SetModified( sal_Bool b );
void SetModifyHdl( const Link& rLink ) { aModifyHdl = rLink; }
Link GetModifyHdl() const { return aModifyHdl; }
- void CreateDefFont( BOOL bUseStyles );
+ void CreateDefFont( sal_Bool bUseStyles );
const SvxFont& GetDefFont() { return aDefFont; }
- void SetDefTab( USHORT nTab ) { nDefTab = nTab ? nTab : DEFTAB; }
- USHORT GetDefTab() const { return nDefTab; }
+ void SetDefTab( sal_uInt16 nTab ) { nDefTab = nTab ? nTab : DEFTAB; }
+ sal_uInt16 GetDefTab() const { return nDefTab; }
- void SetVertical( BOOL bVertical ) { bIsVertical = bVertical; }
- BOOL IsVertical() const { return bIsVertical; }
+ void SetVertical( sal_Bool bVertical ) { bIsVertical = bVertical; }
+ sal_Bool IsVertical() const { return bIsVertical; }
- void SetFixedCellHeight( BOOL bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; }
- BOOL IsFixedCellHeight() const { return bIsFixedCellHeight; }
+ void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; }
+ sal_Bool IsFixedCellHeight() const { return bIsFixedCellHeight; }
EditPaM Clear();
EditPaM RemoveText();
- EditPaM RemoveChars( EditPaM aPaM, USHORT nChars );
+ EditPaM RemoveChars( EditPaM aPaM, sal_uInt16 nChars );
void InsertText( const EditPaM& rPaM, xub_Unicode c );
EditPaM InsertText( EditPaM aPaM, const XubString& rStr );
- EditPaM InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs );
+ EditPaM InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs );
EditPaM InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem );
EditPaM ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight );
String GetText( LineEnd eEnd ) const;
- ULONG GetTextLen() const;
+ sal_uLong GetTextLen() const;
- XubString GetParaAsString( USHORT nNode ) const;
- XubString GetParaAsString( ContentNode* pNode, USHORT nStartPos = 0, USHORT nEndPos = 0xFFFF, BOOL bResolveFields = TRUE ) const;
+ XubString GetParaAsString( sal_uInt16 nNode ) const;
+ XubString GetParaAsString( ContentNode* pNode, sal_uInt16 nStartPos = 0, sal_uInt16 nEndPos = 0xFFFF, sal_Bool bResolveFields = sal_True ) const;
inline EditPaM GetStartPaM() const;
inline EditPaM GetEndPaM() const;
SfxItemPool& GetItemPool() { return *pItemPool; }
const SfxItemPool& GetItemPool() const { return *pItemPool; }
-
+
void RemoveItemsFromPool( ContentNode* pNode );
- void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, USHORT nStart, USHORT nEnd );
- void InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem );
- void InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem );
- BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich = 0 );
- BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich = 0 );
- void FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet );
+ void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd );
+ void InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem );
+ void InsertAttribInSelection( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem );
+ sal_Bool RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich = 0 );
+ sal_Bool RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 );
+ void FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet );
- USHORT GetPos( ContentNode* pNode ) const { return ContentList::GetPos(pNode); }
- ContentNode* SaveGetObject( USHORT nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; }
+ sal_uInt16 GetPos( ContentNode* pNode ) const { return ContentList::GetPos(pNode); }
+ ContentNode* SaveGetObject( sal_uInt16 nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; }
static XubString GetSepStr( LineEnd eEnd );
};
@@ -797,12 +800,12 @@ inline EditPaM EditDoc::GetEndPaM() const
return EditPaM( pLastNode, pLastNode->Len() );
}
-inline EditCharAttrib* GetAttrib( const CharAttribArray& rAttribs, USHORT nAttr )
+inline EditCharAttrib* GetAttrib( const CharAttribArray& rAttribs, sal_uInt16 nAttr )
{
return ( nAttr < rAttribs.Count() ) ? rAttribs[nAttr] : 0;
}
-BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart );
+sal_Bool CheckOrderedList( CharAttribArray& rAttribs, sal_Bool bStart );
// -------------------------------------------------------------------------
// class EditEngineItemPool
@@ -810,7 +813,7 @@ BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart );
class EditEngineItemPool : public SfxItemPool
{
public:
- EditEngineItemPool( BOOL bPersistenRefCounts );
+ EditEngineItemPool( sal_Bool bPersistenRefCounts );
protected:
virtual ~EditEngineItemPool();
public:
diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx
index 6faed936f1..4bf4ef3809 100644..100755
--- a/editeng/source/editeng/editdoc2.cxx
+++ b/editeng/source/editeng/editdoc2.cxx
@@ -81,24 +81,24 @@ TextPortionList::~TextPortionList()
void TextPortionList::Reset()
{
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
delete GetObject( nPortion );
Remove( 0, Count() );
}
-void TextPortionList::DeleteFromPortion( USHORT nDelFrom )
+void TextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom )
{
DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" );
- for ( USHORT nP = nDelFrom; nP < Count(); nP++ )
+ for ( sal_uInt16 nP = nDelFrom; nP < Count(); nP++ )
delete GetObject( nP );
Remove( nDelFrom, Count()-nDelFrom );
}
-USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOOL bPreferStartingPortion )
+sal_uInt16 TextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion )
{
// When nCharPos at portion limit, the left portion is found
- USHORT nTmpPos = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ sal_uInt16 nTmpPos = 0;
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
TextPortion* pPortion = GetObject( nPortion );
nTmpPos = nTmpPos + pPortion->GetLen();
@@ -116,10 +116,10 @@ USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOO
return ( Count() - 1 );
}
-USHORT TextPortionList::GetStartPos( USHORT nPortion )
+sal_uInt16 TextPortionList::GetStartPos( sal_uInt16 nPortion )
{
- USHORT nPos = 0;
- for ( USHORT n = 0; n < nPortion; n++ )
+ sal_uInt16 nPos = 0;
+ for ( sal_uInt16 n = 0; n < nPortion; n++ )
{
TextPortion* pPortion = GetObject( n );
nPos = nPos + pPortion->GetLen();
@@ -135,8 +135,8 @@ ExtraPortionInfo::ExtraPortionInfo()
nMaxCompression100thPercent = 0;
nAsianCompressionTypes = 0;
nPortionOffsetX = 0;
- bFirstCharIsRightPunktuation = FALSE;
- bCompressed = FALSE;
+ bFirstCharIsRightPunktuation = sal_False;
+ bCompressed = sal_False;
pOrgDXArray = NULL;
}
@@ -145,7 +145,7 @@ ExtraPortionInfo::~ExtraPortionInfo()
delete[] pOrgDXArray;
}
-void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, USHORT nLen )
+void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen )
{
delete[] pOrgDXArray;
pOrgDXArray = new sal_Int32[nLen];
@@ -164,10 +164,10 @@ ParaPortion::ParaPortion( ContentNode* pN )
DBG_CTOR( EE_ParaPortion, 0 );
pNode = pN;
- bInvalid = TRUE;
- bVisible = TRUE;
- bSimple = FALSE;
- bForceRepaint = FALSE;
+ bInvalid = sal_True;
+ bVisible = sal_True;
+ bSimple = sal_False;
+ bForceRepaint = sal_False;
nInvalidPosStart = 0;
nInvalidDiff = 0;
nHeight = 0;
@@ -180,9 +180,9 @@ ParaPortion::~ParaPortion()
DBG_DTOR( EE_ParaPortion, 0 );
}
-void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
+void ParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff )
{
- if ( bInvalid == FALSE )
+ if ( bInvalid == sal_False )
{
// nInvalidPosEnd = nStart; // ??? => CreateLines
nInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff );
@@ -206,20 +206,19 @@ void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
{
// nInvalidPosEnd = pNode->Len();
DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" );
- nInvalidPosStart = Min( nInvalidPosStart, (USHORT) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
+ nInvalidPosStart = Min( nInvalidPosStart, (sal_uInt16) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
nInvalidDiff = 0;
- bSimple = FALSE;
+ bSimple = sal_False;
}
}
- bInvalid = TRUE;
- aScriptInfos.Remove( 0, aScriptInfos.Count() );
- aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
-// aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+ bInvalid = sal_True;
+ aScriptInfos.clear();
+ aWritingDirectionInfos.clear();
}
-void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ )
+void ParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /* nEnd */ )
{
- if ( bInvalid == FALSE )
+ if ( bInvalid == sal_False )
{
nInvalidPosStart = nStart;
// nInvalidPosEnd = nEnd;
@@ -230,19 +229,18 @@ void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ )
// nInvalidPosEnd = pNode->Len();
}
nInvalidDiff = 0;
- bInvalid = TRUE;
- bSimple = FALSE;
- aScriptInfos.Remove( 0, aScriptInfos.Count() );
- aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
-// aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+ bInvalid = sal_True;
+ bSimple = sal_False;
+ aScriptInfos.clear();
+ aWritingDirectionInfos.clear();
}
-USHORT ParaPortion::GetLineNumber( USHORT nIndex )
+sal_uInt16 ParaPortion::GetLineNumber( sal_uInt16 nIndex )
{
DBG_ASSERTWARNING( aLineList.Count(), "Empty ParaPortion in GetLine!" );
DBG_ASSERT( bVisible, "Why GetLine() on an invisible paragraph?" );
- for ( USHORT nLine = 0; nLine < aLineList.Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < aLineList.Count(); nLine++ )
{
if ( aLineList[nLine]->IsIn( nIndex ) )
return nLine;
@@ -253,14 +251,14 @@ USHORT ParaPortion::GetLineNumber( USHORT nIndex )
return (aLineList.Count()-1);
}
-void ParaPortion::SetVisible( BOOL bMakeVisible )
+void ParaPortion::SetVisible( sal_Bool bMakeVisible )
{
bVisible = bMakeVisible;
}
-void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine )
+void ParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine )
{
- USHORT nLines = aLineList.Count();
+ sal_uInt16 nLines = aLineList.Count();
DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Empty Portion?" );
if ( nLastFormattedLine < ( nLines - 1 ) )
{
@@ -278,18 +276,18 @@ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLin
int nTDiff = -( nTextDiff-1 );
if ( nPDiff || nTDiff )
{
- for ( USHORT nL = nLastFormattedLine+1; nL < nLines; nL++ )
+ for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ )
{
EditLine* pLine = aLineList[ nL ];
- pLine->GetStartPortion() = sal::static_int_cast< USHORT >(
+ pLine->GetStartPortion() = sal::static_int_cast< sal_uInt16 >(
pLine->GetStartPortion() + nPDiff);
- pLine->GetEndPortion() = sal::static_int_cast< USHORT >(
+ pLine->GetEndPortion() = sal::static_int_cast< sal_uInt16 >(
pLine->GetEndPortion() + nPDiff);
- pLine->GetStart() = sal::static_int_cast< USHORT >(
+ pLine->GetStart() = sal::static_int_cast< sal_uInt16 >(
pLine->GetStart() + nTDiff);
- pLine->GetEnd() = sal::static_int_cast< USHORT >(
+ pLine->GetEnd() = sal::static_int_cast< sal_uInt16 >(
pLine->GetEnd() + nTDiff);
pLine->SetValid();
@@ -301,21 +299,21 @@ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLin
// Shared reverse lookup acceleration pieces ...
-static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen,
- VoidPtr pPtr, USHORT &rLastPos )
+static sal_uInt16 FastGetPos( const VoidPtr *pPtrArray, sal_uInt16 nPtrArrayLen,
+ VoidPtr pPtr, sal_uInt16 &rLastPos )
{
// Through certain filter code-paths we do a lot of appends, which in
// turn call GetPos - creating some N^2 nightmares. If we have a
// non-trivially large list, do a few checks from the end first.
if( rLastPos > 16 )
{
- USHORT nEnd;
+ sal_uInt16 nEnd;
if (rLastPos > nPtrArrayLen - 2)
nEnd = nPtrArrayLen;
else
nEnd = rLastPos + 2;
- for( USHORT nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ )
+ for( sal_uInt16 nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ )
{
if( pPtrArray[ nIdx ] == pPtr )
{
@@ -325,7 +323,7 @@ static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen,
}
}
// The world's lamest linear search from svarray ...
- for( USHORT nIdx = 0; nIdx < nPtrArrayLen; nIdx++ )
+ for( sal_uInt16 nIdx = 0; nIdx < nPtrArrayLen; nIdx++ )
if (pPtrArray[ nIdx ] == pPtr )
return rLastPos = nIdx;
return USHRT_MAX;
@@ -340,14 +338,14 @@ ParaPortionList::~ParaPortionList()
Reset();
}
-USHORT ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const
+sal_uInt16 ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const
{
return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ),
Count(), static_cast<VoidPtr>( rPtr ),
((ParaPortionList *)this)->nLastCache );
}
-USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const
+sal_uInt16 ContentList::GetPos( const ContentNodePtr &rPtr ) const
{
return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ),
Count(), static_cast<VoidPtr>( rPtr ),
@@ -356,7 +354,7 @@ USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const
void ParaPortionList::Reset()
{
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
delete GetObject( nPortion );
Remove( 0, Count() );
}
@@ -364,7 +362,7 @@ void ParaPortionList::Reset()
long ParaPortionList::GetYOffset( ParaPortion* pPPortion )
{
long nHeight = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
ParaPortion* pTmpPortion = GetObject(nPortion);
if ( pTmpPortion == pPPortion )
@@ -375,10 +373,10 @@ long ParaPortionList::GetYOffset( ParaPortion* pPPortion )
return nHeight;
}
-USHORT ParaPortionList::FindParagraph( long nYOffset )
+sal_uInt16 ParaPortionList::FindParagraph( long nYOffset )
{
long nY = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
nY += GetObject(nPortion)->GetHeight(); // should also be correct even in bVisible!
if ( nY > nYOffset )
@@ -395,7 +393,7 @@ void ParaPortionList::DbgCheck( EditDoc&
{
#ifdef DBG_UTIL
DBG_ASSERT( Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() unequal!" );
- for ( USHORT i = 0; i < Count(); i++ )
+ for ( sal_uInt16 i = 0; i < Count(); i++ )
{
DBG_ASSERT( SaveGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in List!" );
DBG_ASSERT( GetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in List(2)!" );
@@ -430,8 +428,8 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit
{
DBG_ASSERT( rPoolItem.IsA( TYPE( SvxULSpaceItem ) ), "ConvertItem: Invalid Item!" );
SvxULSpaceItem& rItem = (SvxULSpaceItem&)rPoolItem;
- rItem.SetUpper( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) );
- rItem.SetLower( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) );
+ rItem.SetUpper( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) );
+ rItem.SetLower( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) );
}
break;
case EE_PARA_SBL:
@@ -440,7 +438,7 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit
SvxLineSpacingItem& rItem = (SvxLineSpacingItem&)rPoolItem;
// SetLineHeight changes also eLineSpace!
if ( rItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
- rItem.SetLineHeight( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) );
+ rItem.SetLineHeight( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) );
}
break;
case EE_PARA_TABS:
@@ -448,7 +446,7 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit
DBG_ASSERT( rPoolItem.IsA( TYPE( SvxTabStopItem ) ), "ConvertItem: Invalid Item!" );
SvxTabStopItem& rItem = (SvxTabStopItem&)rPoolItem;
SvxTabStopItem aNewItem( EE_PARA_TABS );
- for ( USHORT i = 0; i < rItem.Count(); i++ )
+ for ( sal_uInt16 i = 0; i < rItem.Count(); i++ )
{
const SvxTabStop& rTab = rItem[i];
SvxTabStop aNewStop( OutputDevice::LogicToLogic( rTab.GetTabPos(), eSourceUnit, eDestUnit ), rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() );
@@ -474,20 +472,20 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map
const SfxItemPool* pSourcePool = rSource.GetPool();
const SfxItemPool* pDestPool = rDest.GetPool();
- for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+ for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
{
// If possible go through SlotID ...
- USHORT nSourceWhich = nWhich;
- USHORT nSlot = pDestPool->GetTrueSlotId( nWhich );
+ sal_uInt16 nSourceWhich = nWhich;
+ sal_uInt16 nSlot = pDestPool->GetTrueSlotId( nWhich );
if ( nSlot )
{
- USHORT nW = pSourcePool->GetTrueWhich( nSlot );
+ sal_uInt16 nW = pSourcePool->GetTrueWhich( nSlot );
if ( nW )
nSourceWhich = nW;
}
- if ( rSource.GetItemState( nSourceWhich, FALSE ) == SFX_ITEM_ON )
+ if ( rSource.GetItemState( nSourceWhich, sal_False ) == SFX_ITEM_ON )
{
MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich );
MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich );
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 8ec92fcc8b..ef10e8bfe7 100644..100755
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -36,7 +36,7 @@
#define USE_SVXFONT
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uInt16S
#include <svl/svstdarr.hxx>
#include <svl/ctloptions.hxx>
#include <svtools/ctrltool.hxx>
@@ -113,7 +113,7 @@ SV_IMPL_VARARR( EECharAttribArray, EECharAttrib );
static SfxItemPool* pGlobalPool=0;
-// ----------------------------------------------------------------------
+ // ----------------------------------------------------------------------
// EditEngine
// ----------------------------------------------------------------------
EditEngine::EditEngine( SfxItemPool* pItemPool )
@@ -146,7 +146,7 @@ sal_Bool EditEngine::IsInUndo()
return pImpEditEngine->IsInUndo();
}
-SfxUndoManager& EditEngine::GetUndoManager()
+::svl::IUndoManager& EditEngine::GetUndoManager()
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->GetUndoManager();
@@ -168,7 +168,7 @@ void EditEngine::UndoActionEnd( sal_uInt16 nId )
pImpEditEngine->UndoActionEnd( nId );
}
-BOOL EditEngine::HasTriedMergeOnLastAddUndo() const
+sal_Bool EditEngine::HasTriedMergeOnLastAddUndo() const
{
return pImpEditEngine->mbLastTryMerge;
}
@@ -215,25 +215,25 @@ Color EditEngine::GetAutoColor() const
return pImpEditEngine->GetAutoColor();
}
-void EditEngine::EnableAutoColor( BOOL b )
+void EditEngine::EnableAutoColor( sal_Bool b )
{
DBG_CHKTHIS( EditEngine, 0 );
pImpEditEngine->EnableAutoColor( b );
}
-BOOL EditEngine::IsAutoColorEnabled() const
+sal_Bool EditEngine::IsAutoColorEnabled() const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->IsAutoColorEnabled();
}
-void EditEngine::ForceAutoColor( BOOL b )
+void EditEngine::ForceAutoColor( sal_Bool b )
{
DBG_CHKTHIS( EditEngine, 0 );
pImpEditEngine->ForceAutoColor( b );
}
-BOOL EditEngine::IsForceAutoColor() const
+sal_Bool EditEngine::IsForceAutoColor() const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->IsForceAutoColor();
@@ -318,7 +318,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P
( rOutRect.GetHeight() >= (long)GetTextHeight() ) &&
( rOutRect.GetWidth() >= (long)CalcTextWidth() ) )
{
- bClip = FALSE;
+ bClip = sal_False;
}
else
{
@@ -492,25 +492,25 @@ const Size& EditEngine::GetPaperSize() const
return pImpEditEngine->GetPaperSize();
}
-void EditEngine::SetVertical( BOOL bVertical )
+void EditEngine::SetVertical( sal_Bool bVertical )
{
DBG_CHKTHIS( EditEngine, 0 );
pImpEditEngine->SetVertical( bVertical );
}
-BOOL EditEngine::IsVertical() const
+sal_Bool EditEngine::IsVertical() const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->IsVertical();
}
-void EditEngine::SetFixedCellHeight( BOOL bUseFixedCellHeight )
+void EditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight )
{
DBG_CHKTHIS( EditEngine, 0 );
pImpEditEngine->SetFixedCellHeight( bUseFixedCellHeight );
}
-BOOL EditEngine::IsFixedCellHeight() const
+sal_Bool EditEngine::IsFixedCellHeight() const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->IsFixedCellHeight();
@@ -528,14 +528,14 @@ EEHorizontalTextDirection EditEngine::GetDefaultHorizontalTextDirection() const
return pImpEditEngine->GetDefaultHorizontalTextDirection();
}
-USHORT EditEngine::GetScriptType( const ESelection& rSelection ) const
+sal_uInt16 EditEngine::GetScriptType( const ESelection& rSelection ) const
{
DBG_CHKTHIS( EditEngine, 0 );
EditSelection aSel( pImpEditEngine->CreateSel( rSelection ) );
return pImpEditEngine->GetScriptType( aSel );
}
-LanguageType EditEngine::GetLanguage( USHORT nPara, USHORT nPos ) const
+LanguageType EditEngine::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const
{
DBG_CHKTHIS( EditEngine, 0 );
ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
@@ -550,37 +550,37 @@ void EditEngine::TransliterateText( const ESelection& rSelection, sal_Int32 nTra
pImpEditEngine->TransliterateText( pImpEditEngine->CreateSel( rSelection ), nTransliterationMode );
}
-void EditEngine::SetAsianCompressionMode( USHORT n )
+void EditEngine::SetAsianCompressionMode( sal_uInt16 n )
{
DBG_CHKTHIS( EditView, 0 );
pImpEditEngine->SetAsianCompressionMode( n );
}
-USHORT EditEngine::GetAsianCompressionMode() const
+sal_uInt16 EditEngine::GetAsianCompressionMode() const
{
DBG_CHKTHIS( EditView, 0 );
return pImpEditEngine->GetAsianCompressionMode();
}
-void EditEngine::SetKernAsianPunctuation( BOOL b )
+void EditEngine::SetKernAsianPunctuation( sal_Bool b )
{
DBG_CHKTHIS( EditView, 0 );
pImpEditEngine->SetKernAsianPunctuation( b );
}
-BOOL EditEngine::IsKernAsianPunctuation() const
+sal_Bool EditEngine::IsKernAsianPunctuation() const
{
DBG_CHKTHIS( EditView, 0 );
return pImpEditEngine->IsKernAsianPunctuation();
}
-void EditEngine::SetAddExtLeading( BOOL b )
+void EditEngine::SetAddExtLeading( sal_Bool b )
{
DBG_CHKTHIS( EditEngine, 0 );
pImpEditEngine->SetAddExtLeading( b );
}
-BOOL EditEngine::IsAddExtLeading() const
+sal_Bool EditEngine::IsAddExtLeading() const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->IsAddExtLeading();
@@ -689,7 +689,7 @@ sal_uInt16 EditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) con
return pImpEditEngine->GetLineLen( nParagraph, nLine );
}
-void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const
+void EditEngine::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const
{
DBG_CHKTHIS( EditEngine, 0 );
if ( !pImpEditEngine->IsFormatted() )
@@ -697,7 +697,7 @@ void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd,
return pImpEditEngine->GetLineBoundaries( rStart, rEnd, nParagraph, nLine );
}
-USHORT EditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 EditEngine::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
DBG_CHKTHIS( EditEngine, 0 );
if ( !pImpEditEngine->IsFormatted() )
@@ -742,7 +742,7 @@ XubString EditEngine::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex )
return pImpEditEngine->GetSelected( aSel );
}
-ESelection EditEngine::GetWord( const ESelection& rSelection, USHORT nWordType ) const
+ESelection EditEngine::GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const
{
// ImpEditEngine-Iteration-Methods should be const!
EditEngine* pE = (EditEngine*)this;
@@ -752,7 +752,7 @@ ESelection EditEngine::GetWord( const ESelection& rSelection, USHORT nWordType
return pE->pImpEditEngine->CreateESel( aSel );
}
-ESelection EditEngine::WordLeft( const ESelection& rSelection, USHORT nWordType ) const
+ESelection EditEngine::WordLeft( const ESelection& rSelection, sal_uInt16 nWordType ) const
{
// ImpEditEngine-Iteration-Methods should be const!
EditEngine* pE = (EditEngine*)this;
@@ -762,7 +762,7 @@ ESelection EditEngine::WordLeft( const ESelection& rSelection, USHORT nWordType
return pE->pImpEditEngine->CreateESel( aSel );
}
-ESelection EditEngine::WordRight( const ESelection& rSelection, USHORT nWordType ) const
+ESelection EditEngine::WordRight( const ESelection& rSelection, sal_uInt16 nWordType ) const
{
// ImpEditEngine-Iteration-Methods should be const!
EditEngine* pE = (EditEngine*)this;
@@ -772,7 +772,7 @@ ESelection EditEngine::WordRight( const ESelection& rSelection, USHORT nWordType
return pE->pImpEditEngine->CreateESel( aSel );
}
-ESelection EditEngine::CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const
+ESelection EditEngine::CursorLeft( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const
{
// ImpEditEngine-Iteration-Methods should be const!
EditEngine* pE = (EditEngine*)this;
@@ -782,7 +782,7 @@ ESelection EditEngine::CursorLeft( const ESelection& rSelection, USHORT nCharact
return pE->pImpEditEngine->CreateESel( aSel );
}
-ESelection EditEngine::CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const
+ESelection EditEngine::CursorRight( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const
{
// ImpEditEngine-Iteration-Methods should be const!
EditEngine* pE = (EditEngine*)this;
@@ -813,8 +813,8 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
sal_Bool bAllowIdle = sal_True;
sal_Bool bReadOnly = pEditView->IsReadOnly();
- USHORT nNewCursorFlags = 0;
- BOOL bSetCursorFlags = TRUE;
+ sal_uInt16 nNewCursorFlags = 0;
+ sal_Bool bSetCursorFlags = sal_True;
EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
DBG_ASSERT( !aCurSel.IsInvalid(), "Blinde Selection in EditEngine::PostKeyEvent" );
@@ -867,11 +867,11 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
{
if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() )
{
- USHORT nParas = GetParagraphCount();
+ sal_uInt16 nParas = GetParagraphCount();
Point aPos;
Point aViewStart( pEditView->GetOutputArea().TopLeft() );
long n20 = 40 * pImpEditEngine->nOnePixelInRef;
- for ( USHORT n = 0; n < nParas; n++ )
+ for ( sal_uInt16 n = 0; n < nParas; n++ )
{
long nH = GetTextHeight( n );
Point P1( aViewStart.X() + n20 + n20*(n%2), aViewStart.Y() + aPos.Y() );
@@ -884,7 +884,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
aPos.Y() += nH;
}
}
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_F11:
@@ -896,7 +896,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
aInfo += bDebugPaint ? "On" : "Off";
InfoBox( NULL, String( aInfo, RTL_TEXTENCODING_ASCII_US ) ).Execute();
}
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_F12:
@@ -905,7 +905,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
{
EditDbg::ShowEditEngineData( this );
}
- bDone = FALSE;
+ bDone = sal_False;
}
break;
#endif
@@ -937,13 +937,13 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
if ( !rKeyEvent.GetKeyCode().IsMod2() || ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) )
{
if ( pImpEditEngine->DoVisualCursorTraveling( aCurSel.Max().GetNode() ) && ( ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) /* || ( nCode == KEY_HOME ) || ( nCode == KEY_END ) */ ) )
- bSetCursorFlags = FALSE; // Will be manipulated within visual cursor move
+ bSetCursorFlags = sal_False; // Will be manipulated within visual cursor move
aCurSel = pImpEditEngine->MoveCursor( rKeyEvent, pEditView );
if ( aCurSel.HasRange() ) {
Reference<com::sun::star::datatransfer::clipboard::XClipboard> aSelection(pEditView->GetWindow()->GetPrimarySelection());
- pEditView->pImpEditView->CutCopy( aSelection, FALSE );
+ pEditView->pImpEditView->CutCopy( aSelection, sal_False );
}
bMoved = sal_True;
@@ -977,7 +977,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
// now on and that will be all. Otherwise continue as usual.
// ...
- USHORT nPara = pImpEditEngine->GetEditDoc().GetPos( pNode );
+ sal_uInt16 nPara = pImpEditEngine->GetEditDoc().GetPos( pNode );
SfxBoolItem aBulletState( (const SfxBoolItem&) pImpEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE ) );
bool bBulletIsVisible = aBulletState.GetValue() ? true : false;
@@ -997,7 +997,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
break;
}
- BYTE nDel = 0, nMode = 0;
+ sal_uInt8 nDel = 0, nMode = 0;
switch( nCode )
{
case com::sun::star::awt::Key::DELETE_WORD_BACKWARD:
@@ -1266,7 +1266,7 @@ sal_uInt32 EditEngine::GetTextHeight() const
if ( !pImpEditEngine->IsFormatted() )
pImpEditEngine->FormatDoc();
- sal_uInt32 nHeight = !IsVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( TRUE );
+ sal_uInt32 nHeight = !IsVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( sal_True );
return nHeight;
}
@@ -1277,7 +1277,7 @@ sal_uInt32 EditEngine::CalcTextWidth()
if ( !pImpEditEngine->IsFormatted() )
pImpEditEngine->FormatDoc();
- sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( TRUE ) : pImpEditEngine->GetTextHeight();
+ sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( sal_True ) : pImpEditEngine->GetTextHeight();
return nWidth;
}
@@ -1309,7 +1309,7 @@ void EditEngine::SetText( const XubString& rText )
pImpEditEngine->FormatAndUpdate();
}
-ULONG EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ )
+sal_uLong EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ )
{
DBG_CHKTHIS( EditEngine, 0 );
sal_Bool bUndoEnabled = pImpEditEngine->IsUndoEnabled();
@@ -1321,7 +1321,7 @@ ULONG EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat e
return rInput.GetError();
}
-ULONG EditEngine::Write( SvStream& rOutput, EETextFormat eFormat )
+sal_uLong EditEngine::Write( SvStream& rOutput, EETextFormat eFormat )
{
DBG_CHKTHIS( EditEngine, 0 );
EditPaM aStartPaM( pImpEditEngine->GetEditDoc().GetStartPaM() );
@@ -1630,7 +1630,7 @@ void EditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) con
pImpEditEngine->GetCharAttribs( nPara, rLst );
}
-SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib )
+SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib )
{
DBG_CHKTHIS( EditEngine, 0 );
EditSelection aSel( pImpEditEngine->
@@ -1638,7 +1638,7 @@ SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib
return pImpEditEngine->GetAttribs( aSel, bOnlyHardAttrib );
}
-SfxItemSet EditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const
+SfxItemSet EditEngine::GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->GetAttribs( nPara, nStart, nEnd, nFlags );
@@ -1857,7 +1857,7 @@ Point EditEngine::GetDocPosTopLeft( sal_uInt16 nParagraph )
return aPoint;
}
-const SvxNumberFormat* EditEngine::GetNumberFormat( USHORT nPara ) const
+const SvxNumberFormat* EditEngine::GetNumberFormat( sal_uInt16 nPara ) const
{
// derived objects may overload this function to give access to
// bullet information (see Outliner)
@@ -1865,7 +1865,7 @@ const SvxNumberFormat* EditEngine::GetNumberFormat( USHORT nPara ) const
return 0;
}
-BOOL EditEngine::IsRightToLeft( USHORT nPara ) const
+sal_Bool EditEngine::IsRightToLeft( sal_uInt16 nPara ) const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->IsRightToLeft( nPara );
@@ -2122,7 +2122,7 @@ void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTa
rtl::Reference<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const
{
DBG_CHKTHIS( EditEngine, 0 );
- return pImpEditEngine->GetForbiddenCharsTable( FALSE );
+ return pImpEditEngine->GetForbiddenCharsTable( sal_False );
}
@@ -2244,9 +2244,9 @@ sal_Bool EditEngine::ShouldCreateBigTextObject() const
return ( nTextPortions >= pImpEditEngine->GetBigTextObjectStart() ) ? sal_True : sal_False;
}
-USHORT EditEngine::GetFieldCount( USHORT nPara ) const
+sal_uInt16 EditEngine::GetFieldCount( sal_uInt16 nPara ) const
{
- USHORT nFields = 0;
+ sal_uInt16 nFields = 0;
ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
if ( pNode )
{
@@ -2262,12 +2262,12 @@ USHORT EditEngine::GetFieldCount( USHORT nPara ) const
return nFields;
}
-EFieldInfo EditEngine::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo EditEngine::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
if ( pNode )
{
- USHORT nCurrentField = 0;
+ sal_uInt16 nCurrentField = 0;
const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ )
{
@@ -2354,7 +2354,7 @@ void EditEngine::CompleteOnlineSpelling()
}
}
-USHORT EditEngine::FindParagraph( long nDocPosY )
+sal_uInt16 EditEngine::FindParagraph( long nDocPosY )
{
return pImpEditEngine->GetParaPortions().FindParagraph( nDocPosY );
}
@@ -2363,7 +2363,7 @@ EPosition EditEngine::FindDocPosition( const Point& rDocPos ) const
{
EPosition aPos;
// From the point of the API, this is const....
- EditPaM aPaM = ((EditEngine*)this)->pImpEditEngine->GetPaM( rDocPos, FALSE );
+ EditPaM aPaM = ((EditEngine*)this)->pImpEditEngine->GetPaM( rDocPos, sal_False );
if ( aPaM.GetNode() )
{
aPos.nPara = pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
@@ -2406,7 +2406,7 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara )
DBG_ASSERT( pParaPortion && pLine, "GetParagraphInfos - Paragraph out of range" );
if ( pParaPortion && pLine )
{
- aInfos.nParaHeight = (USHORT)pParaPortion->GetHeight();
+ aInfos.nParaHeight = (sal_uInt16)pParaPortion->GetHeight();
aInfos.nLines = pParaPortion->GetLines().Count();
aInfos.nFirstLineStartX = pLine->GetStartPosX();
aInfos.nFirstLineOffset = pParaPortion->GetFirstLineOffset();
@@ -2429,8 +2429,8 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara )
// =====================================================================
// ====================== Virtual Methods ========================
// =====================================================================
-void EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT,
- const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE,
+void EditEngine::DrawingText( const Point&, const XubString&, sal_uInt16, sal_uInt16,
+ const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, sal_uInt8,
const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool,
const ::com::sun::star::lang::Locale*, const Color&, const Color&)
@@ -2440,8 +2440,8 @@ void EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT,
void EditEngine::DrawingTab( const Point& /*rStartPos*/, long /*nWidth*/,
const String& /*rChar*/, const SvxFont& /*rFont*/,
- USHORT /*nPara*/, xub_StrLen /*nIndex*/,
- BYTE /*nRightToLeft*/, bool /*bEndOfLine*/,
+ sal_uInt16 /*nPara*/, xub_StrLen /*nIndex*/,
+ sal_uInt8 /*nRightToLeft*/, bool /*bEndOfLine*/,
bool /*bEndOfParagraph*/, const Color& /*rOverlineColor*/,
const Color& /*rTextLineColor*/)
{
@@ -2478,7 +2478,7 @@ void EditEngine::ParagraphDeleted( sal_uInt16 nPara )
pImpEditEngine->CallNotify( aNotify );
}
}
-void EditEngine::ParagraphConnected( USHORT /*nLeftParagraph*/, USHORT /*nRightParagraph*/ )
+void EditEngine::ParagraphConnected( sal_uInt16 /*nLeftParagraph*/, sal_uInt16 /*nRightParagraph*/ )
{
DBG_CHKTHIS( EditEngine, 0 );
}
@@ -2648,7 +2648,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
rSet.Put( SvxCharReliefItem( rFont.GetRelief(), EE_CHAR_RELIEF ) );
}
-Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType )
+Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType )
{
SvxFont aFont;
CreateFont( aFont, rItemSet, true, nScriptType );
@@ -2749,9 +2749,9 @@ void EditEngine::ImportBulletItem( SvxNumBulletItem& /*rNumBullet*/, sal_uInt16
{
}
-BOOL EditEngine::HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable )
+sal_Bool EditEngine::HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable )
{
- BOOL bValidData = FALSE;
+ sal_Bool bValidData = sal_False;
if ( rTransferable.is() )
{
@@ -2786,12 +2786,12 @@ Link EditEngine::GetEndDropHdl() const
return pImpEditEngine->GetEndDropHdl();
}
-void EditEngine::SetFirstWordCapitalization( BOOL bCapitalize )
+void EditEngine::SetFirstWordCapitalization( sal_Bool bCapitalize )
{
pImpEditEngine->SetFirstWordCapitalization( bCapitalize );
}
-BOOL EditEngine::IsFirstWordCapitalization() const
+sal_Bool EditEngine::IsFirstWordCapitalization() const
{
return pImpEditEngine->IsFirstWordCapitalization();
}
@@ -2803,7 +2803,7 @@ EFieldInfo::EFieldInfo()
}
-EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ) : aPosition( nPara, nPos )
+EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos ) : aPosition( nPara, nPos )
{
pFieldItem = new SvxFieldItem( rFieldItem );
}
diff --git a/editeng/source/editeng/editeng.src b/editeng/source/editeng/editeng.src
index 7543185f24..7543185f24 100644..100755
--- a/editeng/source/editeng/editeng.src
+++ b/editeng/source/editeng/editeng.src
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index bbd7f3c9f6..f8a0cb0a5b 100644..100755
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -59,7 +59,7 @@ DBG_NAME( XEditAttribute )
//--------------------------------------------------------------
-BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, SvxBulletItem& rBullet )
+sal_Bool lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, SvxBulletItem& rBullet )
{
const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( nLevel );
if ( pFmt )
@@ -136,11 +136,11 @@ BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, Sv
OSL_FAIL( "Unknown or invalid NumAdjust" );
}
}
- return pFmt ? TRUE : FALSE;
+ return pFmt ? sal_True : sal_False;
}
-XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd )
+XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd )
{
// Create thw new attribute in the pool
const SfxPoolItem& rNew = rPool.Put( rItem );
@@ -158,7 +158,7 @@ XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr )
nEnd = 0;
}
-XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE )
{
DBG_CTOR( XEditAttribute, 0 );
pItem = &rAttr;
@@ -172,9 +172,9 @@ XEditAttribute::~XEditAttribute()
pItem = 0; // belongs to the Pool.
}
-XEditAttribute* XEditAttributeList::FindAttrib( USHORT _nWhich, USHORT nChar ) const
+XEditAttribute* XEditAttributeList::FindAttrib( sal_uInt16 _nWhich, sal_uInt16 nChar ) const
{
- for ( USHORT n = Count(); n; )
+ for ( sal_uInt16 n = Count(); n; )
{
XEditAttribute* pAttr = GetObject( --n );
if( ( pAttr->GetItem()->Which() == _nWhich ) && ( pAttr->GetStart() <= nChar ) && ( pAttr->GetEnd() > nChar ) )
@@ -203,7 +203,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse
aStyle = rCopyFrom.GetStyle();
eFamily = rCopyFrom.GetFamily();
- for ( USHORT n = 0; n < rCopyFrom.GetAttribs().Count(); n++ )
+ for ( sal_uInt16 n = 0; n < rCopyFrom.GetAttribs().Count(); n++ )
{
XEditAttribute* pAttr = rCopyFrom.GetAttribs().GetObject( n );
XEditAttribute* pMyAttr = MakeXEditAttribute( rPoolToUse, *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() );
@@ -217,7 +217,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse
ContentInfo::~ContentInfo()
{
- for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
{
XEditAttribute* pAttr = aAttribs.GetObject(nAttr);
aParaAttribs.GetPool()->Remove( *pAttr->GetItem() );
@@ -247,10 +247,10 @@ bool ContentInfo::operator==( const ContentInfo& rCompare ) const
(eFamily == rCompare.eFamily ) &&
(aParaAttribs == rCompare.aParaAttribs ) )
{
- const USHORT nCount = aAttribs.Count();
+ const sal_uInt16 nCount = aAttribs.Count();
if( nCount == rCompare.aAttribs.Count() )
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < nCount; n++ )
{
if( !(*aAttribs.GetObject(n) == *rCompare.aAttribs.GetObject(n)) )
@@ -264,7 +264,7 @@ bool ContentInfo::operator==( const ContentInfo& rCompare ) const
return false;
}
-EditTextObject::EditTextObject( USHORT n)
+EditTextObject::EditTextObject( sal_uInt16 n)
{
DBG_CTOR( EE_EditTextObject, 0 );
nWhich = n;
@@ -281,38 +281,38 @@ EditTextObject::~EditTextObject()
DBG_DTOR( EE_EditTextObject, 0 );
}
-USHORT EditTextObject::GetParagraphCount() const
+sal_uInt16 EditTextObject::GetParagraphCount() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return 0;
}
-XubString EditTextObject::GetText( USHORT /* nParagraph */ ) const
+XubString EditTextObject::GetText( sal_uInt16 /* nParagraph */ ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return XubString();
}
-void EditTextObject::Insert( const EditTextObject& /* rObj */, USHORT /* nPara */)
+void EditTextObject::Insert( const EditTextObject& /* rObj */, sal_uInt16 /* nPara */)
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-EditTextObject* EditTextObject::CreateTextObject( USHORT /*nPara*/, USHORT /*nParas*/ ) const
+EditTextObject* EditTextObject::CreateTextObject( sal_uInt16 /*nPara*/, sal_uInt16 /*nParas*/ ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return 0;
}
-void EditTextObject::RemoveParagraph( USHORT /*nPara*/ )
+void EditTextObject::RemoveParagraph( sal_uInt16 /*nPara*/ )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-BOOL EditTextObject::HasPortionInfo() const
+sal_Bool EditTextObject::HasPortionInfo() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
void EditTextObject::ClearPortionInfo()
@@ -320,32 +320,32 @@ void EditTextObject::ClearPortionInfo()
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-BOOL EditTextObject::HasOnlineSpellErrors() const
+sal_Bool EditTextObject::HasOnlineSpellErrors() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
-BOOL EditTextObject::HasCharAttribs( USHORT ) const
+sal_Bool EditTextObject::HasCharAttribs( sal_uInt16 ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
-void EditTextObject::GetCharAttribs( USHORT /*nPara*/, EECharAttribArray& /*rLst*/ ) const
+void EditTextObject::GetCharAttribs( sal_uInt16 /*nPara*/, EECharAttribArray& /*rLst*/ ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-void EditTextObject::MergeParaAttribs( const SfxItemSet& /*rAttribs*/, USHORT /*nStart*/, USHORT /*nEnd*/ )
+void EditTextObject::MergeParaAttribs( const SfxItemSet& /*rAttribs*/, sal_uInt16 /*nStart*/, sal_uInt16 /*nEnd*/ )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-BOOL EditTextObject::IsFieldObject() const
+sal_Bool EditTextObject::IsFieldObject() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
const SvxFieldItem* EditTextObject::GetField() const
@@ -354,56 +354,56 @@ const SvxFieldItem* EditTextObject::GetField() const
return 0;
}
-BOOL EditTextObject::HasField( TypeId /*aType*/ ) const
+sal_Bool EditTextObject::HasField( TypeId /*aType*/ ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
-SfxItemSet EditTextObject::GetParaAttribs( USHORT /*nPara*/ ) const
+SfxItemSet EditTextObject::GetParaAttribs( sal_uInt16 /*nPara*/ ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return SfxItemSet( *(SfxItemPool*)NULL );
}
-void EditTextObject::SetParaAttribs( USHORT /*nPara*/, const SfxItemSet& /*rAttribs*/ )
+void EditTextObject::SetParaAttribs( sal_uInt16 /*nPara*/, const SfxItemSet& /*rAttribs*/ )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-BOOL EditTextObject::RemoveCharAttribs( USHORT /*nWhich*/ )
+sal_Bool EditTextObject::RemoveCharAttribs( sal_uInt16 /*nWhich*/ )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
-BOOL EditTextObject::RemoveParaAttribs( USHORT /*nWhich*/ )
+sal_Bool EditTextObject::RemoveParaAttribs( sal_uInt16 /*nWhich*/ )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
-BOOL EditTextObject::HasStyleSheet( const XubString& /*rName*/, SfxStyleFamily /*eFamily*/ ) const
+sal_Bool EditTextObject::HasStyleSheet( const XubString& /*rName*/, SfxStyleFamily /*eFamily*/ ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
-void EditTextObject::GetStyleSheet( USHORT /*nPara*/, XubString& /*rName*/, SfxStyleFamily& /*eFamily*/ ) const
+void EditTextObject::GetStyleSheet( sal_uInt16 /*nPara*/, XubString& /*rName*/, SfxStyleFamily& /*eFamily*/ ) const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-void EditTextObject::SetStyleSheet( USHORT /*nPara*/, const XubString& /*rName*/, const SfxStyleFamily& /*eFamily*/ )
+void EditTextObject::SetStyleSheet( sal_uInt16 /*nPara*/, const XubString& /*rName*/, const SfxStyleFamily& /*eFamily*/ )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-BOOL EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily,
+sal_Bool EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily,
const XubString&, SfxStyleFamily )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
void EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/,
@@ -412,55 +412,55 @@ void EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/,
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-USHORT EditTextObject::GetUserType() const
+sal_uInt16 EditTextObject::GetUserType() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return 0;
}
-void EditTextObject::SetUserType( USHORT )
+void EditTextObject::SetUserType( sal_uInt16 )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-ULONG EditTextObject::GetObjectSettings() const
+sal_uLong EditTextObject::GetObjectSettings() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return 0;
}
-void EditTextObject::SetObjectSettings( ULONG )
+void EditTextObject::SetObjectSettings( sal_uLong )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
}
-BOOL EditTextObject::IsVertical() const
+sal_Bool EditTextObject::IsVertical() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
- return FALSE;
+ return sal_False;
}
-void EditTextObject::SetVertical( BOOL bVertical )
+void EditTextObject::SetVertical( sal_Bool bVertical )
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
((BinTextObject*)this)->SetVertical( bVertical );
}
-USHORT EditTextObject::GetScriptType() const
+sal_uInt16 EditTextObject::GetScriptType() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return ((const BinTextObject*)this)->GetScriptType();
}
-BOOL EditTextObject::Store( SvStream& rOStream ) const
+sal_Bool EditTextObject::Store( SvStream& rOStream ) const
{
if ( rOStream.GetError() )
- return FALSE;
+ return sal_False;
sal_Size nStartPos = rOStream.Tell();
- rOStream << (USHORT)Which();
+ rOStream << (sal_uInt16)Which();
sal_uInt32 nStructSz = 0;
rOStream << nStructSz;
@@ -473,15 +473,15 @@ BOOL EditTextObject::Store( SvStream& rOStream ) const
rOStream << nStructSz;
rOStream.Seek( nEndPos );
- return rOStream.GetError() ? FALSE : TRUE;
+ return rOStream.GetError() ? sal_False : sal_True;
}
EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool )
{
- ULONG nStartPos = rIStream.Tell();
+ sal_uLong nStartPos = rIStream.Tell();
// First check what type of Object...
- USHORT nWhich;
+ sal_uInt16 nWhich;
rIStream >> nWhich;
sal_uInt32 nStructSz;
@@ -518,7 +518,7 @@ void EditTextObject::Skip( SvStream& rIStream )
{
sal_Size nStartPos = rIStream.Tell();
- USHORT _nWhich;
+ sal_uInt16 _nWhich;
rIStream >> _nWhich;
sal_uInt32 nStructSz;
@@ -538,7 +538,7 @@ void EditTextObject::CreateData( SvStream& )
OSL_FAIL( "CreateData: Base class!" );
}
-USHORT EditTextObject::GetVersion() const
+sal_uInt16 EditTextObject::GetVersion() const
{
OSL_FAIL( "Virtual method direct from EditTextObject!" );
return 0;
@@ -584,7 +584,7 @@ void BinTextObject::ObjectInDestruction(const SfxItemPool& rSfxItemPool)
// set local variables
pPool = pNewPool;
- bOwnerOfPool = TRUE;
+ bOwnerOfPool = sal_True;
}
}
@@ -625,12 +625,12 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) :
if ( pPool )
{
- bOwnerOfPool = FALSE;
+ bOwnerOfPool = sal_False;
}
else
{
pPool = EditEngine::CreatePool();
- bOwnerOfPool = TRUE;
+ bOwnerOfPool = sal_True;
}
if(!bOwnerOfPool && pPool)
@@ -639,8 +639,8 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) :
pPool->AddSfxItemPoolUser(*this);
}
- bVertical = FALSE;
- bStoreUnicodeStrings = FALSE;
+ bVertical = sal_False;
+ bStoreUnicodeStrings = sal_False;
nScriptType = 0;
}
@@ -655,7 +655,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) :
bVertical = r.bVertical;
nScriptType = r.nScriptType;
pPortionInfo = NULL; // Do not copy PortionInfo
- bStoreUnicodeStrings = FALSE;
+ bStoreUnicodeStrings = sal_False;
if ( !r.bOwnerOfPool )
{
@@ -663,12 +663,12 @@ BinTextObject::BinTextObject( const BinTextObject& r ) :
// since there is no other way to construct a BinTextObject
// than it's regular constructor where that is ensured
pPool = r.pPool;
- bOwnerOfPool = FALSE;
+ bOwnerOfPool = sal_False;
}
else
{
pPool = EditEngine::CreatePool();
- bOwnerOfPool = TRUE;
+ bOwnerOfPool = sal_True;
}
@@ -681,7 +681,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) :
if ( bOwnerOfPool && pPool && r.pPool )
pPool->SetDefaultMetric( r.pPool->GetMetric( DEF_METRIC ) );
- for ( USHORT n = 0; n < r.aContents.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < r.aContents.Count(); n++ )
{
ContentInfo* pOrg = r.aContents.GetObject( n );
DBG_ASSERT( pOrg, "NULL-Pointer in ContentList!" );
@@ -705,32 +705,32 @@ BinTextObject::~BinTextObject()
}
}
-USHORT BinTextObject::GetUserType() const
+sal_uInt16 BinTextObject::GetUserType() const
{
return nUserType;
}
-void BinTextObject::SetUserType( USHORT n )
+void BinTextObject::SetUserType( sal_uInt16 n )
{
nUserType = n;
}
-ULONG BinTextObject::GetObjectSettings() const
+sal_uLong BinTextObject::GetObjectSettings() const
{
return nObjSettings;
}
-void BinTextObject::SetObjectSettings( ULONG n )
+void BinTextObject::SetObjectSettings( sal_uLong n )
{
nObjSettings = n;
}
-BOOL BinTextObject::IsVertical() const
+sal_Bool BinTextObject::IsVertical() const
{
return bVertical;
}
-void BinTextObject::SetVertical( BOOL b )
+void BinTextObject::SetVertical( sal_Bool b )
{
if ( b != bVertical )
{
@@ -739,12 +739,12 @@ void BinTextObject::SetVertical( BOOL b )
}
}
-USHORT BinTextObject::GetScriptType() const
+sal_uInt16 BinTextObject::GetScriptType() const
{
return nScriptType;
}
-void BinTextObject::SetScriptType( USHORT nType )
+void BinTextObject::SetScriptType( sal_uInt16 nType )
{
nScriptType = nType;
}
@@ -752,7 +752,7 @@ void BinTextObject::SetScriptType( USHORT nType )
void BinTextObject::DeleteContents()
{
- for ( USHORT n = 0; n < aContents.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < aContents.Count(); n++ )
{
ContentInfo* p = aContents.GetObject( n );
DBG_ASSERT( p, "NULL-Pointer in ContentList!" );
@@ -766,7 +766,7 @@ EditTextObject* BinTextObject::Clone() const
return new BinTextObject( *this );
}
-XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd )
+XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd )
{
return MakeXEditAttribute( *pPool, rItem, nStart, nEnd );
}
@@ -784,12 +784,12 @@ ContentInfo* BinTextObject::CreateAndInsertContent()
return pC;
}
-USHORT BinTextObject::GetParagraphCount() const
+sal_uInt16 BinTextObject::GetParagraphCount() const
{
return aContents.Count();
}
-XubString BinTextObject::GetText( USHORT nPara ) const
+XubString BinTextObject::GetText( sal_uInt16 nPara ) const
{
DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Paragraph does not exist!" );
if ( nPara < aContents.Count() )
@@ -800,7 +800,7 @@ XubString BinTextObject::GetText( USHORT nPara ) const
return XubString();
}
-void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara )
+void BinTextObject::Insert( const EditTextObject& rObj, sal_uInt16 nDestPara )
{
DBG_ASSERT( rObj.Which() == EE_FORMAT_BIN, "UTO: unknown Textobjekt" );
@@ -809,8 +809,8 @@ void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara )
if ( nDestPara > aContents.Count() )
nDestPara = aContents.Count();
- const USHORT nParas = rBinObj.GetContents().Count();
- for ( USHORT nP = 0; nP < nParas; nP++ )
+ const sal_uInt16 nParas = rBinObj.GetContents().Count();
+ for ( sal_uInt16 nP = 0; nP < nParas; nP++ )
{
ContentInfo* pC = rBinObj.GetContents()[ nP ];
ContentInfo* pNew = new ContentInfo( *pC, *GetPool() );
@@ -819,7 +819,7 @@ void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara )
ClearPortionInfo();
}
-EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) const
+EditTextObject* BinTextObject::CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas ) const
{
if ( ( nPara >= aContents.Count() ) || !nParas )
return NULL;
@@ -833,8 +833,8 @@ EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) c
// If text contains different ScriptTypes, this shouldn't be a problem...
pObj->nScriptType = nScriptType;
- const USHORT nEndPara = nPara+nParas-1;
- for ( USHORT nP = nPara; nP <= nEndPara; nP++ )
+ const sal_uInt16 nEndPara = nPara+nParas-1;
+ for ( sal_uInt16 nP = nPara; nP <= nEndPara; nP++ )
{
ContentInfo* pC = aContents[ nP ];
ContentInfo* pNew = new ContentInfo( *pC, *pObj->GetPool() );
@@ -843,7 +843,7 @@ EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) c
return pObj;
}
-void BinTextObject::RemoveParagraph( USHORT nPara )
+void BinTextObject::RemoveParagraph( sal_uInt16 nPara )
{
DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Paragraph does not exist!" );
if ( nPara < aContents.Count() )
@@ -855,61 +855,61 @@ void BinTextObject::RemoveParagraph( USHORT nPara )
}
}
-BOOL BinTextObject::HasPortionInfo() const
+sal_Bool BinTextObject::HasPortionInfo() const
{
- return pPortionInfo ? TRUE : FALSE;
+ return pPortionInfo ? sal_True : sal_False;
}
void BinTextObject::ClearPortionInfo()
{
if ( pPortionInfo )
{
- for ( USHORT n = pPortionInfo->Count(); n; )
+ for ( sal_uInt16 n = pPortionInfo->Count(); n; )
delete pPortionInfo->GetObject( --n );
delete pPortionInfo;
pPortionInfo = NULL;
}
}
-BOOL BinTextObject::HasOnlineSpellErrors() const
+sal_Bool BinTextObject::HasOnlineSpellErrors() const
{
- for ( USHORT n = 0; n < aContents.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < aContents.Count(); n++ )
{
ContentInfo* p = aContents.GetObject( n );
if ( p->GetWrongList() && p->GetWrongList()->Count() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL BinTextObject::HasCharAttribs( USHORT _nWhich ) const
+sal_Bool BinTextObject::HasCharAttribs( sal_uInt16 _nWhich ) const
{
- for ( USHORT nPara = GetContents().Count(); nPara; )
+ for ( sal_uInt16 nPara = GetContents().Count(); nPara; )
{
ContentInfo* pC = GetContents().GetObject( --nPara );
- USHORT nAttribs = pC->GetAttribs().Count();
+ sal_uInt16 nAttribs = pC->GetAttribs().Count();
if ( nAttribs && !_nWhich )
- return TRUE;
+ return sal_True;
- for ( USHORT nAttr = nAttribs; nAttr; )
+ for ( sal_uInt16 nAttr = nAttribs; nAttr; )
{
XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr );
if ( pX->GetItem()->Which() == _nWhich )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-void BinTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const
+void BinTextObject::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const
{
rLst.Remove( 0, rLst.Count() );
ContentInfo* pC = GetContents().GetObject( nPara );
if ( pC )
{
- for ( USHORT nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ )
{
XEditAttribute* pAttr = pC->GetAttribs().GetObject( nAttr );
EECharAttrib aEEAttr;
@@ -922,21 +922,21 @@ void BinTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) cons
}
}
-void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd )
+void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
- for ( USHORT nPara = GetContents().Count(); nPara; )
+ for ( sal_uInt16 nPara = GetContents().Count(); nPara; )
{
ContentInfo* pC = GetContents().GetObject( --nPara );
- for ( USHORT nW = nStart; nW <= nEnd; nW++ )
+ for ( sal_uInt16 nW = nStart; nW <= nEnd; nW++ )
{
- if ( ( pC->GetParaAttribs().GetItemState( nW, FALSE ) != SFX_ITEM_ON )
- && ( rAttribs.GetItemState( nW, FALSE ) == SFX_ITEM_ON ) )
+ if ( ( pC->GetParaAttribs().GetItemState( nW, sal_False ) != SFX_ITEM_ON )
+ && ( rAttribs.GetItemState( nW, sal_False ) == SFX_ITEM_ON ) )
{
pC->GetParaAttribs().Put( rAttribs.Get( nW ) );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -945,9 +945,9 @@ void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart,
ClearPortionInfo();
}
-BOOL BinTextObject::IsFieldObject() const
+sal_Bool BinTextObject::IsFieldObject() const
{
- return BinTextObject::GetField() ? TRUE : FALSE;
+ return BinTextObject::GetField() ? sal_True : sal_False;
}
const SvxFieldItem* BinTextObject::GetField() const
@@ -957,8 +957,8 @@ const SvxFieldItem* BinTextObject::GetField() const
ContentInfo* pC = GetContents()[0];
if ( pC->GetText().Len() == 1 )
{
- USHORT nAttribs = pC->GetAttribs().Count();
- for ( USHORT nAttr = nAttribs; nAttr; )
+ sal_uInt16 nAttribs = pC->GetAttribs().Count();
+ for ( sal_uInt16 nAttr = nAttribs; nAttr; )
{
XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr );
if ( pX->GetItem()->Which() == EE_FEATURE_FIELD )
@@ -969,59 +969,59 @@ const SvxFieldItem* BinTextObject::GetField() const
return 0;
}
-BOOL BinTextObject::HasField( TypeId aType ) const
+sal_Bool BinTextObject::HasField( TypeId aType ) const
{
- USHORT nParagraphs = GetContents().Count();
- for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ sal_uInt16 nParagraphs = GetContents().Count();
+ for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
- USHORT nAttrs = pC->GetAttribs().Count();
- for ( USHORT nAttr = 0; nAttr < nAttrs; nAttr++ )
+ sal_uInt16 nAttrs = pC->GetAttribs().Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttrs; nAttr++ )
{
XEditAttribute* pAttr = pC->GetAttribs()[nAttr];
if ( pAttr->GetItem()->Which() == EE_FEATURE_FIELD )
{
if ( !aType )
- return TRUE;
+ return sal_True;
const SvxFieldData* pFldData = ((const SvxFieldItem*)pAttr->GetItem())->GetField();
if ( pFldData && pFldData->IsA( aType ) )
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
-SfxItemSet BinTextObject::GetParaAttribs( USHORT nPara ) const
+SfxItemSet BinTextObject::GetParaAttribs( sal_uInt16 nPara ) const
{
ContentInfo* pC = GetContents().GetObject( nPara );
return pC->GetParaAttribs();
}
-void BinTextObject::SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs )
+void BinTextObject::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs )
{
ContentInfo* pC = GetContents().GetObject( nPara );
pC->GetParaAttribs().Set( rAttribs );
ClearPortionInfo();
}
-BOOL BinTextObject::RemoveCharAttribs( USHORT _nWhich )
+sal_Bool BinTextObject::RemoveCharAttribs( sal_uInt16 _nWhich )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
- for ( USHORT nPara = GetContents().Count(); nPara; )
+ for ( sal_uInt16 nPara = GetContents().Count(); nPara; )
{
ContentInfo* pC = GetContents().GetObject( --nPara );
- for ( USHORT nAttr = pC->GetAttribs().Count(); nAttr; )
+ for ( sal_uInt16 nAttr = pC->GetAttribs().Count(); nAttr; )
{
XEditAttribute* pAttr = pC->GetAttribs().GetObject( --nAttr );
if ( !_nWhich || ( pAttr->GetItem()->Which() == _nWhich ) )
{
pC->GetAttribs().Remove( nAttr );
DestroyAttrib( pAttr );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -1032,18 +1032,18 @@ BOOL BinTextObject::RemoveCharAttribs( USHORT _nWhich )
return bChanged;
}
-BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich )
+sal_Bool BinTextObject::RemoveParaAttribs( sal_uInt16 _nWhich )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
- for ( USHORT nPara = GetContents().Count(); nPara; )
+ for ( sal_uInt16 nPara = GetContents().Count(); nPara; )
{
ContentInfo* pC = GetContents().GetObject( --nPara );
if ( !_nWhich )
{
if( pC->GetParaAttribs().Count() )
- bChanged = TRUE;
+ bChanged = sal_True;
pC->GetParaAttribs().ClearItem();
}
else
@@ -1051,7 +1051,7 @@ BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich )
if ( pC->GetParaAttribs().GetItemState( _nWhich ) == SFX_ITEM_ON )
{
pC->GetParaAttribs().ClearItem( _nWhich );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -1062,19 +1062,19 @@ BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich )
return bChanged;
}
-BOOL BinTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const
+sal_Bool BinTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const
{
- USHORT nParagraphs = GetContents().Count();
- for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ sal_uInt16 nParagraphs = GetContents().Count();
+ for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
if ( ( pC->GetFamily() == eFamily ) && ( pC->GetStyle() == rName ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& rFamily ) const
+void BinTextObject::GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& rFamily ) const
{
if ( nPara < aContents.Count() )
{
@@ -1084,7 +1084,7 @@ void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamil
}
}
-void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& rFamily )
+void BinTextObject::SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& rFamily )
{
if ( nPara < aContents.Count() )
{
@@ -1094,14 +1094,14 @@ void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const S
}
}
-BOOL BinTextObject::ImpChangeStyleSheets(
+sal_Bool BinTextObject::ImpChangeStyleSheets(
const XubString& rOldName, SfxStyleFamily eOldFamily,
const XubString& rNewName, SfxStyleFamily eNewFamily )
{
- const USHORT nParagraphs = GetContents().Count();
- BOOL bChanges = FALSE;
+ const sal_uInt16 nParagraphs = GetContents().Count();
+ sal_Bool bChanges = sal_False;
- for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
if ( pC->GetFamily() == eOldFamily )
@@ -1110,18 +1110,18 @@ BOOL BinTextObject::ImpChangeStyleSheets(
{
pC->GetStyle() = rNewName;
pC->GetFamily() = eNewFamily;
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
}
return bChanges;
}
-BOOL BinTextObject::ChangeStyleSheets(
+sal_Bool BinTextObject::ChangeStyleSheets(
const XubString& rOldName, SfxStyleFamily eOldFamily,
const XubString& rNewName, SfxStyleFamily eNewFamily )
{
- BOOL bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily );
+ sal_Bool bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily );
if ( bChanges )
ClearPortionInfo();
@@ -1136,7 +1136,7 @@ void BinTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily,
void BinTextObject::StoreData( SvStream& rOStream ) const
{
- USHORT nVer = 602;
+ sal_uInt16 nVer = 602;
rOStream << nVer;
rOStream << bOwnerOfPool;
@@ -1149,17 +1149,17 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
}
// Store Current text encoding ...
- rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (USHORT) rOStream.GetVersion() );
- rOStream << (USHORT) eEncoding;
+ rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (sal_uInt16) rOStream.GetVersion() );
+ rOStream << (sal_uInt16) eEncoding;
// The number of paragraphs ...
- USHORT nParagraphs = GetContents().Count();
+ sal_uInt16 nParagraphs = GetContents().Count();
rOStream << nParagraphs;
char cFeatureConverted = ByteString( CH_FEATURE, eEncoding ).GetChar(0);
// The individual paragraphs ...
- for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
@@ -1167,17 +1167,17 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
ByteString aText( pC->GetText(), eEncoding );
// Symbols?
- BOOL bSymbolPara = FALSE;
+ sal_Bool bSymbolPara = sal_False;
if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON )
{
const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
{
aText = ByteString( pC->GetText(), RTL_TEXTENCODING_SYMBOL );
- bSymbolPara = TRUE;
+ bSymbolPara = sal_True;
}
}
- for ( USHORT nA = 0; nA < pC->GetAttribs().Count(); nA++ )
+ for ( sal_uInt16 nA = 0; nA < pC->GetAttribs().Count(); nA++ )
{
XEditAttribute* pAttr = pC->GetAttribs().GetObject( nA );
@@ -1200,7 +1200,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
{
// Don't create a new Attrib with StarBats font, MBR changed the
// SvxFontItem::Store() to store StarBats instead of StarSymbol!
- for ( USHORT nChar = pAttr->GetStart(); nChar < pAttr->GetEnd(); nChar++ )
+ for ( sal_uInt16 nChar = pAttr->GetStart(); nChar < pAttr->GetEnd(); nChar++ )
{
sal_Unicode cOld = pC->GetText().GetChar( nChar );
char cConv = ByteString::ConvertFromUnicode( ConvertFontToSubsFontChar( hConv, cOld ), RTL_TEXTENCODING_SYMBOL );
@@ -1223,7 +1223,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
}
if ( hConv )
{
- for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ )
+ for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ )
{
if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) )
{
@@ -1245,19 +1245,19 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
// StyleName and Family...
rOStream.WriteByteString( ByteString( pC->GetStyle(), eEncoding ) );
- rOStream << (USHORT)pC->GetFamily();
+ rOStream << (sal_uInt16)pC->GetFamily();
// Paragraph attributes ...
pC->GetParaAttribs().Store( rOStream );
// The number of attributes ...
- USHORT nAttribs = pC->GetAttribs().Count();
+ sal_uInt16 nAttribs = pC->GetAttribs().Count();
rOStream << nAttribs;
// And the individual attributes
// Items as Surregate => always 8 bytes per Attribute
// Which = 2; Surregat = 2; Start = 2; End = 2;
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr );
@@ -1279,16 +1279,16 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
rOStream << bStoreUnicodeStrings;
if ( bStoreUnicodeStrings )
{
- for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
- USHORT nL = pC->GetText().Len();
+ sal_uInt16 nL = pC->GetText().Len();
rOStream << nL;
rOStream.Write( pC->GetText().GetBuffer(), nL*sizeof(sal_Unicode) );
// StyleSheetName must be Unicode too!
// Copy/Paste from EA3 to BETA or from BETA to EA3 not possible, not needed...
- // If needed, change nL back to ULONG and increase version...
+ // If needed, change nL back to sal_uLong and increase version...
nL = pC->GetStyle().Len();
rOStream << nL;
rOStream.Write( pC->GetStyle().GetBuffer(), nL*sizeof(sal_Unicode) );
@@ -1302,7 +1302,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
// The text object was first created with the current setting of
// pTextObjectPool.
- BOOL bOwnerOfCurrent = bOwnerOfPool;
+ sal_Bool bOwnerOfCurrent = bOwnerOfPool;
rIStream >> bOwnerOfPool;
if ( bOwnerOfCurrent && !bOwnerOfPool )
@@ -1321,17 +1321,17 @@ void BinTextObject::CreateData( SvStream& rIStream )
GetPool()->Load( rIStream );
// CharSet, in which it was saved:
- USHORT nCharSet;
+ sal_uInt16 nCharSet;
rIStream >> nCharSet;
- rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (USHORT)rIStream.GetVersion() );
+ rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (sal_uInt16)rIStream.GetVersion() );
// The number of paragraphs ...
- USHORT nParagraphs;
+ sal_uInt16 nParagraphs;
rIStream >> nParagraphs;
// The individual paragraphs ...
- for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ )
+ for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = CreateAndInsertContent();
@@ -1342,7 +1342,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
// StyleName and Family...
rIStream.ReadByteString( pC->GetStyle(), eSrcEncoding );
- USHORT nStyleFamily;
+ sal_uInt16 nStyleFamily;
rIStream >> nStyleFamily;
pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
@@ -1350,16 +1350,16 @@ void BinTextObject::CreateData( SvStream& rIStream )
pC->GetParaAttribs().Load( rIStream );
// The number of attributes ...
- USHORT nAttribs;
+ sal_uInt16 nAttribs;
rIStream >> nAttribs;
// And the individual attributes
// Items as Surregate => always 8 bytes per Attributes
// Which = 2; Surregat = 2; Start = 2; End = 2;
- USHORT nAttr;
+ sal_uInt16 nAttr;
for ( nAttr = 0; nAttr < nAttribs; nAttr++ )
{
- USHORT _nWhich, nStart, nEnd;
+ sal_uInt16 _nWhich, nStart, nEnd;
const SfxPoolItem* pItem;
rIStream >> _nWhich;
@@ -1381,8 +1381,8 @@ void BinTextObject::CreateData( SvStream& rIStream )
if ( ( _nWhich >= EE_FEATURE_START ) && ( _nWhich <= EE_FEATURE_END ) )
{
// Convert CH_FEATURE to CH_FEATURE_OLD
- DBG_ASSERT( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" );
- if ( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD )
+ DBG_ASSERT( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" );
+ if ( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD )
pC->GetText().SetChar( nStart, CH_FEATURE );
}
}
@@ -1392,14 +1392,14 @@ void BinTextObject::CreateData( SvStream& rIStream )
// But check for paragraph and character symbol attribs here,
// FinishLoad will not be called in OpenOffice Calc, no StyleSheets...
- BOOL bSymbolPara = FALSE;
+ sal_Bool bSymbolPara = sal_False;
if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON )
{
const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
{
pC->GetText() = String( aByteString, RTL_TEXTENCODING_SYMBOL );
- bSymbolPara = TRUE;
+ bSymbolPara = sal_True;
}
}
@@ -1431,7 +1431,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
pC->GetAttribs().Insert( pNewAttr, nAttr );
DestroyAttrib( pAttr );
- for ( USHORT nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ )
+ for ( sal_uInt16 nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ )
{
sal_Unicode cOld = pC->GetText().GetChar( nChar );
DBG_ASSERT( cOld >= 0xF000, "cOld not converted?!" );
@@ -1458,7 +1458,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
pC->GetParaAttribs().Put( aNewFontItem );
- for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ )
+ for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ )
{
if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) )
{
@@ -1478,7 +1478,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
// From 400 also the DefMetric:
if ( nVersion >= 400 )
{
- USHORT nTmpMetric;
+ sal_uInt16 nTmpMetric;
rIStream >> nTmpMetric;
if ( nVersion >= 401 )
{
@@ -1505,14 +1505,14 @@ void BinTextObject::CreateData( SvStream& rIStream )
{
rIStream >> nScriptType;
- BOOL bUnicodeStrings;
+ sal_Bool bUnicodeStrings;
rIStream >> bUnicodeStrings;
if ( bUnicodeStrings )
{
- for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = GetContents().GetObject( nPara );
- USHORT nL;
+ sal_uInt16 nL;
// Text
rIStream >> nL;
@@ -1520,7 +1520,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
{
pC->GetText().AllocBuffer( nL );
rIStream.Read( pC->GetText().GetBufferAccess(), nL*sizeof(sal_Unicode) );
- pC->GetText().ReleaseBufferAccess( (USHORT)nL );
+ pC->GetText().ReleaseBufferAccess( (sal_uInt16)nL );
}
// StyleSheetName
@@ -1529,7 +1529,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
{
pC->GetStyle().AllocBuffer( nL );
rIStream.Read( pC->GetStyle().GetBufferAccess(), nL*sizeof(sal_Unicode) );
- pC->GetStyle().ReleaseBufferAccess( (USHORT)nL );
+ pC->GetStyle().ReleaseBufferAccess( (sal_uInt16)nL );
}
}
}
@@ -1540,7 +1540,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
// Works only if tab positions are set, not when DefTab.
if ( nVersion < 500 )
{
- for ( USHORT n = 0; n < aContents.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < aContents.Count(); n++ )
{
ContentInfo* pC = aContents.GetObject( n );
const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( EE_PARA_LRSPACE );
@@ -1548,7 +1548,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
{
const SvxTabStopItem& rTabs = (const SvxTabStopItem&) pC->GetParaAttribs().Get( EE_PARA_TABS );
SvxTabStopItem aNewTabs( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS );
- for ( USHORT t = 0; t < rTabs.Count(); t++ )
+ for ( sal_uInt16 t = 0; t < rTabs.Count(); t++ )
{
const SvxTabStop& rT = rTabs[ t ];
aNewTabs.Insert( SvxTabStop( rT.GetTabPos() - rLRSpace.GetTxtLeft(),
@@ -1560,7 +1560,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
}
}
-USHORT BinTextObject::GetVersion() const
+sal_uInt16 BinTextObject::GetVersion() const
{
return nVersion;
}
@@ -1578,7 +1578,7 @@ bool BinTextObject::operator==( const BinTextObject& rCompare ) const
( bVertical != rCompare.bVertical ) )
return false;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aContents.Count(); n++ )
{
if( !( *aContents.GetObject( n ) == *rCompare.aContents.GetObject( n ) ) )
@@ -1596,7 +1596,7 @@ bool BinTextObject::isWrongListEqual(const BinTextObject& rCompare) const
return false;
}
- for(USHORT a(0); a < GetContents().Count(); a++)
+ for(sal_uInt16 a(0); a < GetContents().Count(); a++)
{
const ContentInfo& rCandA(*GetContents().GetObject(a));
const ContentInfo& rCandB(*rCompare.GetContents().GetObject(a));
@@ -1625,7 +1625,7 @@ void BinTextObject::CreateData300( SvStream& rIStream )
rIStream >> nParagraphs;
// The individual paragraphs...
- for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ )
+ for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ )
{
ContentInfo* pC = CreateAndInsertContent();
@@ -1634,7 +1634,7 @@ void BinTextObject::CreateData300( SvStream& rIStream )
// StyleName and Family...
rIStream.ReadByteString( pC->GetStyle() );
- USHORT nStyleFamily;
+ sal_uInt16 nStyleFamily;
rIStream >> nStyleFamily;
pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
@@ -1648,9 +1648,9 @@ void BinTextObject::CreateData300( SvStream& rIStream )
// And the individual attributes
// Items as Surregate => always 8 bytes per Attribute
// Which = 2; Surregat = 2; Start = 2; End = 2;
- for ( ULONG nAttr = 0; nAttr < nAttribs; nAttr++ )
+ for ( sal_uLong nAttr = 0; nAttr < nAttribs; nAttr++ )
{
- USHORT _nWhich, nStart, nEnd;
+ sal_uInt16 _nWhich, nStart, nEnd;
const SfxPoolItem* pItem;
rIStream >> _nWhich;
@@ -1667,11 +1667,11 @@ void BinTextObject::CreateData300( SvStream& rIStream )
}
// Check whether a font was saved
- USHORT nCharSetMarker;
+ sal_uInt16 nCharSetMarker;
rIStream >> nCharSetMarker;
if ( nCharSetMarker == CHARSETMARKER )
{
- USHORT nCharSet;
+ sal_uInt16 nCharSet;
rIStream >> nCharSet;
}
}
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index 859cbe6017..f7bb04e91b 100644..100755
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -44,8 +44,8 @@ class XEditAttribute
private:
const SfxPoolItem* pItem;
- USHORT nStart;
- USHORT nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
XEditAttribute();
XEditAttribute( const XEditAttribute& rCopyFrom );
@@ -54,19 +54,19 @@ private:
public:
XEditAttribute( const SfxPoolItem& rAttr );
- XEditAttribute( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+ XEditAttribute( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
const SfxPoolItem* GetItem() const { return pItem; }
- USHORT& GetStart() { return nStart; }
- USHORT& GetEnd() { return nEnd; }
+ sal_uInt16& GetStart() { return nStart; }
+ sal_uInt16& GetEnd() { return nEnd; }
- USHORT GetStart() const { return nStart; }
- USHORT GetEnd() const { return nEnd; }
+ sal_uInt16 GetStart() const { return nStart; }
+ sal_uInt16 GetEnd() const { return nEnd; }
- USHORT GetLen() const { return nEnd-nStart; }
+ sal_uInt16 GetLen() const { return nEnd-nStart; }
- inline BOOL IsFeature();
+ inline sal_Bool IsFeature();
inline bool operator==( const XEditAttribute& rCompare );
};
@@ -80,9 +80,9 @@ inline bool XEditAttribute::operator==( const XEditAttribute& rCompare )
(*pItem == *rCompare.pItem));
}
-inline BOOL XEditAttribute::IsFeature()
+inline sal_Bool XEditAttribute::IsFeature()
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
return ( ( nWhich >= EE_FEATURE_START ) &&
( nWhich <= EE_FEATURE_END ) );
}
@@ -93,13 +93,13 @@ SV_DECL_PTRARR( XEditAttributeListImpl, XEditAttributePtr, 0, 4 )
class XEditAttributeList : public XEditAttributeListImpl
{
public:
- XEditAttribute* FindAttrib( USHORT nWhich, USHORT nChar ) const;
+ XEditAttribute* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nChar ) const;
};
struct XParaPortion
{
long nHeight;
- USHORT nFirstLineOffset;
+ sal_uInt16 nFirstLineOffset;
EditLineList aLines;
TextPortionList aTextPortions;
@@ -110,26 +110,26 @@ SV_DECL_PTRARR( XBaseParaPortionList, XParaPortionPtr, 0, 4 )
class XParaPortionList : public XBaseParaPortionList
{
- ULONG nRefDevPtr;
+ sal_uIntPtr nRefDevPtr;
OutDevType eRefDevType;
MapMode aRefMapMode;
sal_uInt16 nStretchX;
sal_uInt16 nStretchY;
- ULONG nPaperWidth;
+ sal_uLong nPaperWidth;
public:
- XParaPortionList( OutputDevice* pRefDev, ULONG nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY ) :
+ XParaPortionList( OutputDevice* pRefDev, sal_uLong nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY ) :
aRefMapMode( pRefDev->GetMapMode() ),
nStretchX(_nStretchX),
nStretchY(_nStretchY)
{
- nRefDevPtr = (ULONG)pRefDev; nPaperWidth = nPW;
+ nRefDevPtr = (sal_uIntPtr)pRefDev; nPaperWidth = nPW;
eRefDevType = pRefDev->GetOutDevType();
}
- ULONG GetRefDevPtr() const { return nRefDevPtr; }
- ULONG GetPaperWidth() const { return nPaperWidth; }
+ sal_uIntPtr GetRefDevPtr() const { return nRefDevPtr; }
+ sal_uLong GetPaperWidth() const { return nPaperWidth; }
OutDevType GetRefDevType() const { return eRefDevType; }
const MapMode& GetRefMapMode() const { return aRefMapMode; }
sal_uInt16 GetStretchX() const { return nStretchX; }
@@ -142,10 +142,10 @@ struct LoadStoreTempInfos
ByteString aOrgString_Load;
FontToSubsFontConverter hOldSymbolConv_Store;
- BOOL bSymbolParagraph_Store;
+ sal_Bool bSymbolParagraph_Store;
- LoadStoreTempInfos() { bSymbolParagraph_Store = FALSE; hOldSymbolConv_Store = NULL; }
+ LoadStoreTempInfos() { bSymbolParagraph_Store = sal_False; hOldSymbolConv_Store = NULL; }
};
*/
@@ -198,23 +198,23 @@ class BinTextObject : public EditTextObject, public SfxItemPoolUser
private:
ContentInfoList aContents;
SfxItemPool* pPool;
- BOOL bOwnerOfPool;
+ sal_Bool bOwnerOfPool;
XParaPortionList* pPortionInfo;
sal_uInt32 nObjSettings;
- USHORT nMetric;
- USHORT nVersion;
- USHORT nUserType;
- USHORT nScriptType;
+ sal_uInt16 nMetric;
+ sal_uInt16 nVersion;
+ sal_uInt16 nUserType;
+ sal_uInt16 nScriptType;
- BOOL bVertical;
- BOOL bStoreUnicodeStrings;
+ sal_Bool bVertical;
+ sal_Bool bStoreUnicodeStrings;
protected:
void DeleteContents();
virtual void StoreData( SvStream& rOStream ) const;
virtual void CreateData( SvStream& rIStream );
- BOOL ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily,
+ sal_Bool ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily,
const String& rNewName, SfxStyleFamily eNewFamily );
public:
@@ -224,22 +224,22 @@ public:
virtual EditTextObject* Clone() const;
- USHORT GetUserType() const;
- void SetUserType( USHORT n );
+ sal_uInt16 GetUserType() const;
+ void SetUserType( sal_uInt16 n );
- ULONG GetObjectSettings() const;
- void SetObjectSettings( ULONG n );
+ sal_uLong GetObjectSettings() const;
+ void SetObjectSettings( sal_uLong n );
- BOOL IsVertical() const;
- void SetVertical( BOOL b );
+ sal_Bool IsVertical() const;
+ void SetVertical( sal_Bool b );
- USHORT GetScriptType() const;
- void SetScriptType( USHORT nType );
+ sal_uInt16 GetScriptType() const;
+ void SetScriptType( sal_uInt16 nType );
- USHORT GetVersion() const; // As long as the outliner does not store any record length
+ sal_uInt16 GetVersion() const; // As long as the outliner does not store any record length
ContentInfo* CreateAndInsertContent();
- XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd );
+ XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd );
void DestroyAttrib( XEditAttribute* pAttr );
ContentInfoList& GetContents() { return aContents; }
@@ -249,47 +249,48 @@ public:
void SetPortionInfo( XParaPortionList* pP )
{ pPortionInfo = pP; }
- virtual USHORT GetParagraphCount() const;
- virtual String GetText( USHORT nParagraph ) const;
- virtual void Insert( const EditTextObject& rObj, USHORT nPara );
- virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const;
- virtual void RemoveParagraph( USHORT nPara );
+ virtual sal_uInt16 GetParagraphCount() const;
+ virtual String GetText( sal_uInt16 nParagraph ) const;
+ virtual void Insert( const EditTextObject& rObj, sal_uInt16 nPara );
+ virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const;
+ virtual void RemoveParagraph( sal_uInt16 nPara );
- virtual BOOL HasPortionInfo() const;
+ virtual sal_Bool HasPortionInfo() const;
virtual void ClearPortionInfo();
- virtual BOOL HasOnlineSpellErrors() const;
+ virtual sal_Bool HasOnlineSpellErrors() const;
- virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const;
- virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const;
+ virtual sal_Bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const;
+ virtual void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
- virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 );
- virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 );
+ virtual sal_Bool RemoveCharAttribs( sal_uInt16 nWhich = 0 );
+ virtual sal_Bool RemoveParaAttribs( sal_uInt16 nWhich = 0 );
- virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd );
+ virtual void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd );
- virtual BOOL IsFieldObject() const;
+ virtual sal_Bool IsFieldObject() const;
virtual const SvxFieldItem* GetField() const;
- virtual BOOL HasField( TypeId Type = NULL ) const;
+ virtual sal_Bool HasField( TypeId Type = NULL ) const;
- SfxItemSet GetParaAttribs( USHORT nPara ) const;
- void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs );
+ SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const;
+ void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs );
- virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
- virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const;
- virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily );
- virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily,
+ virtual sal_Bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
+ virtual void GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const;
+ virtual void SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily );
+ virtual sal_Bool ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily,
const String& rNewName, SfxStyleFamily eNewFamily );
virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
void CreateData300( SvStream& rIStream );
- BOOL HasMetric() const { return nMetric != 0xFFFF; }
- USHORT GetMetric() const { return nMetric; }
- void SetMetric( USHORT n ) { nMetric = n; }
+ sal_Bool HasMetric() const { return nMetric != 0xFFFF; }
+ sal_uInt16 GetMetric() const { return nMetric; }
+ void SetMetric( sal_uInt16 n ) { nMetric = n; }
+
+ sal_Bool IsOwnerOfPool() const { return bOwnerOfPool; }
+ void StoreUnicodeStrings( sal_Bool b ) { bStoreUnicodeStrings = b; }
- BOOL IsOwnerOfPool() const { return bOwnerOfPool; }
- void StoreUnicodeStrings( BOOL b ) { bStoreUnicodeStrings = b; }
bool operator==( const BinTextObject& rCompare ) const;
// #i102062#
diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx
index 494e54b8ec..6da806b243 100644..100755
--- a/editeng/source/editeng/editsel.cxx
+++ b/editeng/source/editeng/editsel.cxx
@@ -54,20 +54,20 @@ void EditSelFunctionSet::DestroyAnchor()
// Only with multiple selection
}
-BOOL EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL )
+sal_Bool EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool )
{
if ( pCurView )
return pCurView->pImpEditView->SetCursorAtPoint( rPointPixel );
- return FALSE;
+ return sal_False;
}
-BOOL EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+sal_Bool EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
if ( pCurView )
return pCurView->pImpEditView->IsSelectionAtPoint( rPointPixel );
- return FALSE;
+ return sal_False;
}
void EditSelFunctionSet::DeselectAtPoint( const Point& )
@@ -95,7 +95,7 @@ void EditSelFunctionSet::DeselectAll()
EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (Window*)0 )
{
SetSelectionMode( RANGE_SELECTION );
- EnableDrag( TRUE );
+ EnableDrag( sal_True );
}
void EditSelectionEngine::SetCurView( EditView* pNewView )
diff --git a/editeng/source/editeng/editsel.hxx b/editeng/source/editeng/editsel.hxx
index 3182bc6d59..034d61cdb1 100644..100755
--- a/editeng/source/editeng/editsel.hxx
+++ b/editeng/source/editeng/editsel.hxx
@@ -46,9 +46,9 @@ public:
virtual void CreateAnchor();
virtual void DestroyAnchor();
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False );
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
diff --git a/editeng/source/editeng/editstt2.hxx b/editeng/source/editeng/editstt2.hxx
index 3bab4db1b8..a992f21534 100644..100755
--- a/editeng/source/editeng/editstt2.hxx
+++ b/editeng/source/editeng/editstt2.hxx
@@ -37,93 +37,93 @@ class InternalEditStatus : public EditStatus
public:
InternalEditStatus() { ; }
- void TurnOnFlags( ULONG nFlags )
+ void TurnOnFlags( sal_uLong nFlags )
{ nControlBits |= nFlags; }
- void TurnOffFlags( ULONG nFlags )
+ void TurnOffFlags( sal_uLong nFlags )
{ nControlBits &= ~nFlags; }
- void TurnOnStatusBits( ULONG nBits )
+ void TurnOnStatusBits( sal_uLong nBits )
{ nStatusBits |= nBits; }
- void TurnOffStatusBits( ULONG nBits )
+ void TurnOffStatusBits( sal_uLong nBits )
{ nStatusBits &= ~nBits; }
- BOOL UseCharAttribs() const
+ sal_Bool UseCharAttribs() const
{ return ( ( nControlBits & EE_CNTRL_USECHARATTRIBS ) != 0 ); }
- BOOL NotifyCursorMovements() const
+ sal_Bool NotifyCursorMovements() const
{ return ( ( nControlBits & EE_CNTRL_CRSRLEFTPARA ) != 0 ); }
- BOOL UseIdleFormatter() const
+ sal_Bool UseIdleFormatter() const
{ return ( ( nControlBits & EE_CNTRL_DOIDLEFORMAT) != 0 ); }
- BOOL AllowPasteSpecial() const
+ sal_Bool AllowPasteSpecial() const
{ return ( ( nControlBits & EE_CNTRL_PASTESPECIAL ) != 0 ); }
- BOOL DoAutoIndenting() const
+ sal_Bool DoAutoIndenting() const
{ return ( ( nControlBits & EE_CNTRL_AUTOINDENTING ) != 0 ); }
- BOOL DoUndoAttribs() const
+ sal_Bool DoUndoAttribs() const
{ return ( ( nControlBits & EE_CNTRL_UNDOATTRIBS ) != 0 ); }
- BOOL OneCharPerLine() const
+ sal_Bool OneCharPerLine() const
{ return ( ( nControlBits & EE_CNTRL_ONECHARPERLINE ) != 0 ); }
- BOOL IsOutliner() const
+ sal_Bool IsOutliner() const
{ return ( ( nControlBits & EE_CNTRL_OUTLINER ) != 0 ); }
- BOOL IsOutliner2() const
+ sal_Bool IsOutliner2() const
{ return ( ( nControlBits & EE_CNTRL_OUTLINER2 ) != 0 ); }
- BOOL IsAnyOutliner() const
+ sal_Bool IsAnyOutliner() const
{ return IsOutliner() || IsOutliner2(); }
- BOOL DoNotUseColors() const
+ sal_Bool DoNotUseColors() const
{ return ( ( nControlBits & EE_CNTRL_NOCOLORS ) != 0 ); }
- BOOL AllowBigObjects() const
+ sal_Bool AllowBigObjects() const
{ return ( ( nControlBits & EE_CNTRL_ALLOWBIGOBJS ) != 0 ); }
- BOOL DoOnlineSpelling() const
+ sal_Bool DoOnlineSpelling() const
{ return ( ( nControlBits & EE_CNTRL_ONLINESPELLING ) != 0 ); }
- BOOL DoStretch() const
+ sal_Bool DoStretch() const
{ return ( ( nControlBits & EE_CNTRL_STRETCHING ) != 0 ); }
- BOOL AutoPageSize() const
+ sal_Bool AutoPageSize() const
{ return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZE ) != 0 ); }
- BOOL AutoPageWidth() const
+ sal_Bool AutoPageWidth() const
{ return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEX ) != 0 ); }
- BOOL AutoPageHeight() const
+ sal_Bool AutoPageHeight() const
{ return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEY ) != 0 ); }
- BOOL MarkFields() const
+ sal_Bool MarkFields() const
{ return ( ( nControlBits & EE_CNTRL_MARKFIELDS ) != 0 ); }
- BOOL DoRestoreFont() const
+ sal_Bool DoRestoreFont() const
{ return ( ( nControlBits & EE_CNTRL_RESTOREFONT ) != 0 ); }
- BOOL DoImportRTFStyleSheets() const
+ sal_Bool DoImportRTFStyleSheets() const
{ return ( ( nControlBits & EE_CNTRL_RTFSTYLESHEETS ) != 0 ); }
- BOOL DoAutoCorrect() const
+ sal_Bool DoAutoCorrect() const
{ return ( ( nControlBits & EE_CNTRL_AUTOCORRECT ) != 0 ); }
- BOOL DoAutoComplete() const
+ sal_Bool DoAutoComplete() const
{ return ( ( nControlBits & EE_CNTRL_AUTOCOMPLETE ) != 0 ); }
- BOOL DoTabIndenting() const
+ sal_Bool DoTabIndenting() const
{ return ( ( nControlBits & EE_CNTRL_TABINDENTING ) != 0 ); }
- BOOL DoFormat100() const
+ sal_Bool DoFormat100() const
{ return ( ( nControlBits & EE_CNTRL_FORMAT100 ) != 0 ); }
- BOOL ULSpaceSummation() const
+ sal_Bool ULSpaceSummation() const
{ return ( ( nControlBits & EE_CNTRL_ULSPACESUMMATION ) != 0 ); }
- BOOL ULSpaceFirstParagraph() const
+ sal_Bool ULSpaceFirstParagraph() const
{ return ( ( nControlBits & EE_CNTRL_ULSPACEFIRSTPARA ) != 0 ); }
};
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index 6aeea7e547..d59bb93503 100644..100755
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -58,7 +58,7 @@ TYPEINIT1( EditUndoSetAttribs, EditUndo );
TYPEINIT1( EditUndoTransliteration, EditUndo );
TYPEINIT1( EditUndoMarkSelection, EditUndo );
-void lcl_DoSetSelection( EditView* pView, USHORT nPara )
+void lcl_DoSetSelection( EditView* pView, sal_uInt16 nPara )
{
EPaM aEPaM( nPara, 0 );
EditPaM aPaM( pView->GetImpEditEngine()->CreateEditPaM( aEPaM ) );
@@ -72,10 +72,10 @@ EditUndoManager::EditUndoManager( ImpEditEngine* p )
pImpEE = p;
}
-BOOL EditUndoManager::Undo( USHORT nCount )
+sal_Bool EditUndoManager::Undo()
{
if ( GetUndoActionCount() == 0 )
- return FALSE;
+ return sal_False;
DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" );
@@ -86,15 +86,15 @@ BOOL EditUndoManager::Undo( USHORT nCount )
else
{
OSL_FAIL("Undo in engine is not possible without a View! ");
- return FALSE;
+ return sal_False;
}
}
pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // Remove the old selection
- pImpEE->SetUndoMode( TRUE );
- BOOL bDone = SfxUndoManager::Undo( nCount );
- pImpEE->SetUndoMode( FALSE );
+ pImpEE->SetUndoMode( sal_True );
+ sal_Bool bDone = SfxUndoManager::Undo();
+ pImpEE->SetUndoMode( sal_False );
EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() );
DBG_ASSERT( !aNewSel.IsInvalid(), "Invalid selection after Undo () ");
@@ -107,10 +107,10 @@ BOOL EditUndoManager::Undo( USHORT nCount )
return bDone;
}
-BOOL EditUndoManager::Redo( USHORT nCount )
+sal_Bool EditUndoManager::Redo()
{
if ( GetRedoActionCount() == 0 )
- return FALSE;
+ return sal_False;
DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" );
@@ -121,15 +121,15 @@ BOOL EditUndoManager::Redo( USHORT nCount )
else
{
OSL_FAIL( "Redo in Engine ohne View nicht moeglich!" );
- return FALSE;
+ return sal_False;
}
}
pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // Remove the old selection
- pImpEE->SetUndoMode( TRUE );
- BOOL bDone = SfxUndoManager::Redo( nCount );
- pImpEE->SetUndoMode( FALSE );
+ pImpEE->SetUndoMode( sal_True );
+ sal_Bool bDone = SfxUndoManager::Redo();
+ pImpEE->SetUndoMode( sal_False );
EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() );
DBG_ASSERT( !aNewSel.IsInvalid(), "Invalid selection after Undo () ");
@@ -142,7 +142,7 @@ BOOL EditUndoManager::Redo( USHORT nCount )
return bDone;
}
-EditUndo::EditUndo( USHORT nI, ImpEditEngine* p )
+EditUndo::EditUndo( sal_uInt16 nI, ImpEditEngine* p )
{
DBG_CTOR( EditUndo, 0 );
nId = nI;
@@ -154,15 +154,15 @@ EditUndo::~EditUndo()
DBG_DTOR( EditUndo, 0 );
}
-USHORT EditUndo::GetId() const
+sal_uInt16 EditUndo::GetId() const
{
DBG_CHKTHIS( EditUndo, 0 );
return nId;
}
-BOOL EditUndo::CanRepeat(SfxRepeatTarget&) const
+sal_Bool EditUndo::CanRepeat(SfxRepeatTarget&) const
{
- return FALSE;
+ return sal_False;
}
XubString EditUndo::GetComment() const
@@ -176,12 +176,12 @@ XubString EditUndo::GetComment() const
return aComment;
}
-EditUndoDelContent::EditUndoDelContent( ImpEditEngine* _pImpEE, ContentNode* pNode, USHORT n )
+EditUndoDelContent::EditUndoDelContent( ImpEditEngine* _pImpEE, ContentNode* pNode, sal_uInt16 n )
: EditUndo( EDITUNDO_DELCONTENT, _pImpEE )
{
pContentNode = pNode;
nNode = n;
- bDelObject = TRUE;
+ bDelObject = sal_True;
}
EditUndoDelContent::~EditUndoDelContent()
@@ -194,7 +194,7 @@ void EditUndoDelContent::Undo()
{
DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" );
GetImpEditEngine()->InsertContent( pContentNode, nNode );
- bDelObject = FALSE; // belongs to the Engine again
+ bDelObject = sal_False; // belongs to the Engine again
EditSelection aSel( EditPaM( pContentNode, 0 ), EditPaM( pContentNode, pContentNode->Len() ) );
GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel );
}
@@ -218,7 +218,7 @@ void EditUndoDelContent::Redo()
if( _pImpEE->IsCallParaInsertedOrDeleted() )
_pImpEE->GetEditEnginePtr()->ParagraphDeleted( nNode );
- DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pContentNode, nNode );
+ DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pContentNode, nNode );
_pImpEE->aDeletedNodes.Insert( pInf, _pImpEE->aDeletedNodes.Count() );
_pImpEE->UpdateSelections();
@@ -228,14 +228,14 @@ void EditUndoDelContent::Redo()
DBG_ASSERT( pN && ( pN != pContentNode ), "?! RemoveContent !? " );
EditPaM aPaM( pN, pN->Len() );
- bDelObject = TRUE; // belongs to the Engine again
+ bDelObject = sal_True; // belongs to the Engine again
_pImpEE->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
}
-EditUndoConnectParas::EditUndoConnectParas( ImpEditEngine* _pImpEE, USHORT nN, USHORT nSP,
+EditUndoConnectParas::EditUndoConnectParas( ImpEditEngine* _pImpEE, sal_uInt16 nN, sal_uInt16 nSP,
const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs,
- const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBkwrd )
+ const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, sal_Bool bBkwrd )
: EditUndo( EDITUNDO_CONNECTPARAS, _pImpEE ),
aLeftParaAttribs( rLeftParaAttribs ),
aRightParaAttribs( rRightParaAttribs )
@@ -268,8 +268,8 @@ void EditUndoConnectParas::Undo()
// For SplitContent ParagraphInserted can not be called yet because the
// Outliner relies on the attributes to initialize the depth
- BOOL bCall = GetImpEditEngine()->IsCallParaInsertedOrDeleted();
- GetImpEditEngine()->SetCallParaInsertedOrDeleted( FALSE );
+ sal_Bool bCall = GetImpEditEngine()->IsCallParaInsertedOrDeleted();
+ GetImpEditEngine()->SetCallParaInsertedOrDeleted( sal_False );
EditPaM aPaM = GetImpEditEngine()->SplitContent( nNode, nSepPos );
GetImpEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs );
@@ -282,7 +282,7 @@ void EditUndoConnectParas::Undo()
if ( GetImpEditEngine()->GetStyleSheetPool() )
{
if ( aLeftStyleName.Len() )
- GetImpEditEngine()->SetStyleSheet( (USHORT)nNode, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) );
+ GetImpEditEngine()->SetStyleSheet( (sal_uInt16)nNode, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) );
if ( aRightStyleName.Len() )
GetImpEditEngine()->SetStyleSheet( nNode+1, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aRightStyleName, eRightStyleFamily ) );
}
@@ -298,7 +298,7 @@ void EditUndoConnectParas::Redo()
GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
}
-EditUndoSplitPara::EditUndoSplitPara( ImpEditEngine* _pImpEE, USHORT nN, USHORT nSP )
+EditUndoSplitPara::EditUndoSplitPara( ImpEditEngine* _pImpEE, sal_uInt16 nN, sal_uInt16 nSP )
: EditUndo( EDITUNDO_SPLITPARA, _pImpEE )
{
nNode = nN;
@@ -312,7 +312,7 @@ EditUndoSplitPara::~EditUndoSplitPara()
void EditUndoSplitPara::Undo()
{
DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" );
- EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, FALSE );
+ EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, sal_False );
GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
}
@@ -349,22 +349,22 @@ void EditUndoInsertChars::Redo()
GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aNewPaM ) );
}
-BOOL EditUndoInsertChars::Merge( SfxUndoAction* pNextAction )
+sal_Bool EditUndoInsertChars::Merge( SfxUndoAction* pNextAction )
{
if ( !pNextAction->ISA( EditUndoInsertChars ) )
- return FALSE;
+ return sal_False;
EditUndoInsertChars* pNext = (EditUndoInsertChars*)pNextAction;
if ( aEPaM.nPara != pNext->aEPaM.nPara )
- return FALSE;
+ return sal_False;
if ( ( aEPaM.nIndex + aText.Len() ) == pNext->aEPaM.nIndex )
{
aText += pNext->aText;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
EditUndoRemoveChars::EditUndoRemoveChars( ImpEditEngine* _pImpEE, const EPaM& rEPaM, const XubString& rStr )
@@ -430,7 +430,7 @@ void EditUndoInsertFeature::Redo()
}
EditUndoMoveParagraphs::EditUndoMoveParagraphs
- ( ImpEditEngine* _pImpEE, const Range& rParas, USHORT n )
+ ( ImpEditEngine* _pImpEE, const Range& rParas, sal_uInt16 n )
: EditUndo( EDITUNDO_MOVEPARAGRAPHS, _pImpEE ),
nParagraphs( rParas )
{
@@ -460,7 +460,7 @@ void EditUndoMoveParagraphs::Undo()
else
nTmpDest += aTmpRange.Len();
- EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( aTmpRange, (USHORT)nTmpDest, 0 ) );
+ EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( aTmpRange, (sal_uInt16)nTmpDest, 0 ) );
GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
}
@@ -471,7 +471,7 @@ void EditUndoMoveParagraphs::Redo()
GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
}
-EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* _pImpEE, USHORT nP,
+EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* _pImpEE, sal_uInt16 nP,
const XubString& rPrevName, SfxStyleFamily ePrevFam,
const XubString& rNewName, SfxStyleFamily eNewFam,
const SfxItemSet& rPrevParaAttribs )
@@ -502,7 +502,7 @@ void EditUndoSetStyleSheet::Redo()
lcl_DoSetSelection( GetImpEditEngine()->GetActiveView(), nPara );
}
-EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* _pImpEE, USHORT nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems )
+EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* _pImpEE, sal_uInt16 nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems )
: EditUndo( EDITUNDO_PARAATTRIBS, _pImpEE ),
aPrevItems( rPrevItems ),
aNewItems(rNewItems )
@@ -536,8 +536,8 @@ EditUndoSetAttribs::EditUndoSetAttribs( ImpEditEngine* _pImpEE, const ESelection
// When EditUndoSetAttribs actually is a RemoveAttribs this could be
// /recognize by the empty itemset, but then it would have to be caught in
// its own place, which possible a setAttribs does with an empty itemset.
- bSetIsRemove = FALSE;
- bRemoveParaAttribs = FALSE;
+ bSetIsRemove = sal_False;
+ bRemoveParaAttribs = sal_False;
nRemoveWhich = 0;
nSpecial = 0;
}
@@ -546,12 +546,12 @@ EditUndoSetAttribs::~EditUndoSetAttribs()
{
// Get Items from Pool...
SfxItemPool* pPool = aNewAttribs.GetPool();
- USHORT nContents = aPrevAttribs.Count();
- for ( USHORT n = 0; n < nContents; n++ )
+ sal_uInt16 nContents = aPrevAttribs.Count();
+ for ( sal_uInt16 n = 0; n < nContents; n++ )
{
ContentAttribsInfo* pInf = aPrevAttribs[n];
DBG_ASSERT( pInf, "Undo_DTOR (SetAttribs): pInf = NULL!" );
- for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
{
EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr];
DBG_ASSERT( pX, "Undo_DTOR (SetAttribs): pX = NULL!" );
@@ -566,10 +566,10 @@ void EditUndoSetAttribs::Undo()
{
DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" );
ImpEditEngine* _pImpEE = GetImpEditEngine();
- BOOL bFields = FALSE;
- for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ )
+ sal_Bool bFields = sal_False;
+ for ( sal_uInt16 nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ )
{
- ContentAttribsInfo* pInf = aPrevAttribs[ (USHORT)(nPara-aESel.nStartPara) ];
+ ContentAttribsInfo* pInf = aPrevAttribs[ (sal_uInt16)(nPara-aESel.nStartPara) ];
DBG_ASSERT( pInf, "Undo (SetAttribs): pInf = NULL!" );
// first the paragraph attributes ...
@@ -577,17 +577,17 @@ void EditUndoSetAttribs::Undo()
// Then the character attributes ...
// Remove all attributes including features, are later re-established.
- _pImpEE->RemoveCharAttribs( nPara, 0, TRUE );
+ _pImpEE->RemoveCharAttribs( nPara, 0, sal_True );
DBG_ASSERT( _pImpEE->GetEditDoc().SaveGetObject( nPara ), "Undo (SetAttribs): pNode = NULL!" );
ContentNode* pNode = _pImpEE->GetEditDoc().GetObject( nPara );
- for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
{
EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr];
DBG_ASSERT( pX, "Redo (SetAttribs): pX = NULL!" );
// is automatically "poolsized"
_pImpEE->GetEditDoc().InsertAttrib( pNode, pX->GetStart(), pX->GetEnd(), *pX->GetItem() );
if ( pX->Which() == EE_FEATURE_FIELD )
- bFields = TRUE;
+ bFields = sal_True;
}
}
if ( bFields )
diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx
index 9c78f22fbe..b884136635 100644..100755
--- a/editeng/source/editeng/editundo.hxx
+++ b/editeng/source/editeng/editundo.hxx
@@ -48,14 +48,14 @@ class EditView;
class EditUndoDelContent : public EditUndo
{
private:
- BOOL bDelObject;
- USHORT nNode;
+ sal_Bool bDelObject;
+ sal_uInt16 nNode;
ContentNode* pContentNode; // Points to the valid,
// undestroyed object!
public:
TYPEINFO();
- EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, USHORT nPortio );
+ EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, sal_uInt16 nPortio );
~EditUndoDelContent();
virtual void Undo();
@@ -68,8 +68,8 @@ public:
class EditUndoConnectParas : public EditUndo
{
private:
- USHORT nNode;
- USHORT nSepPos;
+ sal_uInt16 nNode;
+ sal_uInt16 nSepPos;
SfxItemSet aLeftParaAttribs;
SfxItemSet aRightParaAttribs;
@@ -79,13 +79,13 @@ private:
SfxStyleFamily eLeftStyleFamily;
SfxStyleFamily eRightStyleFamily;
- BOOL bBackward;
+ sal_Bool bBackward;
public:
TYPEINFO();
- EditUndoConnectParas( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos,
+ EditUndoConnectParas( ImpEditEngine* pImpEE, sal_uInt16 nNode, sal_uInt16 nSepPos,
const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs,
- const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBackward );
+ const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, sal_Bool bBackward );
~EditUndoConnectParas();
virtual void Undo();
@@ -98,12 +98,12 @@ public:
class EditUndoSplitPara : public EditUndo
{
private:
- USHORT nNode;
- USHORT nSepPos;
+ sal_uInt16 nNode;
+ sal_uInt16 nSepPos;
public:
TYPEINFO();
- EditUndoSplitPara( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos );
+ EditUndoSplitPara( ImpEditEngine* pImpEE, sal_uInt16 nNode, sal_uInt16 nSepPos );
~EditUndoSplitPara();
virtual void Undo();
@@ -129,7 +129,7 @@ public:
virtual void Undo();
virtual void Redo();
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
};
// -----------------------------------------------------------------------
@@ -178,11 +178,11 @@ class EditUndoMoveParagraphs: public EditUndo
{
private:
Range nParagraphs;
- USHORT nDest;
+ sal_uInt16 nDest;
public:
TYPEINFO();
- EditUndoMoveParagraphs( ImpEditEngine* pImpEE, const Range& rParas, USHORT nDest );
+ EditUndoMoveParagraphs( ImpEditEngine* pImpEE, const Range& rParas, sal_uInt16 nDest );
~EditUndoMoveParagraphs();
virtual void Undo();
@@ -195,7 +195,7 @@ public:
class EditUndoSetStyleSheet: public EditUndo
{
private:
- USHORT nPara;
+ sal_uInt16 nPara;
XubString aPrevName;
XubString aNewName;
SfxStyleFamily ePrevFamily;
@@ -205,7 +205,7 @@ private:
public:
TYPEINFO();
- EditUndoSetStyleSheet( ImpEditEngine* pImpEE, USHORT nPara,
+ EditUndoSetStyleSheet( ImpEditEngine* pImpEE, sal_uInt16 nPara,
const XubString& rPrevName, SfxStyleFamily ePrevFamily,
const XubString& rNewName, SfxStyleFamily eNewFamily,
const SfxItemSet& rPrevParaAttribs );
@@ -221,13 +221,13 @@ public:
class EditUndoSetParaAttribs: public EditUndo
{
private:
- USHORT nPara;
+ sal_uInt16 nPara;
SfxItemSet aPrevItems;
SfxItemSet aNewItems;
public:
TYPEINFO();
- EditUndoSetParaAttribs( ImpEditEngine* pImpEE, USHORT nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems );
+ EditUndoSetParaAttribs( ImpEditEngine* pImpEE, sal_uInt16 nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems );
~EditUndoSetParaAttribs();
virtual void Undo();
@@ -244,10 +244,10 @@ private:
SfxItemSet aNewAttribs;
ContentInfoArray aPrevAttribs;
- BYTE nSpecial;
- BOOL bSetIsRemove;
- BOOL bRemoveParaAttribs;
- USHORT nRemoveWhich;
+ sal_uInt8 nSpecial;
+ sal_Bool bSetIsRemove;
+ sal_Bool bRemoveParaAttribs;
+ sal_uInt16 nRemoveWhich;
void ImpSetSelection( EditView* pView );
@@ -260,10 +260,10 @@ public:
ContentInfoArray& GetContentInfos() { return aPrevAttribs; }
SfxItemSet& GetNewAttribs() { return aNewAttribs; }
- void SetSpecial( BYTE n ) { nSpecial = n; }
- void SetRemoveAttribs( BOOL b ) { bSetIsRemove = b; }
- void SetRemoveParaAttribs( BOOL b ) { bRemoveParaAttribs = b; }
- void SetRemoveWhich( USHORT n ) { nRemoveWhich = n; }
+ void SetSpecial( sal_uInt8 n ) { nSpecial = n; }
+ void SetRemoveAttribs( sal_Bool b ) { bSetIsRemove = b; }
+ void SetRemoveParaAttribs( sal_Bool b ) { bRemoveParaAttribs = b; }
+ void SetRemoveWhich( sal_uInt16 n ) { nRemoveWhich = n; }
virtual void Undo();
virtual void Redo();
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 99a5c04b14..eb586a4a74 100644..100755
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -46,7 +46,7 @@
#include <svl/srchitem.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uIt16S
#include <svl/svstdarr.hxx>
#include <impedit.hxx>
@@ -150,10 +150,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 ) &&
@@ -297,7 +297,7 @@ void EditView::DeleteSelected()
pImpEditView->DeleteSelected();
}
-USHORT EditView::GetSelectedScriptType() const
+sal_uInt16 EditView::GetSelectedScriptType() const
{
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
@@ -478,7 +478,7 @@ void EditView::HideCursor()
pImpEditView->GetCursor()->Hide();
}
-Pair EditView::Scroll( long ndX, long ndY, BYTE nRangeCheck )
+Pair EditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck )
{
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
@@ -578,7 +578,7 @@ void EditView::Redo()
PIMPEE->Redo( this );
}
-ULONG EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs )
+sal_uLong EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs )
{
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
@@ -601,7 +601,7 @@ ULONG EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFo
return rInput.GetError();
}
-ULONG EditView::Write( SvStream& rOutput, EETextFormat eFormat )
+sal_uLong EditView::Write( SvStream& rOutput, EETextFormat eFormat )
{
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
@@ -733,7 +733,7 @@ void EditView::MoveParagraphs( long nDiff )
nDest++;
DBG_ASSERT( ( nDest >= 0 ) && ( nDest <= pImpEditView->pEditEngine->GetParagraphCount() ), "MoveParagraphs - wrong Parameters!" );
MoveParagraphs( aRange,
- sal::static_int_cast< USHORT >( nDest ) );
+ sal::static_int_cast< sal_uInt16 >( nDest ) );
}
void EditView::SetBackgroundColor( const Color& rColor )
@@ -784,7 +784,7 @@ void EditView::InsertText( const EditTextObject& rTextObject )
PIMPEE->FormatAndUpdate( this );
}
-void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial )
+void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial )
{
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
@@ -801,7 +801,7 @@ void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::d
sal_Bool EditView::Drop( const DropEvent& )
{
- return FALSE;
+ return sal_False;
}
ESelection EditView::GetDropPos()
@@ -812,7 +812,7 @@ ESelection EditView::GetDropPos()
sal_Bool EditView::QueryDrop( DropEvent& )
{
- return FALSE;
+ return sal_False;
}
void EditView::SetEditEngineUpdateMode( sal_Bool bUpdate )
@@ -955,7 +955,7 @@ EESpellState EditView::StartThesaurus()
void EditView::StartTextConversion(
LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont,
- INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc )
+ sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc )
{
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
@@ -1049,7 +1049,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
Sequence< PropertyValue > aPropVals(1);
PropertyValue &rVal = aPropVals.getArray()[0];
rVal.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_MAX_NUMBER_OF_SUGGESTIONS ));
- rVal.Value <<= (INT16) 7;
+ rVal.Value <<= (sal_Int16) 7;
//
// Are there any replace suggestions?
Reference< XSpellAlternatives > xSpellAlt =
@@ -1109,7 +1109,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
if (xSpellAlt.is())
aAlt = xSpellAlt->getAlternatives();
const OUString *pAlt = aAlt.getConstArray();
- sal_uInt16 nWords = (USHORT) aAlt.getLength();
+ sal_uInt16 nWords = (sal_uInt16) aAlt.getLength();
if ( nWords )
{
for ( sal_uInt16 nW = 0; nW < nWords; nW++ )
@@ -1136,11 +1136,11 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
uno::Reference< linguistic2::XDictionary > xDic( SvxGetOrCreatePosDic( xDicList ) );
if (xDic.is())
xDic->setActive( sal_True );
-
+
aDics = xDicList->getDictionaries();
pDic = aDics.getConstArray();
sal_uInt16 nCheckedLanguage = PIMPEE->GetLanguage( aPaM2 );
- sal_uInt16 nDicCount = (USHORT)aDics.getLength();
+ sal_uInt16 nDicCount = (sal_uInt16)aDics.getLength();
for (sal_uInt16 i = 0; i < nDicCount; i++)
{
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
@@ -1156,7 +1156,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
{
// the extra 1 is because of the (possible) external
// linguistic entry above
- USHORT nPos = MN_DICTSTART + i;
+ sal_uInt16 nPos = MN_DICTSTART + i;
pInsertMenu->InsertItem( nPos, xDicTmp->getName() );
uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
@@ -1462,7 +1462,7 @@ void EditView::ChangeFontSize( bool bGrow, const FontList* pFontList )
if( aSel.HasRange() )
{
- for( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ for( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
SvUShorts aPortions;
rEditEngine.GetPortions( nPara, aPortions );
@@ -1470,13 +1470,13 @@ void EditView::ChangeFontSize( bool bGrow, const FontList* pFontList )
if( aPortions.Count() == 0 )
aPortions.Insert( rEditEngine.GetTextLen(nPara), 0 );
- const USHORT nBeginPos = (nPara == aSel.nStartPara) ? aSel.nStartPos : 0;
- const USHORT nEndPos = (nPara == aSel.nEndPara) ? aSel.nEndPos : 0xffff;
+ const sal_uInt16 nBeginPos = (nPara == aSel.nStartPara) ? aSel.nStartPos : 0;
+ const sal_uInt16 nEndPos = (nPara == aSel.nEndPara) ? aSel.nEndPos : 0xffff;
- for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos )
{
- USHORT nPortionEnd = aPortions.GetObject( nPos );
- USHORT nPortionStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0;
+ sal_uInt16 nPortionEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nPortionStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0;
if( (nPortionEnd < nBeginPos) || (nPortionStart > nEndPos) )
continue;
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 54ddb4ca4c..67cfaad9e4 100644..100755
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -221,7 +221,7 @@ WrongList::~WrongList()
{
}
-void WrongList::MarkInvalid( USHORT nS, USHORT nE )
+void WrongList::MarkInvalid( sal_uInt16 nS, sal_uInt16 nE )
{
if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) )
nInvalidStart = nS;
@@ -496,7 +496,7 @@ bool WrongList::operator==(const WrongList& rCompare) const
return false;
}
- for(USHORT a(0); a < Count(); a++)
+ for(sal_uInt16 a(0); a < Count(); a++)
{
const WrongRange& rCandA(GetObject(a));
const WrongRange& rCandB(rCompare.GetObject(a));
@@ -647,8 +647,8 @@ sal_Bool EdtAutoCorrDoc::SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd,
sal_Bool EdtAutoCorrDoc::HasSymbolChars( sal_uInt16 nStt, sal_uInt16 nEnd )
{
- USHORT nScriptType = pImpEE->GetScriptType( EditPaM( pCurNode, nStt ) );
- USHORT nScriptFontInfoItemId = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType );
+ sal_uInt16 nScriptType = pImpEE->GetScriptType( EditPaM( pCurNode, nStt ) );
+ sal_uInt16 nScriptFontInfoItemId = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType );
CharAttribArray& rAttribs = pCurNode->GetCharAttribs().GetAttribs();
sal_uInt16 nAttrs = rAttribs.Count();
diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx
index 207a34efc9..bba15ef230 100644..100755
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -53,13 +53,13 @@ private:
protected:
virtual void SpellStart( SvxSpellArea eArea );
- virtual BOOL SpellContinue(); // Check area
- virtual void ReplaceAll( const String &rNewText, INT16 nLanguage );
+ virtual sal_Bool SpellContinue(); // Check area
+ virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage );
virtual void SpellEnd();
- virtual BOOL SpellMore();
- virtual BOOL HasOtherCnt();
+ virtual sal_Bool SpellMore();
+ virtual sal_Bool HasOtherCnt();
virtual void ScrollArea();
- virtual void ChangeWord( const String& rNewWord, const USHORT nLang );
+ virtual void ChangeWord( const String& rNewWord, const sal_uInt16 nLang );
virtual void ChangeThesWord( const String& rNewWord );
virtual void AutoCorrect( const String& rOldWord, const String& rNewWord );
@@ -67,18 +67,18 @@ public:
EditSpellWrapper( Window* pWin,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > &xChecker,
- BOOL bIsStart,
- BOOL bIsAllRight, EditView* pView );
+ sal_Bool bIsStart,
+ sal_Bool bIsAllRight, EditView* pView );
};
struct WrongRange
{
- USHORT nStart;
- USHORT nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
- WrongRange( USHORT nS, USHORT nE ) { nStart = nS; nEnd = nE; }
+ WrongRange( sal_uInt16 nS, sal_uInt16 nE ) { nStart = nS; nEnd = nE; }
};
SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 )
@@ -87,41 +87,41 @@ SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 )
class WrongList : private WrongRanges
{
private:
- USHORT nInvalidStart;
- USHORT nInvalidEnd;
+ sal_uInt16 nInvalidStart;
+ sal_uInt16 nInvalidEnd;
- BOOL DbgIsBuggy() const;
+ sal_Bool DbgIsBuggy() const;
public:
WrongList();
~WrongList();
- BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; }
+ sal_Bool IsInvalid() const { return nInvalidStart != NOT_INVALID; }
void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; }
- void MarkInvalid( USHORT nS, USHORT nE );
+ void MarkInvalid( sal_uInt16 nS, sal_uInt16 nE );
- USHORT Count() const { return WrongRanges::Count(); }
+ sal_uInt16 Count() const { return WrongRanges::Count(); }
- // When one knos what to do:
- WrongRange& GetObject( USHORT n ) const { return WrongRanges::GetObject( n ); }
- void InsertWrong( const WrongRange& rWrong, USHORT nPos );
+ // When one knows what to do:
+ WrongRange& GetObject( sal_uInt16 n ) const { return WrongRanges::GetObject( n ); }
+ void InsertWrong( const WrongRange& rWrong, sal_uInt16 nPos );
- USHORT GetInvalidStart() const { return nInvalidStart; }
- USHORT& GetInvalidStart() { return nInvalidStart; }
+ sal_uInt16 GetInvalidStart() const { return nInvalidStart; }
+ sal_uInt16& GetInvalidStart() { return nInvalidStart; }
- USHORT GetInvalidEnd() const { return nInvalidEnd; }
- USHORT& GetInvalidEnd() { return nInvalidEnd; }
+ sal_uInt16 GetInvalidEnd() const { return nInvalidEnd; }
+ sal_uInt16& GetInvalidEnd() { return nInvalidEnd; }
- void TextInserted( USHORT nPos, USHORT nChars, BOOL bPosIsSep );
- void TextDeleted( USHORT nPos, USHORT nChars );
+ void TextInserted( sal_uInt16 nPos, sal_uInt16 nChars, sal_Bool bPosIsSep );
+ void TextDeleted( sal_uInt16 nPos, sal_uInt16 nChars );
void ResetRanges() { Remove( 0, Count() ); }
- BOOL HasWrongs() const { return Count() != 0; }
- void InsertWrong( USHORT nStart, USHORT nEnd, BOOL bClearRange );
- BOOL NextWrong( USHORT& rnStart, USHORT& rnEnd ) const;
- BOOL HasWrong( USHORT nStart, USHORT nEnd ) const;
- BOOL HasAnyWrong( USHORT nStart, USHORT nEnd ) const;
- void ClearWrongs( USHORT nStart, USHORT nEnd, const ContentNode* pNode );
+ sal_Bool HasWrongs() const { return Count() != 0; }
+ void InsertWrong( sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bClearRange );
+ sal_Bool NextWrong( sal_uInt16& rnStart, sal_uInt16& rnEnd ) const;
+ sal_Bool HasWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const;
+ sal_Bool HasAnyWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const;
+ void ClearWrongs( sal_uInt16 nStart, sal_uInt16 nEnd, const ContentNode* pNode );
void MarkWrongsInvalid();
WrongList* Clone() const;
@@ -130,7 +130,7 @@ public:
bool operator==(const WrongList& rCompare) const;
};
-inline void WrongList::InsertWrong( const WrongRange& rWrong, USHORT nPos )
+inline void WrongList::InsertWrong( const WrongRange& rWrong, sal_uInt16 nPos )
{
WrongRanges::Insert( rWrong, nPos );
#ifdef DBG_UTIL
@@ -144,35 +144,35 @@ class EdtAutoCorrDoc : public SvxAutoCorrDoc
{
ImpEditEngine* pImpEE;
ContentNode* pCurNode;
- USHORT nCursor;
+ sal_uInt16 nCursor;
- BOOL bAllowUndoAction;
- BOOL bUndoAction;
+ sal_Bool bAllowUndoAction;
+ sal_Bool bUndoAction;
protected:
void ImplStartUndoAction();
public:
- EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, USHORT nCrsr, xub_Unicode cIns );
+ EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, sal_uInt16 nCrsr, xub_Unicode cIns );
~EdtAutoCorrDoc();
- virtual BOOL Delete( USHORT nStt, USHORT nEnd );
- virtual BOOL Insert( USHORT nPos, const String& rTxt );
- virtual BOOL Replace( USHORT nPos, const String& rTxt );
+ virtual sal_Bool Delete( sal_uInt16 nStt, sal_uInt16 nEnd );
+ virtual sal_Bool Insert( sal_uInt16 nPos, const String& rTxt );
+ virtual sal_Bool Replace( sal_uInt16 nPos, const String& rTxt );
- virtual BOOL SetAttr( USHORT nStt, USHORT nEnd, USHORT nSlotId, SfxPoolItem& );
- virtual BOOL SetINetAttr( USHORT nStt, USHORT nEnd, const String& rURL );
+ virtual sal_Bool SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 nSlotId, SfxPoolItem& );
+ virtual sal_Bool SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const String& rURL );
- virtual BOOL HasSymbolChars( USHORT nStt, USHORT nEnd );
+ virtual sal_Bool HasSymbolChars( sal_uInt16 nStt, sal_uInt16 nEnd );
- virtual const String* GetPrevPara( BOOL bAtNormalPos );
+ virtual const String* GetPrevPara( sal_Bool bAtNormalPos );
- virtual BOOL ChgAutoCorrWord( USHORT& rSttPos, USHORT nEndPos,
+ virtual sal_Bool ChgAutoCorrWord( sal_uInt16& rSttPos, sal_uInt16 nEndPos,
SvxAutoCorrect& rACorrect, const String** ppPara );
- virtual LanguageType GetLanguage( USHORT nPos, BOOL bPrevPara = FALSE ) const;
+ virtual LanguageType GetLanguage( sal_uInt16 nPos, sal_Bool bPrevPara = sal_False ) const;
- USHORT GetCursor() const { return nCursor; }
+ sal_uInt16 GetCursor() const { return nCursor; }
};
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index bdef019b1c..351627674f 100644..100755
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -57,15 +57,15 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu
{
pImpEditEngine = 0;
pCurAnchor = 0;
- bInPara = FALSE;
- bWasInPara = FALSE;
+ bInPara = sal_False;
+ bWasInPara = sal_False;
nInTable = 0;
nInCell = 0;
- bInTitle = FALSE;
+ bInTitle = sal_False;
nDefListLevel = 0;
nBulletLevel = 0;
nNumberingLevel = 0;
- bFieldsInserted = FALSE;
+ bFieldsInserted = sal_False;
DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" );
DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParser::::EditHTMLParser: Switch to UCS2?" );
@@ -75,7 +75,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
- SetSwitchToUCS2( TRUE );
+ SetSwitchToUCS2( sal_True );
if ( pHTTPHeaderAttrs )
SetEncodingByHTTPHeader( pHTTPHeaderAttrs );
@@ -129,16 +129,16 @@ void EditHTMLParser::NextToken( int nToken )
case HTML_META:
{
const HTMLOptions *_pOptions = GetOptions();
- USHORT nArrLen = _pOptions->Count();
- BOOL bEquiv = FALSE;
- for ( USHORT i = 0; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = _pOptions->Count();
+ sal_Bool bEquiv = sal_False;
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption *pOption = (*_pOptions)[i];
switch( pOption->GetToken() )
{
case HTML_O_HTTPEQUIV:
{
- bEquiv = TRUE;
+ bEquiv = sal_True;
}
break;
case HTML_O_CONTENT:
@@ -158,11 +158,11 @@ void EditHTMLParser::NextToken( int nToken )
break;
case HTML_PLAINTEXT_ON:
case HTML_PLAINTEXT2_ON:
- bInPara = TRUE;
+ bInPara = sal_True;
break;
case HTML_PLAINTEXT_OFF:
case HTML_PLAINTEXT2_OFF:
- bInPara = FALSE;
+ bInPara = sal_False;
break;
case HTML_LINEBREAK:
@@ -195,7 +195,7 @@ void EditHTMLParser::NextToken( int nToken )
if (!bInTitle)
{
if ( !bInPara )
- StartPara( FALSE );
+ StartPara( sal_False );
String aText = aToken;
if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' )
@@ -211,7 +211,7 @@ void EditHTMLParser::NextToken( int nToken )
// Only written until HTML with 319?
if ( IsReadPRE() )
{
- USHORT nTabPos = aText.Search( '\t', 0 );
+ sal_uInt16 nTabPos = aText.Search( '\t', 0 );
while ( nTabPos != STRING_NOTFOUND )
{
aText.Erase( nTabPos, 1 );
@@ -228,7 +228,7 @@ void EditHTMLParser::NextToken( int nToken )
case HTML_CENTER_ON:
case HTML_CENTER_OFF:
{
- USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
+ sal_uInt16 nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
aItems.ClearItem( EE_PARA_JUST );
if ( nToken == HTML_CENTER_ON )
@@ -244,13 +244,13 @@ void EditHTMLParser::NextToken( int nToken )
case HTML_PARABREAK_ON:
if( bInPara && HasTextInCurrentPara() )
- EndPara( TRUE );
- StartPara( TRUE );
+ EndPara( sal_True );
+ StartPara( sal_True );
break;
case HTML_PARABREAK_OFF:
if( bInPara )
- EndPara( TRUE );
+ EndPara( sal_True );
break;
case HTML_HEAD1_ON:
@@ -279,7 +279,7 @@ void EditHTMLParser::NextToken( int nToken )
case HTML_XMP_ON:
case HTML_LISTING_ON:
{
- StartPara( TRUE );
+ StartPara( sal_True );
ImpSetStyleSheet( STYLE_PRE );
}
break;
@@ -318,10 +318,10 @@ void EditHTMLParser::NextToken( int nToken )
case HTML_ORDERLIST_ON:
case HTML_UNORDERLIST_ON:
{
- BOOL bHasText = HasTextInCurrentPara();
+ sal_Bool bHasText = HasTextInCurrentPara();
if ( bHasText )
ImpInsertParaBreak();
- StartPara( FALSE );
+ StartPara( sal_False );
}
break;
@@ -337,7 +337,7 @@ void EditHTMLParser::NextToken( int nToken )
case HTML_DD_OFF:
case HTML_DT_OFF:
case HTML_ORDERLIST_OFF:
- case HTML_UNORDERLIST_OFF: EndPara( FALSE );
+ case HTML_UNORDERLIST_OFF: EndPara( sal_False );
break;
case HTML_TABLEROW_ON:
@@ -353,10 +353,10 @@ void EditHTMLParser::NextToken( int nToken )
break;
case HTML_TITLE_ON:
- bInTitle = TRUE;
+ bInTitle = sal_True;
break;
case HTML_TITLE_OFF:
- bInTitle = FALSE;
+ bInTitle = sal_False;
break;
// globals
@@ -551,7 +551,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe
}
ContentNode* pSN = aStartPaM.GetNode();
- USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN );
+ sal_uInt16 nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN );
// If an attribute goes from 0 to current Paragraph length,
// then it should be a paragraph attribute!
@@ -562,7 +562,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe
// not really HTML:
#ifdef DBG_UTIL
ContentNode* pEN = aEndPaM.GetNode();
- USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
+ sal_uInt16 nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
DBG_ASSERT( nStartNode == nEndNode, "ImpSetAttribs: Several paragraphs?" );
#endif
@@ -577,7 +577,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe
pImpEditEngine->SetAttribs( EditSelection( aStartPaM, aEndPaM ), rItems );
}
-void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel )
+void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
{
/*
nHLevel: 0: Turn off
@@ -588,8 +588,8 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel )
// Enough for Calc, would have to be clarified with StyleSheets
// that they should also be in the app so that when they are feed
// in a different engine still are here ...
+ sal_uInt16 nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
- USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
aItems.ClearItem( EE_PARA_ULSPACE );
@@ -649,8 +649,8 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel )
if ( !nHLevel || ((nHLevel >= 1) && (nHLevel <= 6)) )
{
SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE );
- aULSpaceItem.SetUpper( (USHORT)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) );
- aULSpaceItem.SetLower( (USHORT)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) );
+ aULSpaceItem.SetUpper( (sal_uInt16)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) );
+ aULSpaceItem.SetLower( (sal_uInt16)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) );
aItems.Put( aULSpaceItem );
}
}
@@ -691,7 +691,7 @@ void EditHTMLParser::SkipGroup( int nEndToken )
// groups in cells are closed upon leaving the cell, because those
// ******* web authors don't know their job
// for example: <td><form></td> lacks a closing </form>
- BYTE nCellLevel = nInCell;
+ sal_uInt8 nCellLevel = nInCell;
int nToken;
while( nCellLevel <= nInCell && ( (nToken = GetNextToken() ) != nEndToken ) && nToken )
{
@@ -710,14 +710,14 @@ void EditHTMLParser::SkipGroup( int nEndToken )
}
}
-void EditHTMLParser::StartPara( BOOL bReal )
+void EditHTMLParser::StartPara( sal_Bool bReal )
{
if ( bReal )
{
const HTMLOptions *_pOptions = GetOptions();
- USHORT nArrLen = _pOptions->Count();
+ sal_uInt16 nArrLen = _pOptions->Count();
SvxAdjust eAdjust = SVX_ADJUST_LEFT;
- for ( USHORT i = 0; i < nArrLen; i++ )
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption *pOption = (*_pOptions)[i];
switch( pOption->GetToken() )
@@ -740,33 +740,33 @@ void EditHTMLParser::StartPara( BOOL bReal )
aItemSet.Put( SvxAdjustItem( eAdjust, EE_PARA_JUST ) );
ImpSetAttribs( aItemSet );
}
- bInPara = TRUE;
+ bInPara = sal_True;
}
-void EditHTMLParser::EndPara( BOOL )
+void EditHTMLParser::EndPara( sal_Bool )
{
if ( bInPara )
{
- BOOL bHasText = HasTextInCurrentPara();
+ sal_Bool bHasText = HasTextInCurrentPara();
if ( bHasText )
ImpInsertParaBreak();
}
- bInPara = FALSE;
+ bInPara = sal_False;
}
-BOOL EditHTMLParser::ThrowAwayBlank()
+sal_Bool EditHTMLParser::ThrowAwayBlank()
{
// A blank must be thrown away if the new text begins with a Blank and
// if the current paragraph is empty or ends with a Blank...
ContentNode* pNode = aCurSel.Max().GetNode();
if ( pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' ) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-BOOL EditHTMLParser::HasTextInCurrentPara()
+sal_Bool EditHTMLParser::HasTextInCurrentPara()
{
- return aCurSel.Max().GetNode()->Len() ? TRUE : FALSE;
+ return aCurSel.Max().GetNode()->Len() ? sal_True : sal_False;
}
void EditHTMLParser::AnchorStart()
@@ -775,11 +775,11 @@ void EditHTMLParser::AnchorStart()
if ( !pCurAnchor )
{
const HTMLOptions* _pOptions = GetOptions();
- USHORT nArrLen = _pOptions->Count();
+ sal_uInt16 nArrLen = _pOptions->Count();
String aRef;
- for ( USHORT i = 0; i < nArrLen; i++ )
+ for ( sal_uInt16 i = 0; i < nArrLen; i++ )
{
const HTMLOption* pOption = (*_pOptions)[i];
switch( pOption->GetToken() )
@@ -813,7 +813,7 @@ void EditHTMLParser::AnchorEnd()
// Insert as URL-Field...
SvxFieldItem aFld( SvxURLField( pCurAnchor->aHRef, pCurAnchor->aText, SVXURLFORMAT_REPR ), EE_FEATURE_FIELD );
aCurSel = pImpEditEngine->InsertField( aCurSel, aFld );
- bFieldsInserted = TRUE;
+ bFieldsInserted = sal_True;
delete pCurAnchor;
pCurAnchor = 0;
@@ -828,12 +828,12 @@ void EditHTMLParser::AnchorEnd()
void EditHTMLParser::HeadingStart( int nToken )
{
bWasInPara = bInPara;
- StartPara( FALSE );
+ StartPara( sal_False );
if ( bWasInPara && HasTextInCurrentPara() )
ImpInsertParaBreak();
- USHORT nId = sal::static_int_cast< USHORT >(
+ sal_uInt16 nId = sal::static_int_cast< sal_uInt16 >(
1 + ( ( nToken - HTML_HEAD1_ON ) / 2 ) );
DBG_ASSERT( (nId >= 1) && (nId <= 9), "HeadingStart: ID can not be correct!" );
ImpSetStyleSheet( nId );
@@ -841,13 +841,13 @@ void EditHTMLParser::HeadingStart( int nToken )
void EditHTMLParser::HeadingEnd( int )
{
- EndPara( FALSE );
+ EndPara( sal_False );
ImpSetStyleSheet( 0 );
if ( bWasInPara )
{
- bInPara = TRUE;
- bWasInPara = FALSE;
+ bInPara = sal_True;
+ bWasInPara = sal_False;
}
}
diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx
index ab4d42803a..43d55cdfd8 100644..100755
--- a/editeng/source/editeng/eehtml.hxx
+++ b/editeng/source/editeng/eehtml.hxx
@@ -53,34 +53,34 @@ private:
ImpEditEngine* pImpEditEngine;
AnchorInfo* pCurAnchor;
- BOOL bInPara;
- BOOL bWasInPara; // Remember bInPara before HeadingStart, because afterwards it will be gone.
- BOOL bFieldsInserted;
- BYTE nInTable;
- BYTE nInCell;
- BOOL bInTitle;
+ sal_Bool bInPara;
+ sal_Bool bWasInPara; // Remember bInPara before HeadingStart, because afterwards it will be gone.
+ sal_Bool bFieldsInserted;
+ sal_uInt8 nInTable;
+ sal_uInt8 nInCell;
+ sal_Bool bInTitle;
- BYTE nDefListLevel;
- BYTE nBulletLevel;
- BYTE nNumberingLevel;
+ sal_uInt8 nDefListLevel;
+ sal_uInt8 nBulletLevel;
+ sal_uInt8 nNumberingLevel;
- BYTE nLastAction;
+ sal_uInt8 nLastAction;
- void StartPara( BOOL bReal );
- void EndPara( BOOL bReal );
+ void StartPara( sal_Bool bReal );
+ void EndPara( sal_Bool bReal );
void AnchorStart();
void AnchorEnd();
void HeadingStart( int nToken );
void HeadingEnd( int nToken );
void SkipGroup( int nEndToken );
- BOOL ThrowAwayBlank();
- BOOL HasTextInCurrentPara();
- void ProcessUnknownControl( BOOL bOn );
+ sal_Bool ThrowAwayBlank();
+ sal_Bool HasTextInCurrentPara();
+ void ProcessUnknownControl( sal_Bool bOn );
void ImpInsertParaBreak();
void ImpInsertText( const String& rText );
void ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel = 0 );
- void ImpSetStyleSheet( USHORT nHeadingLevel );
+ void ImpSetStyleSheet( sal_uInt16 nHeadingLevel );
protected:
virtual void NextToken( int nToken );
diff --git a/editeng/source/editeng/eeng_pch.cxx b/editeng/source/editeng/eeng_pch.cxx
index 31a3b5e376..31a3b5e376 100644..100755
--- a/editeng/source/editeng/eeng_pch.cxx
+++ b/editeng/source/editeng/eeng_pch.cxx
diff --git a/editeng/source/editeng/eeng_pch.hxx b/editeng/source/editeng/eeng_pch.hxx
index 1ae7d8beed..1ae7d8beed 100644..100755
--- a/editeng/source/editeng/eeng_pch.hxx
+++ b/editeng/source/editeng/eeng_pch.hxx
diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx
index b014ab71a2..cbe5e85fe0 100644..100755
--- a/editeng/source/editeng/eeobj.cxx
+++ b/editeng/source/editeng/eeobj.cxx
@@ -62,7 +62,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo
{
uno::Any aAny;
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uLong nT = SotExchange::GetFormat( rFlavor );
if ( nT == SOT_FORMAT_STRING )
{
aAny <<= (::rtl::OUString)GetString();
@@ -75,7 +75,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo
SvMemoryStream* pStream = ( nT == SOT_FORMATSTR_ID_EDITENGINE ) ? &GetStream() : &GetRTFStream();
pStream->Seek( STREAM_SEEK_TO_END );
- ULONG nLen = pStream->Tell();
+ sal_uLong nLen = pStream->Tell();
pStream->Seek(0);
uno::Sequence< sal_Int8 > aSeq( nLen );
@@ -105,7 +105,7 @@ sal_Bool EditDataObject::isDataFlavorSupported( const datatransfer::DataFlavor&
{
sal_Bool bSupported = sal_False;
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uLong nT = SotExchange::GetFormat( rFlavor );
if ( ( nT == SOT_FORMAT_STRING ) || ( nT == SOT_FORMAT_RTF ) || ( nT == SOT_FORMATSTR_ID_EDITENGINE ) )
bSupported = sal_True;
diff --git a/editeng/source/editeng/eeobj.hxx b/editeng/source/editeng/eeobj.hxx
index 5629721ecc..5629721ecc 100644..100755
--- a/editeng/source/editeng/eeobj.hxx
+++ b/editeng/source/editeng/eeobj.hxx
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 8fa3a2b593..219e60353b 100644..100755
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -99,7 +99,7 @@ GlobalEditData::~GlobalEditData()
// Destroy DefItems...
// Or simply keep them, since at end of excecution?!
if ( ppDefItems )
- SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, TRUE );
+ SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, sal_True );
delete pStdRefDevice;
}
@@ -110,16 +110,16 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
// Paragraph attributes:
- SvxNumRule aTmpNumRule( 0, 0, FALSE );
+ SvxNumRule aTmpNumRule( 0, 0, sal_False );
ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR );
ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );
- ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, FALSE );
- ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, TRUE );
- ppDefItems[4] = new SvxScriptSpaceItem( TRUE, EE_PARA_ASIANCJKSPACING );
+ ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, sal_False );
+ ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True );
+ ppDefItems[4] = new SvxScriptSpaceItem( sal_True, EE_PARA_ASIANCJKSPACING );
ppDefItems[5] = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET );
- ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, FALSE );
- ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, TRUE );
+ ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False );
+ ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True );
ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE );
ppDefItems[9] = new SfxInt16Item( EE_PARA_OUTLLEVEL, -1 );
ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET );
@@ -140,12 +140,12 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems[23] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE );
ppDefItems[24] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT );
ppDefItems[25] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC );
- ppDefItems[26] = new SvxContourItem( FALSE, EE_CHAR_OUTLINE );
- ppDefItems[27] = new SvxShadowedItem( FALSE, EE_CHAR_SHADOW );
+ ppDefItems[26] = new SvxContourItem( sal_False, EE_CHAR_OUTLINE );
+ ppDefItems[27] = new SvxShadowedItem( sal_False, EE_CHAR_SHADOW );
ppDefItems[28] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT );
- ppDefItems[29] = new SvxAutoKernItem( FALSE, EE_CHAR_PAIRKERNING );
+ ppDefItems[29] = new SvxAutoKernItem( sal_False, EE_CHAR_PAIRKERNING );
ppDefItems[30] = new SvxKerningItem( 0, EE_CHAR_KERNING );
- ppDefItems[31] = new SvxWordLineModeItem( FALSE, EE_CHAR_WLM );
+ ppDefItems[31] = new SvxWordLineModeItem( sal_False, EE_CHAR_WLM );
ppDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE );
ppDefItems[33] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK );
ppDefItems[34] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL );
@@ -169,7 +169,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems[50] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
ppDefItems[51] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
- DBG_ASSERT( EDITITEMCOUNT == 52, "ITEMCOUNT changed, DefItems not adapted!" );
+ DBG_ASSERT( EDITITEMCOUNT == 52, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
// Init DefFonts:
GetDefaultFonts( *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START],
@@ -216,7 +216,7 @@ OutputDevice* GlobalEditData::GetStdRefDevice()
return pStdRefDevice;
}
-EditResId::EditResId( USHORT nId ):
+EditResId::EditResId( sal_uInt16 nId ):
ResId( nId, *EE_DLL()->GetResMgr() )
{
}
diff --git a/editeng/source/editeng/eerdll2.hxx b/editeng/source/editeng/eerdll2.hxx
index 43bf536982..43bf536982 100644..100755
--- a/editeng/source/editeng/eerdll2.hxx
+++ b/editeng/source/editeng/eerdll2.hxx
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index 60856bc149..15f30917e6 100644..100755
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -88,9 +88,9 @@ EditRTFParser::EditRTFParser( SvStream& rIn, EditSelection aSel, SfxItemPool& rA
SetInsPos( EditPosition( pImpEditEngine, &aCurSel ) );
// Convert the twips values ...
- SetCalcValue( TRUE );
+ SetCalcValue( sal_True );
SetChkStyleAttr( pImpEE->GetStatus().DoImportRTFStyleSheets() );
- SetNewDoc( FALSE ); // So that the Pool-Defaults are not overwritten...
+ SetNewDoc( sal_False ); // So that the Pool-Defaults are not overwritten...
aEditMapMode = MapMode( pImpEE->GetRefDevice()->GetMapMode().GetMapUnit() );
}
@@ -133,7 +133,7 @@ SvParserState EditRTFParser::CallParser()
if ( nLastAction == ACTION_INSERTPARABRK )
{
ContentNode* pCurNode = aCurSel.Max().GetNode();
- USHORT nPara = pImpEditEngine->GetEditDoc().GetPos( pCurNode );
+ sal_uInt16 nPara = pImpEditEngine->GetEditDoc().GetPos( pCurNode );
ContentNode* pPrevNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara-1 );
DBG_ASSERT( pPrevNode, "Invalid RTF-Document?!" );
EditSelection aSel;
@@ -143,17 +143,17 @@ SvParserState EditRTFParser::CallParser()
}
EditPaM aEnd2PaM( aCurSel.Max() );
//AddRTFDefaultValues( aStart2PaM, aEnd2PaM );
- BOOL bOnlyOnePara = ( aEnd2PaM.GetNode() == aStart2PaM.GetNode() );
+ sal_Bool bOnlyOnePara = ( aEnd2PaM.GetNode() == aStart2PaM.GetNode() );
// Paste the chunk again ...
// Problem: Paragraph attributes may not possibly be taken over
// => Do Character attributes.
- BOOL bSpecialBackward = aStart1PaM.GetNode()->Len() ? FALSE : TRUE;
+ sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True;
if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() )
pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() );
aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs(
aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward );
- bSpecialBackward = aEnd1PaM.GetNode()->Len() ? TRUE : FALSE;
+ bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False;
// when bOnlyOnePara, then the node is gone on Connect.
if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() )
pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() );
@@ -176,9 +176,9 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r
SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(),
aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO );
- USHORT nStartPara = pImpEditEngine->GetEditDoc().GetPos( rStart.GetNode() );
- USHORT nEndPara = pImpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() );
- for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ sal_uInt16 nStartPara = pImpEditEngine->GetEditDoc().GetPos( rStart.GetNode() );
+ sal_uInt16 nEndPara = pImpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() );
+ for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
DBG_ASSERT( pNode, "AddRTFDefaultValues - No paragraph?!" );
@@ -195,12 +195,12 @@ void EditRTFParser::NextToken( int nToken )
{
case RTF_DEFF:
{
- nDefFont = USHORT(nTokenValue);
+ nDefFont = sal_uInt16(nTokenValue);
}
break;
case RTF_DEFTAB:
{
- nDefTab = USHORT(nTokenValue);
+ nDefTab = sal_uInt16(nTokenValue);
}
break;
case RTF_CELL:
@@ -287,14 +287,14 @@ void EditRTFParser::MovePos( int bForward )
}
void EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos,
- USHORT& rCntPos )
+ sal_uInt16& rCntPos )
{
// The Intention is to: determine the current insert position of the
// previous paragraph and set the end from this.
// This "\pard" always apply on the right paragraph.
ContentNode* pN = aCurSel.Max().GetNode();
- USHORT nCurPara = pImpEditEngine->GetEditDoc().GetPos( pN );
+ sal_uInt16 nCurPara = pImpEditEngine->GetEditDoc().GetPos( pN );
DBG_ASSERT( nCurPara != 0, "Paragraph equal to 0: SetEnfPrevPara" );
if ( nCurPara )
nCurPara--;
@@ -304,7 +304,7 @@ void EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos,
rCntPos = pPrevNode->Len();
}
-int EditRTFParser::IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const
+int EditRTFParser::IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const
{
return ( nCnt == ( ((EditNodeIdx*)pNd)->GetNode()->Len()) );
}
@@ -325,12 +325,12 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
const MapUnit eSrcUnit = aRTFMapMode.GetMapUnit();
if (eDestUnit != eSrcUnit)
{
- USHORT aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL };
+ sal_uInt16 aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL };
for (int i = 0; i < 2; ++i)
{
- if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], FALSE, &pItem ))
+ if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], sal_False, &pItem ))
{
- UINT32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight();
+ sal_uInt32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight();
long nNewHeight;
nNewHeight = pImpEditEngine->GetRefDevice()->LogicToLogic( (long)nHeight, eSrcUnit, eDestUnit );
@@ -340,7 +340,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
}
}
- if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, sal_False, &pItem ))
{
// die richtige
long nEsc = ((SvxEscapementItem*)pItem)->GetEsc();
@@ -367,8 +367,8 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
ContentNode* pSN = aStartPaM.GetNode();
ContentNode* pEN = aEndPaM.GetNode();
- USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN );
- USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
+ sal_uInt16 nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN );
+ sal_uInt16 nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
sal_Int16 nOutlLevel = 0xff;
if ( rSet.StyleNo() && pImpEditEngine->GetStyleSheetPool() && pImpEditEngine->GetStatus().DoImportRTFStyleSheets() )
@@ -387,7 +387,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// Note: Selection can reach over several paragraphs.
// All Complete paragraphs are paragraph attributes ...
- for ( USHORT z = nStartNode+1; z < nEndNode; z++ )
+ for ( sal_uInt16 z = nStartNode+1; z < nEndNode; z++ )
{
DBG_ASSERT( pImpEditEngine->GetEditDoc().SaveGetObject( z ), "Node does not exist yet(RTF)" );
pImpEditEngine->SetParaAttribs( z, rSet.GetAttrSet() );
@@ -425,7 +425,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// OutlLevel...
if ( nOutlLevel != 0xff )
{
- for ( USHORT n = nStartNode; n <= nEndNode; n++ )
+ for ( sal_uInt16 n = nStartNode; n <= nEndNode; n++ )
{
ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( n );
pNode->GetContentAttribs().GetItems().Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nOutlLevel ) );
@@ -508,8 +508,8 @@ void EditRTFParser::ReadField()
{
// From SwRTFParser::ReadField()
int _nOpenBrakets = 1; // the first was already detected earlier
- BOOL bFldInst = FALSE;
- BOOL bFldRslt = FALSE;
+ sal_Bool bFldInst = sal_False;
+ sal_Bool bFldRslt = sal_False;
String aFldInst;
String aFldRslt;
@@ -522,8 +522,8 @@ void EditRTFParser::ReadField()
_nOpenBrakets--;
if ( _nOpenBrakets == 1 )
{
- bFldInst = FALSE;
- bFldRslt = FALSE;
+ bFldInst = sal_False;
+ bFldRslt = sal_False;
}
}
break;
@@ -534,10 +534,10 @@ void EditRTFParser::ReadField()
case RTF_FIELD: SkipGroup();
break;
- case RTF_FLDINST: bFldInst = TRUE;
+ case RTF_FLDINST: bFldInst = sal_True;
break;
- case RTF_FLDRSLT: bFldRslt = TRUE;
+ case RTF_FLDRSLT: bFldRslt = sal_True;
break;
case RTF_TEXTTOKEN:
@@ -599,7 +599,7 @@ void EditRTFParser::SkipGroup()
SkipToken( -1 ); // the closing brace is evaluated "above"
}
-ULONG EditNodeIdx::GetIdx() const
+sal_uLong EditNodeIdx::GetIdx() const
{
return pImpEditEngine->GetEditDoc().GetPos( pNode );
}
@@ -619,13 +619,13 @@ SvxNodeIdx* EditPosition::MakeNodeIdx() const
return new EditNodeIdx( pImpEditEngine, pCurSel->Max().GetNode() );
}
-ULONG EditPosition::GetNodeIdx() const
+sal_uLong EditPosition::GetNodeIdx() const
{
ContentNode* pN = pCurSel->Max().GetNode();
return pImpEditEngine->GetEditDoc().GetPos( pN );
}
-USHORT EditPosition::GetCntIdx() const
+sal_uInt16 EditPosition::GetCntIdx() const
{
return pCurSel->Max().GetIndex();
}
diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx
index 837087a084..a3a824d5cb 100644..100755
--- a/editeng/source/editeng/eertfpar.hxx
+++ b/editeng/source/editeng/eertfpar.hxx
@@ -42,7 +42,7 @@ private:
public:
EditNodeIdx( ImpEditEngine* pIEE, ContentNode* pNd = 0)
{ pImpEditEngine = pIEE; pNode = pNd; }
- virtual ULONG GetIdx() const;
+ virtual sal_uLong GetIdx() const;
virtual SvxNodeIdx* Clone() const;
ContentNode* GetNode() { return pNode; }
};
@@ -57,8 +57,8 @@ public:
EditPosition( ImpEditEngine* pIEE, EditSelection* pSel )
{ pImpEditEngine = pIEE; pCurSel = pSel; }
- virtual ULONG GetNodeIdx() const;
- virtual USHORT GetCntIdx() const;
+ virtual sal_uLong GetNodeIdx() const;
+ virtual sal_uInt16 GetCntIdx() const;
// clone
virtual SvxPosition* Clone() const;
@@ -79,22 +79,22 @@ private:
MapMode aRTFMapMode;
MapMode aEditMapMode;
- USHORT nDefFont;
- USHORT nDefTab;
- USHORT nDefFontHeight;
- BYTE nLastAction;
+ sal_uInt16 nDefFont;
+ sal_uInt16 nDefTab;
+ sal_uInt16 nDefFontHeight;
+ sal_uInt8 nLastAction;
protected:
virtual void InsertPara();
virtual void InsertText();
- virtual void MovePos( int bForward = TRUE );
+ virtual void MovePos( int bForward = sal_True );
virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos,
- USHORT& rCntPos );
+ sal_uInt16& rCntPos );
virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet );
virtual void NextToken( int nToken );
virtual void SetAttrInDoc( SvxRTFItemStackType &rSet );
- virtual int IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const;
+ virtual int IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const;
virtual void CalcValue();
void CreateStyleSheets();
SfxStyleSheet* CreateStyleSheet( SvxRTFStyleType* pRTFStyle );
@@ -113,7 +113,7 @@ public:
void SetDestCharSet( CharSet eCharSet ) { eDestCharSet = eCharSet; }
CharSet GetDestCharSet() const { return eDestCharSet; }
- USHORT GetDefTab() const { return nDefTab; }
+ sal_uInt16 GetDefTab() const { return nDefTab; }
Font GetDefFont() { return GetFont( nDefFont ); }
EditPaM GetCurPaM() const { return aCurSel.Max(); }
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 4b173ad3d2..faacef226f 100644..100755
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -73,7 +73,7 @@ inline void lcl_AllignToPixel( Point& rPoint, OutputDevice* pOutDev, short nDiff
rPoint = pOutDev->PixelToLogic( rPoint );
}
-// ----------------------------------------------------------------------
+ // ----------------------------------------------------------------------
// class ImpEditView
// ----------------------------------------------------------------------
ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, Window* pWindow ) :
@@ -96,7 +96,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, Window* pWindow ) :
nInvMore = 1;
nTravelXPos = TRAVEL_X_DONTKNOW;
nControl = EV_CNTRL_AUTOSCROLL | EV_CNTRL_ENABLEPASTE;
- bActiveDragAndDropListener = FALSE;
+ bActiveDragAndDropListener = sal_False;
aEditSelection.Min() = pEng->pImpEditEngine->GetEditDoc().GetStartPaM();
aEditSelection.Max() = pEng->pImpEditEngine->GetEditDoc().GetEndPaM();
@@ -210,18 +210,18 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion )
EditLine* pLine = pTmpPortion->GetLines().GetObject( nLine );
DBG_ASSERT( pLine, "Line not found: DrawSelection()" );
- BOOL bPartOfLine = FALSE;
+ sal_Bool bPartOfLine = sal_False;
sal_uInt16 nStartIndex = pLine->GetStart();
sal_uInt16 nEndIndex = pLine->GetEnd();
if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) && ( nStartIndex != aTmpSel.Min().GetIndex() ) )
{
nStartIndex = aTmpSel.Min().GetIndex();
- bPartOfLine = TRUE;
+ bPartOfLine = sal_True;
}
if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) && ( nEndIndex != aTmpSel.Max().GetIndex() ) )
{
nEndIndex = aTmpSel.Max().GetIndex();
- bPartOfLine = TRUE;
+ bPartOfLine = sal_True;
}
// Can happen if at the beginning of a wrapped line.
@@ -252,8 +252,8 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion )
}
else
{
- USHORT nTmpStartIndex = nStartIndex;
- USHORT nWritingDirStart, nTmpEndIndex;
+ sal_uInt16 nTmpStartIndex = nStartIndex;
+ sal_uInt16 nWritingDirStart, nTmpEndIndex;
while ( nTmpStartIndex < nEndIndex )
{
@@ -263,7 +263,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion )
DBG_ASSERT( nTmpEndIndex > nTmpStartIndex, "DrawSelection, Start >= End?" );
- long nX1 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpStartIndex, TRUE );
+ long nX1 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpStartIndex, sal_True );
long nX2 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpEndIndex );
Point aPt1( Min( nX1, nX2 ), aTopLeft.Y() );
@@ -333,7 +333,7 @@ void ImpEditView::ImplDrawHighlightRect( Window* _pOutWin, const Point& rDocPosT
}
-BOOL ImpEditView::IsVertical() const
+sal_Bool ImpEditView::IsVertical() const
{
return pEditEngine->pImpEditEngine->IsVertical();
}
@@ -632,7 +632,7 @@ void ImpEditView::CalcAnchorPoint()
}
}
-void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags )
+void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_uInt16 nShowCursorFlags )
{
// No ShowCursor in an empty View ...
if ( ( aOutArea.Left() >= aOutArea.Right() ) && ( aOutArea.Top() >= aOutArea.Bottom() ) )
@@ -656,8 +656,8 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US
EditPaM aPaM( aEditSelection.Max() );
- USHORT nTextPortionStart = 0;
- USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
+ sal_uInt16 nTextPortionStart = 0;
+ sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
if (nPara == USHRT_MAX) // #i94322
return;
ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara );
@@ -683,7 +683,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US
// If we are behind a portion, and the next portion has other direction, we must change position...
aEditCursor.Left() = aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GETCRSR_TXTONLY|GETCRSR_PREFERPORTIONSTART ).Left();
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, TRUE );
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True );
TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
if ( pTextPortion->GetKind() == PORTIONKIND_TAB )
{
@@ -691,7 +691,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US
}
else
{
- EditPaM aNext = pEditEngine->pImpEditEngine->CursorRight( aPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ EditPaM aNext = pEditEngine->pImpEditEngine->CursorRight( aPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GETCRSR_TXTONLY );
if ( aTmpRect.Top() != aEditCursor.Top() )
aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GETCRSR_TXTONLY|GETCRSR_ENDOFLINE );
@@ -852,9 +852,9 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US
unsigned char nCursorDir = CURSOR_DIRECTION_NONE;
if ( IsInsertMode() && !aEditSelection.HasRange() && ( pEditEngine->pImpEditEngine->HasDifferentRTLLevels( aPaM.GetNode() ) ) )
{
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? TRUE : FALSE );
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? sal_True : sal_False );
TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
- USHORT nRTLLevel = pTextPortion->GetRightToLeft();
+ sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft();
if ( nRTLLevel%2 )
nCursorDir = CURSOR_DIRECTION_RTL;
else
@@ -868,7 +868,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US
{
SvxFont aFont;
pEditEngine->pImpEditEngine->SeekCursor( aPaM.GetNode(), aPaM.GetIndex()+1, aFont );
- ULONG nContextFlags = INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT;
+ sal_uLong nContextFlags = INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT;
GetWindow()->SetInputContext( InputContext( aFont, nContextFlags ) );
}
}
@@ -881,7 +881,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US
}
}
-Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck )
+Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck )
{
DBG_ASSERT( pEditEngine->pImpEditEngine->IsFormatted(), "Scroll: Not formatted!" );
if ( !ndX && !ndY )
@@ -928,9 +928,9 @@ Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck )
aNewVisArea.Left() -= ndY;
aNewVisArea.Right() -= ndY;
}
- if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Right() > (long)pEditEngine->pImpEditEngine->CalcTextWidth( FALSE ) ) )
+ if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Right() > (long)pEditEngine->pImpEditEngine->CalcTextWidth( sal_False ) ) )
{
- long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( FALSE ) - aNewVisArea.Right(); // negative
+ long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( sal_False ) - aNewVisArea.Right(); // negative
aNewVisArea.Move( nDiff, 0 ); // could end up in the negative area...
}
if ( ( aNewVisArea.Left() < 0 ) && ( nRangeCheck != RGCHK_NONE ) )
@@ -989,7 +989,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck )
sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
if ( eFunc != KEYFUNC_DONTKNOW )
@@ -1010,7 +1010,7 @@ sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin
{
Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetClipboard());
CutCopy( aClipBoard, sal_False );
- bDone = TRUE;
+ bDone = sal_True;
}
break;
case KEYFUNC_PASTE:
@@ -1060,7 +1060,7 @@ sal_Bool ImpEditView::MouseButtonUp( const MouseEvent& rMouseEvent )
else if ( rMouseEvent.IsLeft() && GetEditSelection().HasRange() )
{
Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetPrimarySelection());
- CutCopy( aClipBoard, FALSE );
+ CutCopy( aClipBoard, sal_False );
}
return pEditEngine->pImpEditEngine->MouseButtonUp( rMouseEvent, GetEditViewPtr() );
@@ -1174,7 +1174,7 @@ void ImpEditView::DeleteSelected()
SetEditSelection( EditSelection( aPaM, aPaM ) );
pEditEngine->pImpEditEngine->FormatAndUpdate( GetEditViewPtr() );
- ShowCursor( DoAutoScroll(), TRUE );
+ ShowCursor( DoAutoScroll(), sal_True );
}
const SvxFieldItem* ImpEditView::GetField( const Point& rPos, sal_uInt16* pPara, sal_uInt16* pPos ) const
@@ -1210,20 +1210,20 @@ const SvxFieldItem* ImpEditView::GetField( const Point& rPos, sal_uInt16* pPara,
return NULL;
}
-BOOL ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara )
+sal_Bool ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara )
{
if ( pPara )
*pPara = 0xFFFF;
if( !GetOutputArea().IsInside( rPos ) )
- return FALSE;
+ return sal_False;
Point aDocPos( GetDocPos( rPos ) );
EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, sal_False );
if ( aPaM.GetIndex() == 0 )
{
- USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
+ sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
Rectangle aBulletArea = pEditEngine->GetBulletArea( nPara );
long nY = pEditEngine->GetDocPosTopLeft( nPara ).Y();
ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara );
@@ -1235,14 +1235,14 @@ BOOL ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara )
{
if ( pPara )
*pPara = nPara;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, BOOL bCut )
+void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bCut )
{
if ( rxClipboard.is() && GetEditSelection().HasRange() )
{
@@ -1275,7 +1275,7 @@ void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::d
}
}
-void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, BOOL bUseSpecial )
+void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bUseSpecial )
{
if ( rxClipboard.is() )
{
@@ -1343,58 +1343,58 @@ void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::dat
SetEditSelection( aSel );
pEditEngine->pImpEditEngine->UpdateSelections();
pEditEngine->pImpEditEngine->FormatAndUpdate( GetEditViewPtr() );
- ShowCursor( DoAutoScroll(), TRUE );
+ ShowCursor( DoAutoScroll(), sal_True );
}
}
}
-BOOL ImpEditView::IsInSelection( const EditPaM& rPaM )
+sal_Bool ImpEditView::IsInSelection( const EditPaM& rPaM )
{
EditSelection aSel = GetEditSelection();
if ( !aSel.HasRange() )
- return FALSE;
+ return sal_False;
aSel.Adjust( pEditEngine->pImpEditEngine->GetEditDoc() );
- USHORT nStartNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Min().GetNode() );
- USHORT nEndNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Max().GetNode() );
- USHORT nCurNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( rPaM.GetNode() );
+ sal_uInt16 nStartNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Max().GetNode() );
+ sal_uInt16 nCurNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( rPaM.GetNode() );
if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) )
- return TRUE;
+ return sal_True;
if ( nStartNode == nEndNode )
{
if ( nCurNode == nStartNode )
if ( ( rPaM.GetIndex() >= aSel.Min().GetIndex() ) && ( rPaM.GetIndex() < aSel.Max().GetIndex() ) )
- return TRUE;
+ return sal_True;
}
else if ( ( nCurNode == nStartNode ) && ( rPaM.GetIndex() >= aSel.Min().GetIndex() ) )
- return TRUE;
+ return sal_True;
else if ( ( nCurNode == nEndNode ) && ( rPaM.GetIndex() < aSel.Max().GetIndex() ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
void ImpEditView::CreateAnchor()
{
- pEditEngine->pImpEditEngine->bInSelection = TRUE;
+ pEditEngine->pImpEditEngine->bInSelection = sal_True;
GetEditSelection().Min() = GetEditSelection().Max();
}
void ImpEditView::DeselectAll()
{
- pEditEngine->pImpEditEngine->bInSelection = FALSE;
+ pEditEngine->pImpEditEngine->bInSelection = sal_False;
DrawSelection();
GetEditSelection().Min() = GetEditSelection().Max();
}
-BOOL ImpEditView::IsSelectionAtPoint( const Point& rPosPixel )
+sal_Bool ImpEditView::IsSelectionAtPoint( const Point& rPosPixel )
{
if ( pDragAndDropInfo && pDragAndDropInfo->pField )
- return TRUE;
+ return sal_True;
Point aMousePos( rPosPixel );
@@ -1403,15 +1403,15 @@ BOOL ImpEditView::IsSelectionAtPoint( const Point& rPosPixel )
if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() )
{
- return FALSE;
+ return sal_False;
}
Point aDocPos( GetDocPos( aMousePos ) );
- EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, FALSE );
+ EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, sal_False );
return IsInSelection( aPaM );
}
-BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel )
+sal_Bool ImpEditView::SetCursorAtPoint( const Point& rPointPixel )
{
pEditEngine->pImpEditEngine->CheckIdleFormatter();
@@ -1422,7 +1422,7 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel )
if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() )
{
- return FALSE;
+ return sal_False;
}
Point aDocPos( GetDocPos( aMousePos ) );
@@ -1431,7 +1431,7 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel )
// then again wiht the PaM for the Rect, even though the line is already
// known .... This must not be, though!
EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos );
- BOOL bGotoCursor = DoAutoScroll();
+ sal_Bool bGotoCursor = DoAutoScroll();
// aTmpNewSel: Diff between old and new, not the new selection
EditSelection aTmpNewSel( GetEditSelection().Max(), aPaM );
@@ -1458,9 +1458,9 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel )
SetEditSelection( aNewEditSelection );
}
- BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !pEditEngine->pImpEditEngine->IsInSelectionMode();
+ sal_Bool bForceCursor = ( pDragAndDropInfo ? sal_False : sal_True ) && !pEditEngine->pImpEditEngine->IsInSelectionMode();
ShowCursor( bGotoCursor, bForceCursor );
- return TRUE;
+ return sal_True;
}
@@ -1545,7 +1545,7 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d
else
{
// Field?!
- USHORT nPara, nPos;
+ sal_uInt16 nPara, nPos;
Point aMousePos = GetWindow()->PixelToLogic( aMousePosPixel );
const SvxFieldItem* pField = GetField( aMousePos, &nPara, &nPos );
if ( pField )
@@ -1556,18 +1556,18 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d
aCopySel = EditSelection( EditPaM( pNode, nPos ), EditPaM( pNode, nPos+1 ) );
GetEditSelection() = aCopySel;
DrawSelection();
- BOOL bGotoCursor = DoAutoScroll();
- BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !pEditEngine->pImpEditEngine->IsInSelectionMode();
+ sal_Bool bGotoCursor = DoAutoScroll();
+ sal_Bool bForceCursor = ( pDragAndDropInfo ? sal_False : sal_True ) && !pEditEngine->pImpEditEngine->IsInSelectionMode();
ShowCursor( bGotoCursor, bForceCursor );
}
else if ( IsBulletArea( aMousePos, &nPara ) )
{
pDragAndDropInfo = new DragAndDropInfo();
- pDragAndDropInfo->bOutlinerMode = TRUE;
+ pDragAndDropInfo->bOutlinerMode = sal_True;
EditPaM aStartPaM( pEditEngine->pImpEditEngine->GetEditDoc().GetObject( nPara ), 0 );
EditPaM aEndPaM( aStartPaM );
const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
- for ( USHORT n = nPara +1; n < pEditEngine->pImpEditEngine->GetEditDoc().Count(); n++ )
+ for ( sal_uInt16 n = nPara +1; n < pEditEngine->pImpEditEngine->GetEditDoc().Count(); n++ )
{
const SfxInt16Item& rL = (const SfxInt16Item&) pEditEngine->GetParaAttrib( n, EE_PARA_OUTLLEVEL );
if ( rL.GetValue() > rLevel.GetValue() )
@@ -1693,7 +1693,7 @@ void ImpEditView::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSo
pEditEngine->pImpEditEngine->UndoActionEnd( EDITUNDO_DRAGANDDROP );
HideDDCursor();
- ShowCursor( DoAutoScroll(), TRUE );
+ ShowCursor( DoAutoScroll(), sal_True );
delete pDragAndDropInfo;
pDragAndDropInfo = NULL;
pEditEngine->GetEndDropHdl().Call(GetEditViewPtr());
@@ -1709,19 +1709,19 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro
if ( pDragAndDropInfo && pDragAndDropInfo->bDragAccepted )
{
pEditEngine->GetBeginDropHdl().Call(GetEditViewPtr());
- BOOL bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
HideDDCursor();
if ( pDragAndDropInfo->bStarterOfDD )
{
pEditEngine->pImpEditEngine->UndoActionStart( EDITUNDO_DRAGANDDROP );
- pDragAndDropInfo->bUndoAction = TRUE;
+ pDragAndDropInfo->bUndoAction = sal_True;
}
if ( pDragAndDropInfo->bOutlinerMode )
{
- bChanges = TRUE;
+ bChanges = sal_True;
GetEditViewPtr()->MoveParagraphs( Range( pDragAndDropInfo->aBeginDragSel.nStartPara, pDragAndDropInfo->aBeginDragSel.nEndPara ), pDragAndDropInfo->nOutlinerDropDest );
}
else
@@ -1729,7 +1729,7 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro
uno::Reference< datatransfer::XTransferable > xDataObj = rDTDE.Transferable;
if ( xDataObj.is() )
{
- bChanges = TRUE;
+ bChanges = sal_True;
// remove Selection ...
DrawSelection();
EditPaM aPaM( pDragAndDropInfo->aDropDest );
@@ -1856,7 +1856,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
pDragAndDropInfo->aDropDest = aPaM;
if ( pDragAndDropInfo->bOutlinerMode )
{
- USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
+ sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
ParaPortion* pPPortion = pEditEngine->pImpEditEngine->GetParaPortions().SaveGetObject( nPara );
long nDestParaStartY = pEditEngine->pImpEditEngine->GetParaPortions().GetYOffset( pPPortion );
long nRel = aDocPos.Y() - nDestParaStartY;
@@ -1872,7 +1872,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
if( ( pDragAndDropInfo->nOutlinerDropDest >= pDragAndDropInfo->aBeginDragSel.nStartPara ) &&
( pDragAndDropInfo->nOutlinerDropDest <= (pDragAndDropInfo->aBeginDragSel.nEndPara+1) ) )
{
- bAccept = FALSE;
+ bAccept = sal_False;
}
}
else if ( HasSelection() )
@@ -1884,7 +1884,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
aCurSel.Adjust();
if ( !aDestSel.IsLess( aCurSel ) && !aDestSel.IsGreater( aCurSel ) )
{
- bAccept = FALSE;
+ bAccept = sal_False;
}
}
if ( bAccept )
@@ -1935,7 +1935,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
HideDDCursor();
ShowDDCursor(aEditCursor );
}
- pDragAndDropInfo->bDragAccepted = TRUE;
+ pDragAndDropInfo->bDragAccepted = sal_True;
rDTDE.Context->acceptDrag( rDTDE.DropAction );
}
}
@@ -1945,7 +1945,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
{
HideDDCursor();
if (pDragAndDropInfo)
- pDragAndDropInfo->bDragAccepted = FALSE;
+ pDragAndDropInfo->bDragAccepted = sal_False;
rDTDE.Context->rejectDrag();
}
}
@@ -1965,7 +1965,7 @@ void ImpEditView::AddDragAndDropListeners()
pWindow->GetDropTarget()->setActive( sal_True );
pWindow->GetDropTarget()->setDefaultActions( datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE );
- bActiveDragAndDropListener = TRUE;
+ bActiveDragAndDropListener = sal_True;
}
}
@@ -1985,7 +1985,7 @@ void ImpEditView::RemoveDragAndDropListeners()
mxDnDListener.clear();
}
- bActiveDragAndDropListener = FALSE;
+ bActiveDragAndDropListener = sal_False;
}
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 3441406b1e..516bd019de 100644..100755
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -123,7 +123,7 @@ struct DragAndDropInfo
sal_uInt16 nCursorWidth;
ESelection aBeginDragSel;
EditPaM aDropDest;
- USHORT nOutlinerDropDest;
+ sal_uInt16 nOutlinerDropDest;
ESelection aDropSel;
VirtualDevice* pBackground;
const SvxFieldItem* pField;
@@ -214,7 +214,7 @@ public:
EditView* GetView() { return pView; }
};
-// ----------------------------------------------------------------------
+ // ----------------------------------------------------------------------
// class ImpEditView
// ----------------------------------------------------------------------
class ImpEditView : public vcl::unohelper::DragAndDropClient
@@ -239,7 +239,7 @@ private:
long nInvMore;
- ULONG nControl;
+ sal_uLong nControl;
sal_uInt32 nTravelXPos;
sal_uInt16 nExtraCursorFlags;
sal_uInt16 nCursorBidiLevel;
@@ -290,13 +290,13 @@ public:
void ResetOutputArea( const Rectangle& rRec );
const Rectangle& GetOutputArea() const { return aOutArea; }
- BOOL IsVertical() const;
+ sal_Bool IsVertical() const;
- BOOL PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
+ sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
- BOOL MouseButtonUp( const MouseEvent& rMouseEvent );
- BOOL MouseButtonDown( const MouseEvent& rMouseEvent );
- BOOL MouseMove( const MouseEvent& rMouseEvent );
+ sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent );
+ sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent );
+ sal_Bool MouseMove( const MouseEvent& rMouseEvent );
void Command( const CommandEvent& rCEvt );
void CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bCut );
@@ -333,7 +333,7 @@ public:
void AddDragAndDropListeners();
void RemoveDragAndDropListeners();
- BOOL IsBulletArea( const Point& rPos, sal_uInt16* pPara );
+ sal_Bool IsBulletArea( const Point& rPos, sal_uInt16* pPara );
// For the Selection Engine...
void CreateAnchor();
@@ -348,9 +348,9 @@ public:
void CalcAnchorPoint();
void RecalcOutputArea();
- void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, BOOL test );
- void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags = 0 );
- Pair Scroll( long ndX, long ndY, BYTE nRangeCheck = RGCHK_NEG );
+ void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool test );
+ void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_uInt16 nShowCursorFlags = 0 );
+ Pair Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck = RGCHK_NEG );
void SetInsertMode( sal_Bool bInsert );
sal_Bool IsInsertMode() const { return ( ( nControl & EV_CNTRL_OVERWRITE ) == 0 ); }
@@ -456,9 +456,9 @@ private:
sal_uInt16 nStretchX;
sal_uInt16 nStretchY;
- USHORT nAsianCompressionMode;
- BOOL bKernAsianPunctuation;
- BOOL bAddExtLeading;
+ sal_uInt16 nAsianCompressionMode;
+ sal_Bool bKernAsianPunctuation;
+ sal_Bool bAddExtLeading;
EEHorizontalTextDirection eDefaultHorizontalTextDirection;
@@ -541,14 +541,14 @@ private:
EditPaM GetPaM( Point aDocPos, sal_Bool bSmart = sal_True );
EditPaM GetPaM( ParaPortion* pPortion, Point aPos, sal_Bool bSmart = sal_True );
- long GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nIndex, BOOL bPreferPortionStart = FALSE );
- long GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion );
- USHORT GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nX, BOOL bSmart = TRUE );
+ long GetXPos( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart = sal_False );
+ long GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nTextPortion );
+ sal_uInt16 GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nX, sal_Bool bSmart = sal_True );
Range GetInvalidYOffsets( ParaPortion* pPortion );
Range GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* pLine );
- void SetParaAttrib( BYTE nFunc, EditSelection aSel, sal_uInt16 nValue );
- sal_uInt16 GetParaAttrib( BYTE nFunc, EditSelection aSel );
+ void SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue );
+ sal_uInt16 GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel );
void SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem );
void ParaAttribsToCharAttribs( ContentNode* pNode );
void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
@@ -556,12 +556,12 @@ private:
EditTextObject* CreateBinTextObject( EditSelection aSelection, SfxItemPool*, sal_Bool bAllowBigObjects = sal_False, sal_uInt16 nBigObjStart = 0 ) const;
void StoreBinTextObject( SvStream& rOStream, BinTextObject& rTextObject );
EditSelection InsertBinTextObject( BinTextObject&, EditPaM aPaM );
- EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, BOOL bUseSpecial );
+ EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial );
EditPaM Clear();
EditPaM RemoveText();
EditPaM RemoveText( EditSelection aEditSelection );
- sal_Bool CreateLines( USHORT nPara, sal_uInt32 nStartPosY );
+ sal_Bool CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY );
void CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uInt32 nStartPosY );
sal_Bool FinishCreateLines( ParaPortion* pParaPortion );
void CalcCharPositions( ParaPortion* pParaPortion );
@@ -589,9 +589,9 @@ private:
sal_Bool ImpCheckRefMapMode();
- BOOL ImplHasText() const;
+ sal_Bool ImplHasText() const;
- void ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray );
+ void ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, SvUShorts& rArray );
void InsertContent( ContentNode* pNode, sal_uInt16 nPos );
EditPaM SplitContent( sal_uInt16 nNode, sal_uInt16 nSepPos );
@@ -604,8 +604,8 @@ private:
EditPaM PageDown( const EditPaM& rPaM, EditView* pView);
EditPaM CursorUp( const EditPaM& rPaM, EditView* pEditView );
EditPaM CursorDown( const EditPaM& rPaM, EditView* pEditView );
- EditPaM CursorLeft( const EditPaM& rPaM, USHORT nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL );
- EditPaM CursorRight( const EditPaM& rPaM, USHORT nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL );
+ EditPaM CursorLeft( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL );
+ EditPaM CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL );
EditPaM CursorStartOfLine( const EditPaM& rPaM );
EditPaM CursorEndOfLine( const EditPaM& rPaM );
EditPaM CursorStartOfParagraph( const EditPaM& rPaM );
@@ -616,22 +616,22 @@ private:
EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditPaM StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, BOOL bAcceptStartOfWord = TRUE );
+ EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_Bool bAcceptStartOfWord = sal_True );
EditSelection SelectSentence( const EditSelection& rCurSel );
- EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, USHORT nCharacterIteratorMode, BOOL bToLeft );
- EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, BOOL bStart );
+ EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, sal_Bool bToLeft );
+ EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, sal_Bool bStart );
- void InitScriptTypes( USHORT nPara );
- USHORT GetScriptType( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const;
- USHORT GetScriptType( const EditSelection& rSel ) const;
- BOOL IsScriptChange( const EditPaM& rPaM ) const;
- BOOL HasScriptType( USHORT nPara, USHORT nType ) const;
+ void InitScriptTypes( sal_uInt16 nPara );
+ sal_uInt16 GetScriptType( const EditPaM& rPaM, sal_uInt16* pEndPos = NULL ) const;
+ sal_uInt16 GetScriptType( const EditSelection& rSel ) const;
+ sal_Bool IsScriptChange( const EditPaM& rPaM ) const;
+ sal_Bool HasScriptType( sal_uInt16 nPara, sal_uInt16 nType ) const;
- BOOL ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, USHORT nStartPos, sal_Int32* pDXArray, USHORT n100thPercentFromMax, BOOL bManipulateDXArray );
+ sal_Bool ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_uInt16 nStartPos, sal_Int32* pDXArray, sal_uInt16 n100thPercentFromMax, sal_Bool bManipulateDXArray );
void ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, long nRemainingWidth );
- void ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex );
+ void ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, sal_uInt16 nIndex );
void ImplInitDigitMode( OutputDevice* pOutDev, String* pString, xub_StrLen nStt, xub_StrLen nLen, LanguageType eLang );
EditPaM ReadText( SvStream& rInput, EditSelection aSel );
@@ -643,7 +643,7 @@ private:
sal_uInt32 WriteRTF( SvStream& rOutput, EditSelection aSel );
sal_uInt32 WriteXML( SvStream& rOutput, EditSelection aSel );
sal_uInt32 WriteHTML( SvStream& rOutput, EditSelection aSel );
- sal_uInt32 WriteBin( SvStream& rOutput, EditSelection aSel, BOOL bStoreUnicode = FALSE ) const;
+ sal_uInt32 WriteBin( SvStream& rOutput, EditSelection aSel, sal_Bool bStoreUnicode = sal_False ) const;
void WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, sal_uInt16 nPara, sal_uInt16 nPos,
SvxFontTable& rFontTable, SvxColorList& rColorList );
@@ -670,12 +670,12 @@ private:
long CalcVertLineSpacing(Point& rStartPos) const;
Color GetAutoColor() const;
- void EnableAutoColor( BOOL b ) { bUseAutoColor = b; }
- BOOL IsAutoColorEnabled() const { return bUseAutoColor; }
- void ForceAutoColor( BOOL b ) { bForceAutoColor = b; }
- BOOL IsForceAutoColor() const { return bForceAutoColor; }
+ void EnableAutoColor( sal_Bool b ) { bUseAutoColor = b; }
+ sal_Bool IsAutoColorEnabled() const { return bUseAutoColor; }
+ void ForceAutoColor( sal_Bool b ) { bForceAutoColor = b; }
+ sal_Bool IsForceAutoColor() const { return bForceAutoColor; }
- inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, ULONG nDrawMode );
+ inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode );
inline void EraseVirtualDevice();
DECL_LINK( StatusTimerHdl, Timer * );
@@ -702,7 +702,7 @@ private:
the output string at hand. This is necessary for slideshow
text effects.
*/
- void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const;
+ void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen) const;
SpellInfo * CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs );
@@ -713,7 +713,7 @@ public:
ImpEditEngine( EditEngine* pEditEngine, SfxItemPool* pPool );
~ImpEditEngine();
- void InitDoc( BOOL bKeepParaAttribs );
+ void InitDoc( sal_Bool bKeepParaAttribs );
EditDoc& GetEditDoc() { return aEditDoc; }
const EditDoc& GetEditDoc() const { return aEditDoc; }
@@ -729,20 +729,20 @@ public:
const Size& GetPaperSize() const { return aPaperSize; }
void SetPaperSize( const Size& rSz ) { aPaperSize = rSz; }
- void SetVertical( BOOL bVertical );
- BOOL IsVertical() const { return GetEditDoc().IsVertical(); }
+ void SetVertical( sal_Bool bVertical );
+ sal_Bool IsVertical() const { return GetEditDoc().IsVertical(); }
- void SetFixedCellHeight( BOOL bUseFixedCellHeight );
- BOOL IsFixedCellHeight() const { return GetEditDoc().IsFixedCellHeight(); }
+ void SetFixedCellHeight( sal_Bool bUseFixedCellHeight );
+ sal_Bool IsFixedCellHeight() const { return GetEditDoc().IsFixedCellHeight(); }
void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ) { eDefaultHorizontalTextDirection = eHTextDir; }
EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const { return eDefaultHorizontalTextDirection; }
- void InitWritingDirections( USHORT nPara );
- BOOL IsRightToLeft( USHORT nPara ) const;
- BYTE GetRightToLeft( USHORT nPara, USHORT nChar, USHORT* pStart = NULL, USHORT* pEnd = NULL );
- BOOL HasDifferentRTLLevels( const ContentNode* pNode );
+ void InitWritingDirections( sal_uInt16 nPara );
+ sal_Bool IsRightToLeft( sal_uInt16 nPara ) const;
+ sal_uInt8 GetRightToLeft( sal_uInt16 nPara, sal_uInt16 nChar, sal_uInt16* pStart = NULL, sal_uInt16* pEnd = NULL );
+ sal_Bool HasDifferentRTLLevels( const ContentNode* pNode );
void SetTextRanger( TextRanger* pRanger );
TextRanger* GetTextRanger() const { return pTextRanger; }
@@ -786,8 +786,8 @@ public:
EditPaM DeleteSelected( EditSelection aEditSelection);
EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput = sal_False );
EditPaM InsertText( EditSelection aCurEditSelection, const String& rStr );
- EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, bool bOverwrite, Window* pFrameWin = NULL );
- EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, BYTE nMode, BYTE nDelMode = DELMODE_SIMPLE );
+ EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, Window* pFrameWin = NULL );
+ EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, sal_uInt8 nMode, sal_uInt8 nDelMode = DELMODE_SIMPLE );
EditPaM InsertParaBreak( EditSelection aEditSelection );
EditPaM InsertLineBreak( EditSelection aEditSelection );
EditPaM InsertTab( EditSelection aEditSelection );
@@ -808,18 +808,18 @@ public:
sal_uInt32 CalcTextHeight();
sal_uInt32 GetTextHeight() const;
- sal_uInt32 CalcTextWidth( BOOL bIgnoreExtraSpace );
- sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace );
+ sal_uInt32 CalcTextWidth( sal_Bool bIgnoreExtraSpace );
+ sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_Bool bIgnoreExtraSpace );
sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const;
sal_uInt16 GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
- void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
- USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
+ void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
sal_uInt16 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine );
sal_uInt32 GetParaHeight( sal_uInt16 nParagraph );
- SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const;
- SfxItemSet GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib = FALSE );
- void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial = 0 );
+ SfxItemSet GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const;
+ SfxItemSet GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttrib = sal_False );
+ void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_uInt8 nSpecial = 0 );
void RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich = 0 );
void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0, sal_Bool bRemoveFeatures = sal_False );
void SetFlatMode( sal_Bool bFlat );
@@ -864,8 +864,8 @@ public:
inline void IdleFormatAndUpdate( EditView* pCurView = 0 );
svtools::ColorConfig& GetColorConfig();
- BOOL IsVisualCursorTravelingEnabled();
- BOOL DoVisualCursorTraveling( const ContentNode* pNode );
+ sal_Bool IsVisualCursorTravelingEnabled();
+ sal_Bool DoVisualCursorTraveling( const ContentNode* pNode );
EditSelection ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 nStartPos, sal_uInt16 nEndPara, sal_uInt16 nEndPos ) const;
inline EPaM CreateEPaM( const EditPaM& rPaM );
@@ -927,7 +927,7 @@ public:
LanguageType GetLanguage( const EditSelection rSelection ) const;
- LanguageType GetLanguage( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const;
+ LanguageType GetLanguage( const EditPaM& rPaM, sal_uInt16* pEndPos = NULL ) const;
::com::sun::star::lang::Locale GetLocale( const EditPaM& rPaM ) const;
void DoOnlineSpelling( ContentNode* pThisNodeOnly = 0, sal_Bool bSpellAtCursorPos = sal_False, sal_Bool bInteruptable = sal_True );
@@ -939,14 +939,14 @@ public:
ImpSpell( EditView* pEditView );
// text conversion functions
- void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc );
+ void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc );
void ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange,
sal_Bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const Font *pTargetFont );
ConvInfo * GetConvInfo() const { return pConvInfo; }
sal_Bool HasConvertibleTextPortion( LanguageType nLang );
void SetLanguageAndFont( const ESelection &rESel,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId );
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId );
// returns true if input sequence checking should be applied
sal_Bool IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const;
@@ -990,9 +990,9 @@ public:
sal_Int32 GetSpaceBeforeAndMinLabelWidth( const ContentNode *pNode, sal_Int32 *pnSpaceBefore = 0, sal_Int32 *pnMinLabelWidth = 0 ) const;
const SvxLRSpaceItem& GetLRSpaceItem( ContentNode* pNode );
- SvxAdjust GetJustification( USHORT nPara ) const;
- SvxCellJustifyMethod GetJustifyMethod( USHORT nPara ) const;
- SvxCellVerJustify GetVerJustification( USHORT nPara ) const;
+ SvxAdjust GetJustification( sal_uInt16 nPara ) const;
+ SvxCellJustifyMethod GetJustifyMethod( sal_uInt16 nPara ) const;
+ SvxCellVerJustify GetVerJustification( sal_uInt16 nPara ) const;
void SetCharStretching( sal_uInt16 nX, sal_uInt16 nY );
inline void GetCharStretching( sal_uInt16& rX, sal_uInt16& rY );
@@ -1010,22 +1010,22 @@ public:
void SetAutoCompleteText( const String& rStr, sal_Bool bUpdateTipWindow );
EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
- short ReplaceTextOnly( ContentNode* pNode, USHORT nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets );
+ short ReplaceTextOnly( ContentNode* pNode, sal_uInt16 nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets );
- void SetAsianCompressionMode( USHORT n );
- USHORT GetAsianCompressionMode() const { return nAsianCompressionMode; }
+ void SetAsianCompressionMode( sal_uInt16 n );
+ sal_uInt16 GetAsianCompressionMode() const { return nAsianCompressionMode; }
- void SetKernAsianPunctuation( BOOL b );
- BOOL IsKernAsianPunctuation() const { return bKernAsianPunctuation; }
+ void SetKernAsianPunctuation( sal_Bool b );
+ sal_Bool IsKernAsianPunctuation() const { return bKernAsianPunctuation; }
- void SetAddExtLeading( BOOL b );
- BOOL IsAddExtLeading() const { return bAddExtLeading; }
+ void SetAddExtLeading( sal_Bool b );
+ sal_Bool IsAddExtLeading() const { return bAddExtLeading; }
- rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const;
+ rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable( sal_Bool bGetInternal = sal_True ) const;
void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
- BOOL mbLastTryMerge;
+ sal_Bool mbLastTryMerge;
/** sets a link that is called at the beginning of a drag operation at an edit view */
void SetBeginDropHdl( const Link& rLink ) { maBeginDropHdl = rLink; }
@@ -1036,8 +1036,8 @@ public:
Link GetEndDropHdl() const { return maEndDropHdl; }
/// specifies if auto-correction should capitalize the first word or not (default is on)
- void SetFirstWordCapitalization( BOOL bCapitalize ) { bFirstWordCapitalization = bCapitalize; }
- BOOL IsFirstWordCapitalization() const { return bFirstWordCapitalization; }
+ void SetFirstWordCapitalization( sal_Bool bCapitalize ) { bFirstWordCapitalization = bCapitalize; }
+ sal_Bool IsFirstWordCapitalization() const { return bFirstWordCapitalization; }
};
inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM )
@@ -1078,7 +1078,7 @@ inline EditSelection ImpEditEngine::CreateSel( const ESelection& rSel )
return aSel;
}
-inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, ULONG nDrawMode )
+inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode )
{
if ( !pVirtDev )
pVirtDev = new VirtualDevice;
@@ -1211,7 +1211,7 @@ inline Cursor* ImpEditView::GetCursor()
void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit );
void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const MapUnit* pSourceUnit = NULL, const MapUnit* pDestUnit = NULL );
-BYTE GetCharTypeForCompression( xub_Unicode cChar );
+sal_uInt8 GetCharTypeForCompression( xub_Unicode cChar );
Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin );
#endif // _IMPEDIT_HXX
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index d557ab9122..3e337f511f 100644..100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -77,9 +77,9 @@
using namespace ::com::sun::star;
-USHORT lcl_CalcExtraSpace( ParaPortion*, const SvxLineSpacingItem& rLSItem )
+sal_uInt16 lcl_CalcExtraSpace( ParaPortion*, const SvxLineSpacingItem& rLSItem )
{
- USHORT nExtra = 0;
+ sal_uInt16 nExtra = 0;
if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
{
nExtra = rLSItem.GetInterLineSpace();
@@ -119,26 +119,26 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
nStretchX = 100;
nStretchY = 100;
- bInSelection = FALSE;
- bOwnerOfRefDev = FALSE;
- bDowning = FALSE;
- bIsInUndo = FALSE;
- bIsFormatting = FALSE;
- bFormatted = FALSE;
- bUpdate = TRUE;
- bUseAutoColor = TRUE;
- bForceAutoColor = FALSE;
- bAddExtLeading = FALSE;
- bUndoEnabled = TRUE;
- bCallParaInsertedOrDeleted = FALSE;
- bImpConvertFirstCall= FALSE;
- bFirstWordCapitalization = TRUE;
+ bInSelection = sal_False;
+ bOwnerOfRefDev = sal_False;
+ bDowning = sal_False;
+ bIsInUndo = sal_False;
+ bIsFormatting = sal_False;
+ bFormatted = sal_False;
+ bUpdate = sal_True;
+ bUseAutoColor = sal_True;
+ bForceAutoColor = sal_False;
+ bAddExtLeading = sal_False;
+ bUndoEnabled = sal_True;
+ bCallParaInsertedOrDeleted = sal_False;
+ bImpConvertFirstCall= sal_False;
+ bFirstWordCapitalization = sal_True;
eDefLanguage = LANGUAGE_DONTKNOW;
maBackgroundColor = COL_AUTO;
nAsianCompressionMode = text::CharacterCompressionType::NONE;
- bKernAsianPunctuation = FALSE;
+ bKernAsianPunctuation = sal_False;
eDefaultHorizontalTextDirection = EE_HTEXTDIR_DEFAULT;
@@ -163,13 +163,13 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
// Access data already from here on!
SetRefDevice( pRefDev );
- InitDoc( FALSE );
+ InitDoc( sal_False );
- bCallParaInsertedOrDeleted = TRUE;
+ bCallParaInsertedOrDeleted = sal_True;
aEditDoc.SetModifyHdl( LINK( this, ImpEditEngine, DocModified ) );
- mbLastTryMerge = FALSE;
+ mbLastTryMerge = sal_False;
}
ImpEditEngine::~ImpEditEngine()
@@ -181,8 +181,8 @@ ImpEditEngine::~ImpEditEngine()
// Destroying templates may otherwise cause unnecessary formatting,
// when a parent template is destroyed.
// And this after the destruction of the data!
- bDowning = TRUE;
- SetUpdateMode( FALSE );
+ bDowning = sal_True;
+ SetUpdateMode( sal_False );
delete pVirtDev;
delete pEmptyItemSet;
@@ -202,12 +202,12 @@ void ImpEditEngine::SetRefDevice( OutputDevice* pRef )
delete pRefDev;
pRefDev = pRef;
- bOwnerOfRefDev = FALSE;
+ bOwnerOfRefDev = sal_False;
if ( !pRef )
pRefDev = EE_DLL()->GetGlobalData()->GetStdRefDevice();
- nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
+ nOnePixelInRef = (sal_uInt16)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
if ( IsFormatted() )
{
@@ -227,10 +227,10 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode )
pRefDev = new VirtualDevice;
pRefDev->SetMapMode( MAP_TWIP );
SetRefDevice( pRefDev );
- bOwnerOfRefDev = TRUE;
+ bOwnerOfRefDev = sal_True;
}
pRefDev->SetMapMode( rMapMode );
- nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
+ nOnePixelInRef = (sal_uInt16)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
if ( IsFormatted() )
{
FormatFullDoc();
@@ -238,13 +238,13 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode )
}
}
-void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs )
+void ImpEditEngine::InitDoc( sal_Bool bKeepParaAttribs )
{
- USHORT nParas = aEditDoc.Count();
- for ( USHORT n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ )
+ sal_uInt16 nParas = aEditDoc.Count();
+ for ( sal_uInt16 n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ )
{
if ( aEditDoc[n]->GetStyleSheet() )
- EndListening( *aEditDoc[n]->GetStyleSheet(), FALSE );
+ EndListening( *aEditDoc[n]->GetStyleSheet(), sal_False );
}
if ( bKeepParaAttribs )
@@ -257,7 +257,7 @@ void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs )
ParaPortion* pIniPortion = new ParaPortion( aEditDoc[0] );
GetParaPortions().Insert( pIniPortion, 0 );
- bFormatted = FALSE;
+ bFormatted = sal_False;
if ( IsCallParaInsertedOrDeleted() )
{
@@ -288,13 +288,13 @@ XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd e
ContentNode* pStartNode = aSel.Min().GetNode();
ContentNode* pEndNode = aSel.Max().GetNode();
- USHORT nStartNode = aEditDoc.GetPos( pStartNode );
- USHORT nEndNode = aEditDoc.GetPos( pEndNode );
+ sal_uInt16 nStartNode = aEditDoc.GetPos( pStartNode );
+ sal_uInt16 nEndNode = aEditDoc.GetPos( pEndNode );
DBG_ASSERT( nStartNode <= nEndNode, "Selection not sorted ?" );
// iterate over the paragraphs ...
- for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
{
DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node not found: GetSelected" );
ContentNode* pNode = aEditDoc.GetObject( nNode );
@@ -313,13 +313,13 @@ XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd e
return aText;
}
-BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView )
+sal_Bool ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView )
{
GetSelEngine().SetCurView( pView );
SetActiveView( pView );
if ( GetAutoCompleteText().Len() )
- SetAutoCompleteText( String(), TRUE );
+ SetAutoCompleteText( String(), sal_True );
GetSelEngine().SelMouseButtonDown( rMEvt );
// Special treatment
@@ -329,18 +329,18 @@ BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView )
if ( rMEvt.GetClicks() == 2 )
{
// So that the SelectionEngine knows about the anchor.
- aSelEngine.CursorPosChanging( TRUE, FALSE );
+ aSelEngine.CursorPosChanging( sal_True, sal_False );
EditSelection aNewSelection( SelectWord( aCurSel ) );
pView->pImpEditView->DrawSelection();
pView->pImpEditView->SetEditSelection( aNewSelection );
pView->pImpEditView->DrawSelection();
- pView->ShowCursor( TRUE, TRUE );
+ pView->ShowCursor( sal_True, sal_True );
}
else if ( rMEvt.GetClicks() == 3 )
{
// So that the SelectionEngine knows about the anchor.
- aSelEngine.CursorPosChanging( TRUE, FALSE );
+ aSelEngine.CursorPosChanging( sal_True, sal_False );
EditSelection aNewSelection( aCurSel );
aNewSelection.Min().SetIndex( 0 );
@@ -348,10 +348,10 @@ BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView )
pView->pImpEditView->DrawSelection();
pView->pImpEditView->SetEditSelection( aNewSelection );
pView->pImpEditView->DrawSelection();
- pView->ShowCursor( TRUE, TRUE );
+ pView->ShowCursor( sal_True, sal_True );
}
}
- return TRUE;
+ return sal_True;
}
void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
@@ -467,7 +467,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
delete mpIMEInfos;
EditPaM aPaM = pView->GetImpEditView()->GetEditSelection().Max();
String aOldTextAfterStartPos = aPaM.GetNode()->Copy( aPaM.GetIndex() );
- USHORT nMax = aOldTextAfterStartPos.Search( CH_FEATURE );
+ sal_uInt16 nMax = aOldTextAfterStartPos.Search( CH_FEATURE );
if ( nMax != STRING_NOTFOUND ) // don't overwrite features!
aOldTextAfterStartPos.Erase( nMax );
mpIMEInfos = new ImplIMEInfos( aPaM, aOldTextAfterStartPos );
@@ -504,7 +504,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() );
pPortion->MarkSelectionInvalid( mpIMEInfos->aPos.GetIndex(), 0 );
- BOOL bWasCursorOverwrite = mpIMEInfos->bWasCursorOverwrite;
+ sal_Bool bWasCursorOverwrite = mpIMEInfos->bWasCursorOverwrite;
delete mpIMEInfos;
mpIMEInfos = NULL;
@@ -532,14 +532,14 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
if ( mpIMEInfos->bWasCursorOverwrite )
{
- USHORT nOldIMETextLen = mpIMEInfos->nLen;
- USHORT nNewIMETextLen = pData->GetText().Len();
+ sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen;
+ sal_uInt16 nNewIMETextLen = pData->GetText().Len();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// restore old characters
- USHORT nRestore = nOldIMETextLen - nNewIMETextLen;
+ sal_uInt16 nRestore = nOldIMETextLen - nNewIMETextLen;
EditPaM aPaM( mpIMEInfos->aPos );
aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen;
ImpInsertText( aPaM, mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ) );
@@ -548,7 +548,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// overwrite
- USHORT nOverwrite = nNewIMETextLen - nOldIMETextLen;
+ sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen;
if ( ( nOldIMETextLen + nOverwrite ) > mpIMEInfos->aOldTextAfterStartPos.Len() )
nOverwrite = mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen;
DBG_ASSERT( nOverwrite && (nOverwrite < 0xFF00), "IME Overwrite?!" );
@@ -596,13 +596,13 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
EditPaM aPaM( pView->pImpEditView->GetEditSelection().Max() );
Rectangle aR1 = PaMtoEditCursor( aPaM, 0 );
- USHORT nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen;
+ sal_uInt16 nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen;
if ( !IsFormatted() )
FormatDoc();
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( GetEditDoc().GetPos( aPaM.GetNode() ) );
- USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True );
+ sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True );
EditLine* pLine = pParaPortion->GetLines().GetObject( nLine );
if ( pLine && ( nInputEnd > pLine->GetEnd() ) )
nInputEnd = pLine->GetEnd();
@@ -655,11 +655,11 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
GetSelEngine().Command( rCEvt );
}
-BOOL ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
+sal_Bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
{
GetSelEngine().SetCurView( pView );
GetSelEngine().SelMouseButtonUp( rMEvt );
- bInSelection = FALSE;
+ bInSelection = sal_False;
// Special treatments
EditSelection aCurSel( pView->pImpEditView->GetEditSelection() );
if ( !aCurSel.HasRange() )
@@ -670,20 +670,20 @@ BOOL ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
if ( pFld )
{
EditPaM aPaM( aCurSel.Max() );
- USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() );
+ sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() );
GetEditEnginePtr()->FieldClicked( *pFld, nPara, aPaM.GetIndex() );
}
}
}
- return TRUE;
+ return sal_True;
}
-BOOL ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView )
+sal_Bool ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView )
{
// MouseMove is called directly after ShowQuickHelp()!
GetSelEngine().SetCurView( pView );
GetSelEngine().SelMouseMove( rMEvt );
- return TRUE;
+ return sal_True;
}
EditPaM ImpEditEngine::InsertText( EditSelection aSel, const XubString& rStr )
@@ -694,7 +694,7 @@ EditPaM ImpEditEngine::InsertText( EditSelection aSel, const XubString& rStr )
EditPaM ImpEditEngine::Clear()
{
- InitDoc( FALSE );
+ InitDoc( sal_False );
EditPaM aPaM = aEditDoc.GetStartPaM();
EditSelection aSel( aPaM );
@@ -703,7 +703,7 @@ EditPaM ImpEditEngine::Clear()
ResetUndoManager();
- for ( USHORT nView = aEditViews.Count(); nView; )
+ for ( sal_uInt16 nView = aEditViews.Count(); nView; )
{
EditView* pView = aEditViews[--nView];
DBG_CHKOBJ( pView, EditView, 0 );
@@ -715,11 +715,11 @@ EditPaM ImpEditEngine::Clear()
EditPaM ImpEditEngine::RemoveText()
{
- InitDoc( TRUE );
+ InitDoc( sal_True );
EditPaM aStartPaM = aEditDoc.GetStartPaM();
EditSelection aEmptySel( aStartPaM, aStartPaM );
- for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
{
EditView* pView = aEditViews.GetObject(nView);
DBG_CHKOBJ( pView, EditView, 0 );
@@ -734,16 +734,16 @@ void ImpEditEngine::SetText( const XubString& rText )
{
// RemoveText deletes the undo list!
EditPaM aStartPaM = RemoveText();
- BOOL bUndoCurrentlyEnabled = IsUndoEnabled();
+ sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled();
// The text inserted manually can not be made reversable by the user
- EnableUndo( FALSE );
+ EnableUndo( sal_False );
EditSelection aEmptySel( aStartPaM, aStartPaM );
EditPaM aPaM = aStartPaM;
if ( rText.Len() )
aPaM = ImpInsertText( aEmptySel, rText );
- for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
{
EditView* pView = aEditViews[nView];
DBG_CHKOBJ( pView, EditView, 0 );
@@ -770,7 +770,7 @@ const SfxItemSet& ImpEditEngine::GetEmptyItemSet()
if ( !pEmptyItemSet )
{
pEmptyItemSet = new SfxItemSet( aEditDoc.GetItemPool(), EE_ITEMS_START, EE_ITEMS_END );
- for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+ for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
{
pEmptyItemSet->ClearItem( nWhich );
}
@@ -790,7 +790,7 @@ void ImpEditEngine::CursorMoved( ContentNode* pPrevNode )
void ImpEditEngine::TextModified()
{
- bFormatted = FALSE;
+ bFormatted = sal_False;
if ( GetNotifyHdl().IsSet() )
{
@@ -805,14 +805,14 @@ void ImpEditEngine::ParaAttribsChanged( ContentNode* pNode )
{
DBG_ASSERT( pNode, "ParaAttribsChanged: Which one?" );
- aEditDoc.SetModified( TRUE );
- bFormatted = FALSE;
+ aEditDoc.SetModified( sal_True );
+ bFormatted = sal_False;
ParaPortion* pPortion = FindParaPortion( pNode );
DBG_ASSERT( pPortion, "ParaAttribsChanged: Portion?" );
pPortion->MarkSelectionInvalid( 0, pNode->Len() );
- USHORT nPara = aEditDoc.GetPos( pNode );
+ sal_uInt16 nPara = aEditDoc.GetPos( pNode );
pEditEngine->ParaAttribsChanged( nPara );
ParaPortion* pNextPortion = GetParaPortions().SaveGetObject( nPara+1 );
@@ -842,8 +842,8 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection );
- BOOL bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? TRUE : FALSE;
- USHORT nCode = aTranslatedKeyEvent.GetKeyCode().GetCode();
+ sal_Bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? sal_True : sal_False;
+ sal_uInt16 nCode = aTranslatedKeyEvent.GetKeyCode().GetCode();
if ( DoVisualCursorTraveling( aPaM.GetNode() ) )
{
@@ -997,16 +997,16 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
return pEditView->pImpEditView->GetEditSelection();
}
-EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, BOOL bStart )
+EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, sal_Bool bStart )
{
EditPaM aPaM( rPaM );
- USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() );
+ sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() );
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False );
+ sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False );
EditLine* pLine = pParaPortion->GetLines().GetObject( nLine );
- BOOL bEmptyLine = pLine->GetStart() == pLine->GetEnd();
+ sal_Bool bEmptyLine = pLine->GetStart() == pLine->GetEnd();
pEditView->pImpEditView->nExtraCursorFlags = 0;
@@ -1022,19 +1022,18 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM&
const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/;
ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.Len(), nBidiLevel, NULL, &nError ); // UChar != sal_Unicode in MinGW
- USHORT nVisPos = bStart ? 0 : aLine.Len()-1;
- USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
+ sal_uInt16 nVisPos = bStart ? 0 : aLine.Len()-1;
+ sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
ubidi_close( pBidi );
aPaM.GetIndex() = nLogPos + pLine->GetStart();
- USHORT nTmp;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, TRUE );
+ sal_uInt16 nTmp;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, sal_True );
TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
- USHORT nRTLLevel = pTextPortion->GetRightToLeft();
-
- BOOL bPortionRTL = nRTLLevel%2 ? TRUE : FALSE;
+ sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft();
+ sal_Bool bPortionRTL = nRTLLevel%2 ? sal_True : sal_False;
if ( bStart )
{
@@ -1054,22 +1053,22 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM&
return aPaM;
}
-EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, USHORT nCharacterIteratorMode, BOOL bVisualToLeft )
+EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, sal_Bool bVisualToLeft )
{
EditPaM aPaM( rPaM );
- USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() );
+ sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() );
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False );
+ sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False );
EditLine* pLine = pParaPortion->GetLines().GetObject( nLine );
- BOOL bEmptyLine = pLine->GetStart() == pLine->GetEnd();
+ sal_Bool bEmptyLine = pLine->GetStart() == pLine->GetEnd();
pEditView->pImpEditView->nExtraCursorFlags = 0;
- BOOL bParaRTL = IsRightToLeft( nPara );
+ sal_Bool bParaRTL = IsRightToLeft( nPara );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( bEmptyLine )
{
@@ -1077,36 +1076,36 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
{
aPaM = CursorUp( aPaM, pEditView );
if ( aPaM != rPaM )
- aPaM = CursorVisualStartEnd( pEditView, aPaM, FALSE );
+ aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_False );
}
else
{
aPaM = CursorDown( aPaM, pEditView );
if ( aPaM != rPaM )
- aPaM = CursorVisualStartEnd( pEditView, aPaM, TRUE );
+ aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_True );
}
- bDone = TRUE;
+ bDone = sal_True;
}
- BOOL bLogicalBackward = bParaRTL ? !bVisualToLeft : bVisualToLeft;
+ sal_Bool bLogicalBackward = bParaRTL ? !bVisualToLeft : bVisualToLeft;
if ( !bDone && pEditView->IsInsertMode() )
{
// Check if we are within a portion and don't have overwrite mode, then it's easy...
- USHORT nPortionStart;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, FALSE );
+ sal_uInt16 nPortionStart;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, sal_False );
TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
- BOOL bPortionBoundary = ( aPaM.GetIndex() == nPortionStart ) || ( aPaM.GetIndex() == (nPortionStart+pTextPortion->GetLen()) );
- USHORT nRTLLevel = pTextPortion->GetRightToLeft();
+ sal_Bool bPortionBoundary = ( aPaM.GetIndex() == nPortionStart ) || ( aPaM.GetIndex() == (nPortionStart+pTextPortion->GetLen()) );
+ sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft();
// Portion boundary doesn't matter if both have same RTL level
- USHORT nRTLLevelNextPortion = 0xFFFF;
+ sal_uInt16 nRTLLevelNextPortion = 0xFFFF;
if ( bPortionBoundary && aPaM.GetIndex() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) )
{
- USHORT nTmp;
- USHORT nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? FALSE : TRUE );
+ sal_uInt16 nTmp;
+ sal_uInt16 nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? sal_False : sal_True );
TextPortion* pNextTextPortion = pParaPortion->GetTextPortions().GetObject( nNextTextPortion );
nRTLLevelNextPortion = pNextTextPortion->GetRightToLeft();
}
@@ -1123,17 +1122,17 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
aPaM = CursorRight( aPaM, nCharacterIteratorMode );
pEditView->pImpEditView->SetCursorBidiLevel( 0 );
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
if ( !bDone )
{
- BOOL bGotoStartOfNextLine = FALSE;
- BOOL bGotoEndOfPrevLine = FALSE;
+ sal_Bool bGotoStartOfNextLine = sal_False;
+ sal_Bool bGotoEndOfPrevLine = sal_False;
String aLine( *aPaM.GetNode(), pLine->GetStart(), pLine->GetEnd() - pLine->GetStart() );
- USHORT nPosInLine = aPaM.GetIndex() - pLine->GetStart();
+ sal_uInt16 nPosInLine = aPaM.GetIndex() - pLine->GetStart();
const sal_Unicode* pLineString = aLine.GetBuffer();
@@ -1145,8 +1144,8 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
if ( !pEditView->IsInsertMode() )
{
- BOOL bEndOfLine = nPosInLine == aLine.Len();
- USHORT nVisPos = (USHORT)ubidi_getVisualIndex( pBidi, !bEndOfLine ? nPosInLine : nPosInLine-1, &nError );
+ sal_Bool bEndOfLine = nPosInLine == aLine.Len();
+ sal_uInt16 nVisPos = (sal_uInt16)ubidi_getVisualIndex( pBidi, !bEndOfLine ? nPosInLine : nPosInLine-1, &nError );
if ( bVisualToLeft )
{
bGotoEndOfPrevLine = nVisPos == 0;
@@ -1162,22 +1161,22 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine )
{
- USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
+ sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
aPaM.GetIndex() = pLine->GetStart() + nLogPos;
pEditView->pImpEditView->SetCursorBidiLevel( 0 );
}
}
else
{
- BOOL bWasBehind = FALSE;
- BOOL bBeforePortion = !nPosInLine || pEditView->pImpEditView->GetCursorBidiLevel() == 1;
+ sal_Bool bWasBehind = sal_False;
+ sal_Bool bBeforePortion = !nPosInLine || pEditView->pImpEditView->GetCursorBidiLevel() == 1;
if ( nPosInLine && ( !bBeforePortion ) ) // before the next portion
- bWasBehind = TRUE; // step one back, otherwise visual will be unusable when rtl portion follows.
+ bWasBehind = sal_True; // step one back, otherwise visual will be unusable when rtl portion follows.
- USHORT nPortionStart;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, bBeforePortion );
+ sal_uInt16 nPortionStart;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, bBeforePortion );
TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
- BOOL bRTLPortion = (pTextPortion->GetRightToLeft() % 2) != 0;
+ sal_Bool bRTLPortion = (pTextPortion->GetRightToLeft() % 2) != 0;
// -1: We are 'behind' the character
long nVisPos = (long)ubidi_getVisualIndex( pBidi, bWasBehind ? nPosInLine-1 : nPosInLine, &nError );
@@ -1197,14 +1196,14 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine )
{
- USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
+ sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
aPaM.GetIndex() = pLine->GetStart() + nLogPos;
// RTL portion, stay visually on the left side.
- USHORT _nPortionStart;
-
- USHORT _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, TRUE );
+ sal_uInt16 _nPortionStart;
+ // sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, !bRTLPortion );
+ sal_uInt16 _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, sal_True );
TextPortion* _pTextPortion = pParaPortion->GetTextPortions().GetObject( _nTextPortion );
if ( bVisualToLeft && !bRTLPortion && ( _pTextPortion->GetRightToLeft() % 2 ) )
aPaM.GetIndex()++;
@@ -1221,20 +1220,20 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
{
aPaM = CursorUp( aPaM, pEditView );
if ( aPaM != rPaM )
- aPaM = CursorVisualStartEnd( pEditView, aPaM, FALSE );
+ aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_False );
}
else if ( bGotoStartOfNextLine )
{
aPaM = CursorDown( aPaM, pEditView );
if ( aPaM != rPaM )
- aPaM = CursorVisualStartEnd( pEditView, aPaM, TRUE );
+ aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_True );
}
}
return aPaM;
}
-EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIteratorMode )
+EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode )
{
EditPaM aCurPaM( rPaM );
EditPaM aNewPaM( aCurPaM );
@@ -1243,7 +1242,7 @@ EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIterato
{
sal_Int32 nCount = 1;
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
- aNewPaM.SetIndex( (USHORT)_xBI->previousCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) );
+ aNewPaM.SetIndex( (sal_uInt16)_xBI->previousCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) );
}
else
{
@@ -1259,7 +1258,7 @@ EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIterato
return aNewPaM;
}
-EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, USHORT nCharacterIteratorMode )
+EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode )
{
EditPaM aCurPaM( rPaM );
EditPaM aNewPaM( aCurPaM );
@@ -1268,7 +1267,7 @@ EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, USHORT nCharacterIterat
{
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
sal_Int32 nCount = 1;
- aNewPaM.SetIndex( (USHORT)_xBI->nextCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) );
+ aNewPaM.SetIndex( (sal_uInt16)_xBI->nextCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) );
}
else
{
@@ -1290,7 +1289,7 @@ EditPaM ImpEditEngine::CursorUp( const EditPaM& rPaM, EditView* pView )
ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() );
DBG_ASSERT( pPPortion, "No matching portion found: CursorUp ");
- USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex() );
EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
long nX;
@@ -1335,7 +1334,7 @@ EditPaM ImpEditEngine::CursorDown( const EditPaM& rPaM, EditView* pView )
ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() );
DBG_ASSERT( pPPortion, "No matching portion found: CursorDown" );
- USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex() );
long nX;
if ( pView->pImpEditView->nTravelXPos == TRAVEL_X_DONTKNOW )
@@ -1379,7 +1378,7 @@ EditPaM ImpEditEngine::CursorStartOfLine( const EditPaM& rPaM )
{
ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() );
DBG_ASSERT( pCurPortion, "No Portion for the PaM ?" );
- USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() );
+ sal_uInt16 nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() );
EditLine* pLine = pCurPortion->GetLines().GetObject(nLine);
DBG_ASSERT( pLine, "Current line not found ?!" );
@@ -1392,7 +1391,7 @@ EditPaM ImpEditEngine::CursorEndOfLine( const EditPaM& rPaM )
{
ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() );
DBG_ASSERT( pCurPortion, "No Portion for the PaM ?" );
- USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() );
+ sal_uInt16 nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() );
EditLine* pLine = pCurPortion->GetLines().GetObject(nLine);
DBG_ASSERT( pLine, "Current line not found ?!" );
@@ -1483,12 +1482,12 @@ EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView )
EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType )
{
- USHORT nCurrentPos = rPaM.GetIndex();
+ sal_uInt16 nCurrentPos = rPaM.GetIndex();
EditPaM aNewPaM( rPaM );
if ( nCurrentPos == 0 )
{
// Previous paragraph...
- USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() );
+ sal_uInt16 nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() );
ContentNode* pPrevNode = aEditDoc.SaveGetObject( --nCurPara );
if ( pPrevNode )
{
@@ -1510,7 +1509,7 @@ EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType )
i18n::Boundary aBoundary = _xBI->getWordBoundary( *aNewPaM.GetNode(), nCurrentPos, aLocale, nWordType, sal_True );
if ( aBoundary.startPos >= nCurrentPos )
aBoundary = _xBI->previousWord( *aNewPaM.GetNode(), nCurrentPos, aLocale, nWordType );
- aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? (USHORT)aBoundary.startPos : 0 );
+ aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? (sal_uInt16)aBoundary.startPos : 0 );
}
return aNewPaM;
@@ -1530,13 +1529,13 @@ EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType )
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
i18n::Boundary aBoundary = _xBI->nextWord( *aNewPaM.GetNode(), aNewPaM.GetIndex(), aLocale, nWordType );
- aNewPaM.SetIndex( (USHORT)aBoundary.startPos );
+ aNewPaM.SetIndex( (sal_uInt16)aBoundary.startPos );
}
// not 'else', maybe the index reached nMax now...
if ( aNewPaM.GetIndex() >= nMax )
{
// Next paragraph ...
- USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() );
+ sal_uInt16 nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() );
ContentNode* pNextNode = aEditDoc.SaveGetObject( ++nCurPara );
if ( pNextNode )
{
@@ -1561,7 +1560,7 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
i18n::Boundary aBoundary = _xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), aLocale, nWordType, sal_True );
- aNewPaM.SetIndex( (USHORT)aBoundary.startPos );
+ aNewPaM.SetIndex( (sal_uInt16)aBoundary.startPos );
return aNewPaM;
}
@@ -1579,11 +1578,11 @@ EditPaM ImpEditEngine::EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
i18n::Boundary aBoundary = _xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), aLocale, nWordType, sal_True );
- aNewPaM.SetIndex( (USHORT)aBoundary.endPos );
+ aNewPaM.SetIndex( (sal_uInt16)aBoundary.endPos );
return aNewPaM;
}
-EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType, BOOL bAcceptStartOfWord )
+EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType, sal_Bool bAcceptStartOfWord )
{
EditSelection aNewSel( rCurSel );
EditPaM aPaM( rCurSel.Max() );
@@ -1605,8 +1604,8 @@ EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16
if ( ( aBoundary.endPos > aPaM.GetIndex() ) &&
( ( aBoundary.startPos < aPaM.GetIndex() ) || ( bAcceptStartOfWord && ( aBoundary.startPos == aPaM.GetIndex() ) ) ) )
{
- aNewSel.Min().SetIndex( (USHORT)aBoundary.startPos );
- aNewSel.Max().SetIndex( (USHORT)aBoundary.endPos );
+ aNewSel.Min().SetIndex( (sal_uInt16)aBoundary.startPos );
+ aNewSel.Max().SetIndex( (sal_uInt16)aBoundary.endPos );
}
}
@@ -1627,8 +1626,8 @@ EditSelection ImpEditEngine::SelectSentence( const EditSelection& rCurSel )
long nEnd = _xBI->endOfSentence( *pNode, rPaM.GetIndex(), GetLocale( rPaM ) );
EditSelection aNewSel( rCurSel );
DBG_ASSERT(nStart < pNode->Len() && nEnd <= pNode->Len(), "sentence indices out of range");
- aNewSel.Min().SetIndex( (USHORT)nStart );
- aNewSel.Max().SetIndex( (USHORT)nEnd );
+ aNewSel.Min().SetIndex( (sal_uInt16)nStart );
+ aNewSel.Max().SetIndex( (sal_uInt16)nEnd );
return aNewSel;
}
@@ -1639,8 +1638,8 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons
pCTLOptions = new SvtCTLOptions;
// get the index that really is first
- USHORT nFirstPos = rCurSel.Min().GetIndex();
- USHORT nMaxPos = rCurSel.Max().GetIndex();
+ sal_uInt16 nFirstPos = rCurSel.Min().GetIndex();
+ sal_uInt16 nMaxPos = rCurSel.Max().GetIndex();
if (nMaxPos < nFirstPos)
nFirstPos = nMaxPos;
@@ -1668,11 +1667,11 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons
-void ImpEditEngine::InitScriptTypes( USHORT nPara )
+void ImpEditEngine::InitScriptTypes( sal_uInt16 nPara )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- rTypes.Remove( 0, rTypes.Count() );
+ rTypes.clear();
ContentNode* pNode = pParaPortion->GetNode();
if ( pNode->Len() )
@@ -1692,7 +1691,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
aText.SetChar( pField->GetStart(), aFldText.getStr()[0] );
short nFldScriptType = _xBI->getScriptType( aFldText, 0 );
- for ( USHORT nCharInField = 1; nCharInField < aFldText.getLength(); nCharInField++ )
+ for ( sal_uInt16 nCharInField = 1; nCharInField < aFldText.getLength(); nCharInField++ )
{
short nTmpType = _xBI->getScriptType( aFldText, nCharInField );
@@ -1717,23 +1716,23 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
}
::rtl::OUString aOUText( aText );
- USHORT nTextLen = (USHORT)aOUText.getLength();
+ sal_uInt16 nTextLen = (sal_uInt16)aOUText.getLength();
sal_Int32 nPos = 0;
short nScriptType = _xBI->getScriptType( aOUText, nPos );
- rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
+ rTypes.push_back( ScriptTypePosInfo( nScriptType, (sal_uInt16)nPos, nTextLen ) );
nPos = _xBI->endOfScript( aOUText, nPos, nScriptType );
while ( ( nPos != (-1) ) && ( nPos < nTextLen ) )
{
- rTypes[rTypes.Count()-1].nEndPos = (USHORT)nPos;
+ rTypes.back().nEndPos = (sal_uInt16)nPos;
nScriptType = _xBI->getScriptType( aOUText, nPos );
long nEndPos = _xBI->endOfScript( aOUText, nPos, nScriptType );
- if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes[rTypes.Count()-1].nScriptType ) )
+ if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes.back().nScriptType ) )
{
// Expand last ScriptTypePosInfo, don't create weak or unecessary portions
- rTypes[rTypes.Count()-1].nEndPos = (USHORT)nEndPos;
+ rTypes.back().nEndPos = (sal_uInt16)nEndPos;
}
else
{
@@ -1744,67 +1743,67 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
case U_ENCLOSING_MARK:
case U_COMBINING_SPACING_MARK:
--nPos;
- rTypes[rTypes.Count()-1].nEndPos--;
+ rTypes.back().nEndPos--;
break;
}
}
- rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
+ rTypes.push_back( ScriptTypePosInfo( nScriptType, (sal_uInt16)nPos, nTextLen ) );
}
nPos = nEndPos;
}
if ( rTypes[0].nScriptType == i18n::ScriptType::WEAK )
- rTypes[0].nScriptType = ( rTypes.Count() > 1 ) ? rTypes[1].nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
+ rTypes[0].nScriptType = ( rTypes.size() > 1 ) ? rTypes[1].nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
// create writing direction information:
- if ( !pParaPortion->aWritingDirectionInfos.Count() )
+ if ( pParaPortion->aWritingDirectionInfos.empty() )
InitWritingDirections( nPara );
// i89825: Use CTL font for numbers embedded into an RTL run:
WritingDirectionInfos& rDirInfos = pParaPortion->aWritingDirectionInfos;
- for ( USHORT n = 0; n < rDirInfos.Count(); ++n )
+ for ( size_t n = 0; n < rDirInfos.size(); ++n )
{
const xub_StrLen nStart = rDirInfos[n].nStartPos;
const xub_StrLen nEnd = rDirInfos[n].nEndPos;
- const BYTE nCurrDirType = rDirInfos[n].nType;
+ const sal_uInt8 nCurrDirType = rDirInfos[n].nType;
if ( nCurrDirType % 2 == UBIDI_RTL || // text in RTL run
( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( aText, nStart, nEnd ) ) ) // non-strong text in embedded LTR run
{
- USHORT nIdx = 0;
+ size_t nIdx = 0;
// Skip entries in ScriptArray which are not inside the RTL run:
- while ( nIdx < rTypes.Count() && rTypes[nIdx].nStartPos < nStart )
+ while ( nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart )
++nIdx;
// Remove any entries *inside* the current run:
- while ( nIdx < rTypes.Count() && rTypes[nIdx].nEndPos <= nEnd )
- rTypes.Remove( nIdx );
+ while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd )
+ rTypes.erase( rTypes.begin()+nIdx );
// special case:
- if(nIdx < rTypes.Count() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd)
+ if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd)
{
- rTypes.Insert( ScriptTypePosInfo( rTypes[nIdx].nScriptType, (USHORT)nEnd, rTypes[nIdx].nEndPos ), nIdx );
+ rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( rTypes[nIdx].nScriptType, (sal_uInt16)nEnd, rTypes[nIdx].nEndPos ) );
rTypes[nIdx].nEndPos = nStart;
}
if( nIdx )
rTypes[nIdx - 1].nEndPos = nStart;
- rTypes.Insert( ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (USHORT)nStart, (USHORT)nEnd), nIdx );
+ rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (sal_uInt16)nStart, (sal_uInt16)nEnd) );
++nIdx;
- if( nIdx < rTypes.Count() )
+ if( nIdx < rTypes.size() )
rTypes[nIdx].nStartPos = nEnd;
}
}
#if OSL_DEBUG_LEVEL > 1
- USHORT nDebugStt = 0;
- USHORT nDebugEnd = 0;
+ sal_uInt16 nDebugStt = 0;
+ sal_uInt16 nDebugEnd = 0;
short nDebugType = 0;
- for ( USHORT n = 0; n < rTypes.Count(); ++n )
+ for ( size_t n = 0; n < rTypes.size(); ++n )
{
nDebugStt = rTypes[n].nStartPos;
nDebugEnd = rTypes[n].nEndPos;
@@ -1814,23 +1813,23 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
}
}
-USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) const
+sal_uInt16 ImpEditEngine::GetScriptType( const EditPaM& rPaM, sal_uInt16* pEndPos ) const
{
- USHORT nScriptType = 0;
+ sal_uInt16 nScriptType = 0;
if ( pEndPos )
*pEndPos = rPaM.GetNode()->Len();
if ( rPaM.GetNode()->Len() )
{
- USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() );
+ sal_uInt16 nPara = GetEditDoc().GetPos( rPaM.GetNode() );
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- USHORT nPos = rPaM.GetIndex();
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ sal_uInt16 nPos = rPaM.GetIndex();
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if ( ( rTypes[n].nStartPos <= nPos ) && ( rTypes[n].nEndPos >= nPos ) )
{
@@ -1844,20 +1843,20 @@ USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) cons
return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
}
-USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const
+sal_uInt16 ImpEditEngine::GetScriptType( const EditSelection& rSel ) const
{
EditSelection aSel( rSel );
aSel.Adjust( aEditDoc );
short nScriptType = 0;
- USHORT nStartPara = GetEditDoc().GetPos( aSel.Min().GetNode() );
- USHORT nEndPara = GetEditDoc().GetPos( aSel.Max().GetNode() );
+ sal_uInt16 nStartPara = GetEditDoc().GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndPara = GetEditDoc().GetPos( aSel.Max().GetNode() );
- for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
@@ -1865,9 +1864,9 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const
// find the first(!) script type position that holds the
// complete selection. Thus it will work for selections as
// well as with just moving the cursor from char to char.
- USHORT nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0;
- USHORT nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len();
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ sal_uInt16 nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0;
+ sal_uInt16 nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len();
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if (rTypes[n].nStartPos <= nS && nE <= rTypes[n].nEndPos)
{
@@ -1890,24 +1889,24 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const
return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
}
-BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const
+sal_Bool ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const
{
- BOOL bScriptChange = FALSE;
+ sal_Bool bScriptChange = sal_False;
if ( rPaM.GetNode()->Len() )
{
- USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() );
+ sal_uInt16 nPara = GetEditDoc().GetPos( rPaM.GetNode() );
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- USHORT nPos = rPaM.GetIndex();
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ sal_uInt16 nPos = rPaM.GetIndex();
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if ( rTypes[n].nStartPos == nPos )
{
- bScriptChange = TRUE;
+ bScriptChange = sal_True;
break;
}
}
@@ -1915,36 +1914,36 @@ BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const
return bScriptChange;
}
-BOOL ImpEditEngine::HasScriptType( USHORT nPara, USHORT nType ) const
+sal_Bool ImpEditEngine::HasScriptType( sal_uInt16 nPara, sal_uInt16 nType ) const
{
- BOOL bTypeFound = FALSE;
+ sal_Bool bTypeFound = sal_False;
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- for ( USHORT n = rTypes.Count(); n && !bTypeFound; )
+ for ( size_t n = rTypes.size(); n && !bTypeFound; )
{
if ( rTypes[--n].nScriptType == nType )
- bTypeFound = TRUE;
+ bTypeFound = sal_True;
}
return bTypeFound;
}
-void ImpEditEngine::InitWritingDirections( USHORT nPara )
+void ImpEditEngine::InitWritingDirections( sal_uInt16 nPara )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
WritingDirectionInfos& rInfos = pParaPortion->aWritingDirectionInfos;
- rInfos.Remove( 0, rInfos.Count() );
+ rInfos.clear();
- BOOL bCTL = FALSE;
+ sal_Bool bCTL = sal_False;
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if ( rTypes[n].nScriptType == i18n::ScriptType::COMPLEX )
{
- bCTL = TRUE;
+ bCTL = sal_True;
break;
}
}
@@ -1965,16 +1964,16 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara )
ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.GetBuffer()), aText.Len(), nBidiLevel, NULL, &nError ); // UChar != sal_Unicode in MinGW
nError = U_ZERO_ERROR;
- long nCount = ubidi_countRuns( pBidi, &nError );
+ size_t nCount = ubidi_countRuns( pBidi, &nError );
int32_t nStart = 0;
int32_t nEnd;
UBiDiLevel nCurrDir;
- for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
+ for ( size_t nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- rInfos.Insert( WritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ), rInfos.Count() );
+ rInfos.push_back( WritingDirectionInfo( nCurrDir, (sal_uInt16)nStart, (sal_uInt16)nEnd ) );
nStart = nEnd;
}
@@ -1982,14 +1981,14 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara )
}
// No infos mean no CTL and default dir is L2R...
- if ( !rInfos.Count() )
- rInfos.Insert( WritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->Len() ), rInfos.Count() );
+ if ( rInfos.empty() )
+ rInfos.push_back( WritingDirectionInfo( 0, 0, (sal_uInt16)pParaPortion->GetNode()->Len() ) );
}
-BOOL ImpEditEngine::IsRightToLeft( USHORT nPara ) const
+sal_Bool ImpEditEngine::IsRightToLeft( sal_uInt16 nPara ) const
{
- BOOL bR2L = FALSE;
+ sal_Bool bR2L = sal_False;
const SvxFrameDirectionItem* pFrameDirItem = NULL;
if ( !IsVertical() )
@@ -2017,20 +2016,20 @@ BOOL ImpEditEngine::IsRightToLeft( USHORT nPara ) const
return bR2L;
}
-BOOL ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode )
+sal_Bool ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode )
{
- USHORT nPara = GetEditDoc().GetPos( (ContentNode*)pNode );
+ sal_uInt16 nPara = GetEditDoc().GetPos( (ContentNode*)pNode );
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- BOOL bHasDifferentRTLLevels = FALSE;
+ sal_Bool bHasDifferentRTLLevels = sal_False;
- USHORT nRTLLevel = IsRightToLeft( nPara ) ? 1 : 0;
- for ( USHORT n = 0; n < pParaPortion->GetTextPortions().Count(); n++ )
+ sal_uInt16 nRTLLevel = IsRightToLeft( nPara ) ? 1 : 0;
+ for ( sal_uInt16 n = 0; n < pParaPortion->GetTextPortions().Count(); n++ )
{
TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( n );
if ( pTextPortion->GetRightToLeft() != nRTLLevel )
{
- bHasDifferentRTLLevels = TRUE;
+ bHasDifferentRTLLevels = sal_True;
break;
}
}
@@ -2038,19 +2037,19 @@ BOOL ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode )
}
-BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, USHORT* pEnd )
+sal_uInt8 ImpEditEngine::GetRightToLeft( sal_uInt16 nPara, sal_uInt16 nPos, sal_uInt16* pStart, sal_uInt16* pEnd )
{
- BYTE nRightToLeft = 0;
+ sal_uInt8 nRightToLeft = 0;
ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
if ( pNode && pNode->Len() )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aWritingDirectionInfos.Count() )
+ if ( pParaPortion->aWritingDirectionInfos.empty() )
InitWritingDirections( nPara );
WritingDirectionInfos& rDirInfos = pParaPortion->aWritingDirectionInfos;
- for ( USHORT n = 0; n < rDirInfos.Count(); n++ )
+ for ( size_t n = 0; n < rDirInfos.size(); n++ )
{
if ( ( rDirInfos[n].nStartPos <= nPos ) && ( rDirInfos[n].nEndPos >= nPos ) )
{
@@ -2066,7 +2065,7 @@ BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, U
return nRightToLeft;
}
-SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const
+SvxAdjust ImpEditEngine::GetJustification( sal_uInt16 nPara ) const
{
SvxAdjust eJustification = SVX_ADJUST_LEFT;
@@ -2085,14 +2084,14 @@ SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const
return eJustification;
}
-SvxCellJustifyMethod ImpEditEngine::GetJustifyMethod( USHORT nPara ) const
+SvxCellJustifyMethod ImpEditEngine::GetJustifyMethod( sal_uInt16 nPara ) const
{
const SvxJustifyMethodItem& rItem = static_cast<const SvxJustifyMethodItem&>(
GetParaAttrib(nPara, EE_PARA_JUST_METHOD));
return static_cast<SvxCellJustifyMethod>(rItem.GetEnumValue());
}
-SvxCellVerJustify ImpEditEngine::GetVerJustification( USHORT nPara ) const
+SvxCellVerJustify ImpEditEngine::GetVerJustification( sal_uInt16 nPara ) const
{
const SvxVerJustifyItem& rItem = static_cast<const SvxVerJustifyItem&>(
GetParaAttrib(nPara, EE_PARA_VER_JUST));
@@ -2103,18 +2102,17 @@ SvxCellVerJustify ImpEditEngine::GetVerJustification( USHORT nPara ) const
// Text changes
// ----------------------------------------------------------------------
-void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndoRemoveChars* pCurUndo )
+void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, EditUndoRemoveChars* pCurUndo )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
XubString aStr( rPaM.GetNode()->Copy( rPaM.GetIndex(), nChars ) );
// Check whether attributes are deleted or changed:
- USHORT nStart = rPaM.GetIndex();
- USHORT nEnd = nStart + nChars;
+ sal_uInt16 nStart = rPaM.GetIndex();
+ sal_uInt16 nEnd = nStart + nChars;
CharAttribArray& rAttribs = rPaM.GetNode()->GetCharAttribs().GetAttribs();
-
- for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
{
EditCharAttrib* pAttr = rAttribs[nAttr];
if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) )
@@ -2136,10 +2134,10 @@ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndo
TextModified();
}
-EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNewPos )
+EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_uInt16 nNewPos )
{
aOldPositions.Justify();
- BOOL bValidAction = ( (long)nNewPos < aOldPositions.Min() ) || ( (long)nNewPos > aOldPositions.Max() );
+ sal_Bool bValidAction = ( (long)nNewPos < aOldPositions.Min() ) || ( (long)nNewPos > aOldPositions.Max() );
DBG_ASSERT( bValidAction, "Move in itself?" );
DBG_ASSERT( aOldPositions.Max() <= (long)GetParaPortions().Count(), "totally over it: MoveParagraphs" );
@@ -2151,7 +2149,7 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew
return aSelection;
}
- ULONG nParaCount = GetParaPortions().Count();
+ sal_uLong nParaCount = GetParaPortions().Count();
if ( nNewPos >= nParaCount )
nNewPos = GetParaPortions().Count();
@@ -2165,28 +2163,28 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew
if ( nNewPos == 0 ) // Move to Start
{
pRecalc1 = GetParaPortions().GetObject( 0 );
- pRecalc2 = GetParaPortions().GetObject( (USHORT)aOldPositions.Min() );
+ pRecalc2 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Min() );
}
else if ( nNewPos == nParaCount )
{
- pRecalc1 = GetParaPortions().GetObject( (USHORT)(nParaCount-1) );
- pRecalc2 = GetParaPortions().GetObject( (USHORT)aOldPositions.Max() );
+ pRecalc1 = GetParaPortions().GetObject( (sal_uInt16)(nParaCount-1) );
+ pRecalc2 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Max() );
}
if ( aOldPositions.Min() == 0 ) // Move from Start
{
pRecalc3 = GetParaPortions().GetObject( 0 );
pRecalc4 = GetParaPortions().GetObject(
- sal::static_int_cast< USHORT >( aOldPositions.Max()+1 ) );
+ sal::static_int_cast< sal_uInt16 >( aOldPositions.Max()+1 ) );
}
- else if ( (USHORT)aOldPositions.Max() == (nParaCount-1) )
+ else if ( (sal_uInt16)aOldPositions.Max() == (nParaCount-1) )
{
- pRecalc3 = GetParaPortions().GetObject( (USHORT)aOldPositions.Max() );
- pRecalc4 = GetParaPortions().GetObject( (USHORT)(aOldPositions.Min()-1) );
+ pRecalc3 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Max() );
+ pRecalc4 = GetParaPortions().GetObject( (sal_uInt16)(aOldPositions.Min()-1) );
}
- MoveParagraphsInfo aMoveParagraphsInfo( sal::static_int_cast< USHORT >(aOldPositions.Min()), sal::static_int_cast< USHORT >(aOldPositions.Max()), nNewPos );
+ MoveParagraphsInfo aMoveParagraphsInfo( sal::static_int_cast< sal_uInt16 >(aOldPositions.Min()), sal::static_int_cast< sal_uInt16 >(aOldPositions.Max()), nNewPos );
aBeginMovingParagraphsHdl.Call( &aMoveParagraphsInfo );
if ( IsUndoEnabled() && !IsInUndo())
@@ -2196,20 +2194,20 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew
ParaPortion* pDestPortion = GetParaPortions().SaveGetObject( nNewPos );
ParaPortionList aTmpPortionList;
- USHORT i;
- for ( i = (USHORT)aOldPositions.Min(); i <= (USHORT)aOldPositions.Max(); i++ )
+ sal_uInt16 i;
+ for ( i = (sal_uInt16)aOldPositions.Min(); i <= (sal_uInt16)aOldPositions.Max(); i++ )
{
// always aOldPositions.Min(), since Remove().
- ParaPortion* pTmpPortion = GetParaPortions().GetObject( (USHORT)aOldPositions.Min() );
- GetParaPortions().Remove( (USHORT)aOldPositions.Min() );
- aEditDoc.Remove( (USHORT)aOldPositions.Min() );
+ ParaPortion* pTmpPortion = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Min() );
+ GetParaPortions().Remove( (sal_uInt16)aOldPositions.Min() );
+ aEditDoc.Remove( (sal_uInt16)aOldPositions.Min() );
aTmpPortionList.Insert( pTmpPortion, aTmpPortionList.Count() );
}
- USHORT nRealNewPos = pDestPortion ? GetParaPortions().GetPos( pDestPortion ) : GetParaPortions().Count();
+ sal_uInt16 nRealNewPos = pDestPortion ? GetParaPortions().GetPos( pDestPortion ) : GetParaPortions().Count();
DBG_ASSERT( nRealNewPos != USHRT_MAX, "ImpMoveParagraphs: Invalid Position!" );
- for ( i = 0; i < (USHORT)aTmpPortionList.Count(); i++ )
+ for ( i = 0; i < (sal_uInt16)aTmpPortionList.Count(); i++ )
{
ParaPortion* pTmpPortion = aTmpPortionList.GetObject( i );
if ( i == 0 )
@@ -2231,12 +2229,12 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew
EENotify aNotify( EE_NOTIFY_PARAGRAPHSMOVED );
aNotify.pEditEngine = GetEditEnginePtr();
aNotify.nParagraph = nNewPos;
- aNotify.nParam1 = sal::static_int_cast< USHORT >(aOldPositions.Min());
- aNotify.nParam2 = sal::static_int_cast< USHORT >(aOldPositions.Max());
+ aNotify.nParam1 = sal::static_int_cast< sal_uInt16 >(aOldPositions.Min());
+ aNotify.nParam2 = sal::static_int_cast< sal_uInt16 >(aOldPositions.Max());
CallNotify( aNotify );
}
- aEditDoc.SetModified( TRUE );
+ aEditDoc.SetModified( sal_True );
if ( pRecalc1 )
CalcHeight( pRecalc1 );
@@ -2256,14 +2254,14 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew
}
-EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, BOOL bBackward )
+EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, sal_Bool bBackward )
{
DBG_ASSERT( pLeft != pRight, "Join together the same paragraph ?" );
DBG_ASSERT( aEditDoc.GetPos( pLeft ) != USHRT_MAX, "Inserted node not found (1)" );
DBG_ASSERT( aEditDoc.GetPos( pRight ) != USHRT_MAX, "Inserted node not found (2)" );
- USHORT nParagraphTobeDeleted = aEditDoc.GetPos( pRight );
- DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pRight, nParagraphTobeDeleted );
+ sal_uInt16 nParagraphTobeDeleted = aEditDoc.GetPos( pRight );
+ DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pRight, nParagraphTobeDeleted );
aDeletedNodes.Insert( pInf, aDeletedNodes.Count() );
GetEditEnginePtr()->ParagraphConnected( aEditDoc.GetPos( pLeft ), aEditDoc.GetPos( pRight ) );
@@ -2278,7 +2276,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
if ( bBackward )
{
- pLeft->SetStyleSheet( pRight->GetStyleSheet(), TRUE );
+ pLeft->SetStyleSheet( pRight->GetStyleSheet(), sal_True );
pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() );
pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont();
}
@@ -2299,8 +2297,8 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
pLeft->GetWrongList()->ClearWrongs( nInv, 0xFFFF, pLeft ); // Possibly remove one
pLeft->GetWrongList()->MarkInvalid( nInv, nEnd+1 );
// Take over misspelled words
- USHORT nRWrongs = pRight->GetWrongList()->Count();
- for ( USHORT nW = 0; nW < nRWrongs; nW++ )
+ sal_uInt16 nRWrongs = pRight->GetWrongList()->Count();
+ for ( sal_uInt16 nW = 0; nW < nRWrongs; nW++ )
{
WrongRange aWrong = pRight->GetWrongList()->GetObject( nW );
if ( aWrong.nStart != 0 ) // Not a subsequent
@@ -2327,7 +2325,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
// By joining together the two, the left is although reformatted,
// however if its height does not change then the formatting receives
// the change of the total text hight too late...
- for ( USHORT n = nParagraphTobeDeleted; n < GetParaPortions().Count(); n++ )
+ for ( sal_uInt16 n = nParagraphTobeDeleted; n < GetParaPortions().Count(); n++ )
{
ParaPortion* pPP = GetParaPortions().GetObject( n );
pPP->MarkSelectionInvalid( 0, pPP->GetNode()->Len() );
@@ -2340,7 +2338,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
return aPaM;
}
-EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, BYTE nMode, BYTE nDelMode )
+EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, sal_uInt8 nMode, sal_uInt8 nDelMode )
{
DBG_ASSERT( !EditSelection( rSel ).DbgIsBuggy( aEditDoc ), "Index out of range in DeleteLeftOrRight" );
@@ -2417,10 +2415,10 @@ EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, BYTE nMode,
return ImpDeleteSelection( EditSelection( aDelStart, aDelEnd ) );
// Decide now if to delete selection (RESTOFCONTENTS)
- BOOL bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) )
- ? TRUE : FALSE;
+ sal_Bool bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) )
+ ? sal_True : sal_False;
if ( aStatus.IsAnyOutliner() )
- bSpecialBackward = FALSE;
+ bSpecialBackward = sal_False;
return ImpConnectParagraphs( aDelStart.GetNode(), aDelEnd.GetNode(), bSpecialBackward );
}
@@ -2440,14 +2438,14 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel )
DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index out of range in ImpDeleteSelection" );
DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index out of range in ImpDeleteSelection" );
- USHORT nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() );
- USHORT nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() );
+ sal_uInt16 nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() );
+ sal_uInt16 nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() );
DBG_ASSERT( nEndNode != USHRT_MAX, "Start > End ?!" );
DBG_ASSERT( nStartNode <= nEndNode, "Start > End ?!" );
// Remove all nodes in between ....
- for ( ULONG z = nStartNode+1; z < nEndNode; z++ )
+ for ( sal_uLong z = nStartNode+1; z < nEndNode; z++ )
{
// Always nStartNode+1, due to Remove()!
ImpRemoveParagraph( nStartNode+1 );
@@ -2456,7 +2454,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel )
if ( aStartPaM.GetNode() != aEndPaM.GetNode() )
{
// The Rest of the StartNodes...
- USHORT nChars;
+ sal_uInt16 nChars;
nChars = aStartPaM.GetNode()->Len() - aStartPaM.GetIndex();
ImpRemoveChars( aStartPaM, nChars );
ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() );
@@ -2475,7 +2473,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel )
}
else
{
- USHORT nChars;
+ sal_uInt16 nChars;
nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex();
ImpRemoveChars( aStartPaM, nChars );
ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() );
@@ -2488,7 +2486,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel )
return aStartPaM;
}
-void ImpEditEngine::ImpRemoveParagraph( USHORT nPara )
+void ImpEditEngine::ImpRemoveParagraph( sal_uInt16 nPara )
{
ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
ContentNode* pNextNode = aEditDoc.SaveGetObject( nPara+1 );
@@ -2497,7 +2495,7 @@ void ImpEditEngine::ImpRemoveParagraph( USHORT nPara )
DBG_ASSERT( pNode, "Blind Node in ImpRemoveParagraph" );
DBG_ASSERT( pPortion, "Blind Portion in ImpRemoveParagraph(2)" );
- DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pNode, nPara );
+ DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pNode, nPara );
aDeletedNodes.Insert( pInf, aDeletedNodes.Count() );
// The node is managed by the undo and possibly destroyed!
@@ -2522,13 +2520,13 @@ void ImpEditEngine::ImpRemoveParagraph( USHORT nPara )
{
aEditDoc.RemoveItemsFromPool( pNode );
if ( pNode->GetStyleSheet() )
- EndListening( *pNode->GetStyleSheet(), FALSE );
+ EndListening( *pNode->GetStyleSheet(), sal_False );
delete pNode;
}
}
EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
- bool bOverwrite, Window* pFrameWin )
+ sal_Bool bOverwrite, Window* pFrameWin )
{
EditSelection aSel( rCurSel );
SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
@@ -2539,8 +2537,8 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
// #i78661 allow application to turn off capitalization of
// start sentence explicitly.
- // (This is done by setting IsFirstWordCapitalization to FALSE.)
- BOOL bOldCptlSttSntnc = pAutoCorrect->IsAutoCorrFlag( CptlSttSntnc );
+ // (This is done by setting IsFirstWordCapitalization to sal_False.)
+ sal_Bool bOldCptlSttSntnc = pAutoCorrect->IsAutoCorrFlag( CptlSttSntnc );
if (!IsFirstWordCapitalization())
{
ESelection aESel( CreateESel(aSel) );
@@ -2566,7 +2564,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
EditPaM aRight2Word( WordRight( aFirstWordSel.Max(), 1 ) );
aSecondWordSel = SelectWord( EditSelection( aRight2Word ) );
}
- BOOL bIsFirstWordInFirstPara = aESel.nEndPara == 0 &&
+ sal_Bool bIsFirstWordInFirstPara = aESel.nEndPara == 0 &&
aFirstWordSel.Max().GetIndex() <= aSel.Max().GetIndex() &&
aSel.Max().GetIndex() <= aSecondWordSel.Min().GetIndex();
@@ -2575,7 +2573,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
}
ContentNode* pNode = aSel.Max().GetNode();
- USHORT nIndex = aSel.Max().GetIndex();
+ sal_uInt16 nIndex = aSel.Max().GetIndex();
EdtAutoCorrDoc aAuto( this, pNode, nIndex, c );
pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite, pFrameWin );
aSel.Max().SetIndex( aAuto.GetCursor() );
@@ -2589,17 +2587,17 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel,
- xub_Unicode c, BOOL bOverwrite, sal_Bool bIsUserInput )
+ xub_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput )
{
DBG_ASSERT( c != '\t', "Tab for InsertText ?" );
DBG_ASSERT( c != '\n', "Word wrapping for InsertText ?");
EditPaM aPaM( rCurSel.Min() );
- BOOL bDoOverwrite = ( bOverwrite &&
- ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? TRUE : FALSE;
+ sal_Bool bDoOverwrite = ( bOverwrite &&
+ ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? sal_True : sal_False;
- BOOL bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
+ sal_Bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
if ( bUndoAction )
UndoActionStart( EDITUNDO_INSERT );
@@ -2653,7 +2651,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel,
String aChgText( aNewText.copy( nChgPos ), nChgLen );
// select text from first pos to be changed to current pos
- EditSelection aSel( EditPaM( aPaM.GetNode(), (USHORT) nChgPos ), aPaM );
+ EditSelection aSel( EditPaM( aPaM.GetNode(), (sal_uInt16) nChgPos ), aPaM );
if (aChgText.Len())
return InsertText( aSel, aChgText ); // implicitly handles undo
@@ -2674,7 +2672,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel,
if ( IsUndoEnabled() && !IsInUndo() )
{
EditUndoInsertChars* pNewUndo = new EditUndoInsertChars( this, CreateEPaM( aPaM ), c );
- BOOL bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? TRUE : FALSE;
+ sal_Bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False;
InsertUndo( pNewUndo, bTryMerge );
}
@@ -2718,10 +2716,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
// Token LINE_SEP query,
// since the MAC-Compiler makes something else from \n !
- USHORT nStart = 0;
+ sal_uInt16 nStart = 0;
while ( nStart < aText.Len() )
{
- USHORT nEnd = aText.Search( LINE_SEP, nStart );
+ sal_uInt16 nEnd = aText.Search( LINE_SEP, nStart );
if ( nEnd == STRING_NOTFOUND )
nEnd = aText.Len(); // not dereference!
@@ -2732,7 +2730,7 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
xub_StrLen nChars = aPaM.GetNode()->Len() + aLine.Len();
if ( nChars > MAXCHARSINPARA )
{
- USHORT nMaxNewChars = MAXCHARSINPARA-aPaM.GetNode()->Len();
+ sal_uInt16 nMaxNewChars = MAXCHARSINPARA-aPaM.GetNode()->Len();
nEnd -= ( aLine.Len() - nMaxNewChars ); // Then the characters end up in the next paragraph.
aLine.Erase( nMaxNewChars ); // Delete the Rest...
}
@@ -2743,10 +2741,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
aPaM = aEditDoc.InsertText( aPaM, aLine );
else
{
- USHORT nStart2 = 0;
+ sal_uInt16 nStart2 = 0;
while ( nStart2 < aLine.Len() )
{
- USHORT nEnd2 = aLine.Search( '\t', nStart2 );
+ sal_uInt16 nEnd2 = aLine.Search( '\t', nStart2 );
if ( nEnd2 == STRING_NOTFOUND )
nEnd2 = aLine.Len(); // not dereference!
@@ -2827,7 +2825,7 @@ EditPaM ImpEditEngine::ImpInsertFeature( EditSelection aCurSel, const SfxPoolIte
return aPaM;
}
-EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bKeepEndingAttribs )
+EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, sal_Bool bKeepEndingAttribs )
{
EditPaM aPaM;
if ( rCurSel.HasRange() )
@@ -2838,7 +2836,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bK
return ImpInsertParaBreak( aPaM, bKeepEndingAttribs );
}
-EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEndingAttribs )
+EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, sal_Bool bKeepEndingAttribs )
{
if ( aEditDoc.Count() >= 0xFFFE )
{
@@ -2858,8 +2856,8 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding
WrongList* pLWrongs = rPaM.GetNode()->GetWrongList();
WrongList* pRWrongs = aPaM.GetNode()->GetWrongList();
// take over misspelled words:
- USHORT nLWrongs = pLWrongs->Count();
- for ( USHORT nW = 0; nW < nLWrongs; nW++ )
+ sal_uInt16 nLWrongs = pLWrongs->Count();
+ for ( sal_uInt16 nW = 0; nW < nLWrongs; nW++ )
{
WrongRange& rWrong = pLWrongs->GetObject( nW );
// Correct only if really a word gets overlapped in the process of
@@ -2874,7 +2872,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding
else if ( ( rWrong.nStart < nEnd ) && ( rWrong.nEnd > nEnd ) )
rWrong.nEnd = nEnd;
}
- USHORT nInv = nEnd ? nEnd-1 : nEnd;
+ sal_uInt16 nInv = nEnd ? nEnd-1 : nEnd;
if ( nEnd )
pLWrongs->MarkInvalid( nInv, nEnd );
else
@@ -2889,7 +2887,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding
// Optimization: Do not place unnecessarily many getPos to Listen!
// Here, as in undo, but also in all other methods.
- USHORT nPos = GetParaPortions().GetPos( pPortion );
+ sal_uInt16 nPos = GetParaPortions().GetPos( pPortion );
ParaPortion* pNewPortion = new ParaPortion( aPaM.GetNode() );
GetParaPortions().Insert( pNewPortion, nPos + 1 );
ParaAttribsChanged( pNewPortion->GetNode() );
@@ -2901,7 +2899,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding
return aPaM;
}
-EditPaM ImpEditEngine::ImpFastInsertParagraph( USHORT nPara )
+EditPaM ImpEditEngine::ImpFastInsertParagraph( sal_uInt16 nPara )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@@ -2936,10 +2934,10 @@ EditPaM ImpEditEngine::InsertParaBreak( EditSelection aCurSel )
EditPaM aPaM( ImpInsertParaBreak( aCurSel ) );
if ( aStatus.DoAutoIndenting() )
{
- USHORT nPara = aEditDoc.GetPos( aPaM.GetNode() );
+ sal_uInt16 nPara = aEditDoc.GetPos( aPaM.GetNode() );
DBG_ASSERT( nPara > 0, "AutoIndenting: Error!" );
XubString aPrevParaText( GetEditDoc().GetParaAsString( nPara-1 ) );
- USHORT n = 0;
+ sal_uInt16 n = 0;
while ( ( n < aPrevParaText.Len() ) &&
( ( aPrevParaText.GetChar(n) == ' ' ) || ( aPrevParaText.GetChar(n) == '\t' ) ) )
{
@@ -2966,17 +2964,17 @@ EditPaM ImpEditEngine::InsertField( EditSelection aCurSel, const SvxFieldItem& r
return aPaM;
}
-BOOL ImpEditEngine::UpdateFields()
+sal_Bool ImpEditEngine::UpdateFields()
{
- BOOL bChanges = FALSE;
- USHORT nParas = GetEditDoc().Count();
- for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+ sal_Bool bChanges = sal_False;
+ sal_uInt16 nParas = GetEditDoc().Count();
+ for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ )
{
- BOOL bChangesInPara = FALSE;
+ sal_Bool bChangesInPara = sal_False;
ContentNode* pNode = GetEditDoc().GetObject( nPara );
DBG_ASSERT( pNode, "NULL-Pointer in Doc" );
CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
- for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
{
EditCharAttrib* pAttr = rAttribs[nAttr];
if ( pAttr->Which() == EE_FEATURE_FIELD )
@@ -2995,8 +2993,8 @@ BOOL ImpEditEngine::UpdateFields()
pField->GetFieldValue() = aFldValue;
if ( *pField != *pCurrent )
{
- bChanges = TRUE;
- bChangesInPara = TRUE;
+ bChanges = sal_True;
+ bChangesInPara = sal_True;
}
delete pCurrent;
}
@@ -3021,13 +3019,13 @@ EditPaM ImpEditEngine::InsertLineBreak( EditSelection aCurSel )
// ----------------------------------------------------------------------
// Helper functions
// ----------------------------------------------------------------------
-Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags )
+Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, sal_uInt16 nFlags )
{
DBG_ASSERT( GetUpdateMode(), "Must not be reached when Update=FALSE: PaMtoEditCursor" );
Rectangle aEditCursor;
long nY = 0;
- for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
{
ParaPortion* pPortion = GetParaPortions().GetObject(nPortion);
ContentNode* pNode = pPortion->GetNode();
@@ -3048,14 +3046,14 @@ Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags )
return aEditCursor;
}
-EditPaM ImpEditEngine::GetPaM( Point aDocPos, BOOL bSmart )
+EditPaM ImpEditEngine::GetPaM( Point aDocPos, sal_Bool bSmart )
{
DBG_ASSERT( GetUpdateMode(), "Must not be reached when Update=FALSE: GetPaM" );
long nY = 0;
long nTmpHeight;
EditPaM aPaM;
- USHORT nPortion;
+ sal_uInt16 nPortion;
for ( nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
{
ParaPortion* pPortion = GetParaPortions().GetObject(nPortion);
@@ -3095,7 +3093,7 @@ sal_uInt32 ImpEditEngine::GetTextHeight() const
return nCurTextHeight;
}
-sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace )
+sal_uInt32 ImpEditEngine::CalcTextWidth( sal_Bool bIgnoreExtraSpace )
{
// If still not formatted and not in the process.
// Will be brought in the formatting for AutoPageSize.
@@ -3110,8 +3108,8 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace )
// --------------------------------------------------
// Over all the paragraphs ...
// --------------------------------------------------
- USHORT nParas = GetParaPortions().Count();
- for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+ sal_uInt16 nParas = GetParaPortions().Count();
+ for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ )
{
ParaPortion* pPortion = GetParaPortions().GetObject( nPara );
if ( pPortion->IsVisible() )
@@ -3122,8 +3120,8 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace )
// --------------------------------------------------
// On the lines of the paragraph ...
// --------------------------------------------------
- ULONG nLines = pPortion->GetLines().Count();
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ sal_uLong nLines = pPortion->GetLines().Count();
+ for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
pLine = pPortion->GetLines().GetObject( nLine );
DBG_ASSERT( pLine, "NULL-Pointer in the line iterator in CalcWidth" );
@@ -3160,9 +3158,9 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace )
return (sal_uInt32)nMaxWidth;
}
-sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace )
+sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_Bool bIgnoreExtraSpace )
{
- USHORT nPara = GetEditDoc().GetPos( pPortion->GetNode() );
+ sal_uInt16 nPara = GetEditDoc().GetPos( pPortion->GetNode() );
// #114278# Saving both layout mode and language (since I'm
// potentially changing both)
@@ -3174,8 +3172,8 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine,
// Calculation of the width without the Indents ...
sal_uInt32 nWidth = 0;
- USHORT nPos = pLine->GetStart();
- for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
+ sal_uInt16 nPos = pLine->GetStart();
+ for ( sal_uInt16 nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
{
TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nTP );
switch ( pTextPortion->GetKind() )
@@ -3216,12 +3214,12 @@ sal_uInt32 ImpEditEngine::CalcTextHeight()
{
DBG_ASSERT( GetUpdateMode(), "Should not be used when Update=FALSE: CalcTextHeight" );
sal_uInt32 nY = 0;
- for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
nY += GetParaPortions()[nPortion]->GetHeight();
return nY;
}
-USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const
+sal_uInt16 ImpEditEngine::GetLineCount( sal_uInt16 nParagraph ) const
{
DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
@@ -3232,7 +3230,7 @@ USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const
return 0xFFFF;
}
-xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const
+xub_StrLen ImpEditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const
{
DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineLen: Out of range" );
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
@@ -3247,7 +3245,7 @@ xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const
return 0xFFFF;
}
-void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const
+void ImpEditEngine::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const
{
DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
@@ -3262,9 +3260,9 @@ void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEn
}
}
-USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 ImpEditEngine::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
- USHORT nLineNo = 0xFFFF;
+ sal_uInt16 nLineNo = 0xFFFF;
ContentNode* pNode = GetEditDoc().SaveGetObject( nPara );
DBG_ASSERT( pNode, "GetLineNumberAtIndex: invalid paragraph index" );
if (pNode)
@@ -3272,13 +3270,13 @@ USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
// we explicitly allow for the index to point at the character right behind the text
const bool bValidIndex = /*0 <= nIndex &&*/ nIndex <= pNode->Len();
DBG_ASSERT( bValidIndex, "GetLineNumberAtIndex: invalid index" );
- const USHORT nLineCount = GetLineCount( nPara );
+ const sal_uInt16 nLineCount = GetLineCount( nPara );
if (nIndex == pNode->Len())
nLineNo = nLineCount > 0 ? nLineCount - 1 : 0;
else if (bValidIndex) // nIndex < pNode->Len()
{
- USHORT nStart = USHRT_MAX, nEnd = USHRT_MAX;
- for (USHORT i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i)
+ sal_uInt16 nStart = USHRT_MAX, nEnd = USHRT_MAX;
+ for (sal_uInt16 i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i)
{
GetLineBoundaries( nStart, nEnd, nPara, i );
if (nStart <= nIndex && nIndex < nEnd)
@@ -3289,7 +3287,7 @@ USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
return nLineNo;
}
-USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine )
+sal_uInt16 ImpEditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine )
{
DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
@@ -3304,7 +3302,7 @@ USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine )
return 0xFFFF;
}
-sal_uInt32 ImpEditEngine::GetParaHeight( USHORT nParagraph )
+sal_uInt32 ImpEditEngine::GetParaHeight( sal_uInt16 nParagraph )
{
sal_uInt32 nHeight = 0;
@@ -3319,25 +3317,25 @@ sal_uInt32 ImpEditEngine::GetParaHeight( USHORT nParagraph )
void ImpEditEngine::UpdateSelections()
{
- USHORT nInvNodes = aDeletedNodes.Count();
+ sal_uInt16 nInvNodes = aDeletedNodes.Count();
// Check whether one of the selections is at a deleted node...
// If the node is valid, the index has yet to be examined!
- for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
{
EditView* pView = aEditViews.GetObject(nView);
DBG_CHKOBJ( pView, EditView, 0 );
EditSelection aCurSel( pView->pImpEditView->GetEditSelection() );
- BOOL bChanged = FALSE;
- for ( USHORT n = 0; n < nInvNodes; n++ )
+ sal_Bool bChanged = sal_False;
+ for ( sal_uInt16 n = 0; n < nInvNodes; n++ )
{
DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n );
- if ( ( ( ULONG )(aCurSel.Min().GetNode()) == pInf->GetInvalidAdress() ) ||
- ( ( ULONG )(aCurSel.Max().GetNode()) == pInf->GetInvalidAdress() ) )
+ if ( ( ( sal_uLong )(aCurSel.Min().GetNode()) == pInf->GetInvalidAdress() ) ||
+ ( ( sal_uLong )(aCurSel.Max().GetNode()) == pInf->GetInvalidAdress() ) )
{
// Use ParaPortions, as now also hidden paragraphs have to be
// taken into account!
- USHORT nPara = pInf->GetPosition();
+ sal_uInt16 nPara = pInf->GetPosition();
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nPara );
if ( !pPPortion ) // Last paragraph
{
@@ -3346,8 +3344,8 @@ void ImpEditEngine::UpdateSelections()
}
DBG_ASSERT( pPPortion, "Empty Document in UpdateSelections ?" );
// Do not end up from a hidden paragraph:
- USHORT nCurPara = nPara;
- USHORT nLastPara = GetParaPortions().Count()-1;
+ sal_uInt16 nCurPara = nPara;
+ sal_uInt16 nLastPara = GetParaPortions().Count()-1;
while ( nPara <= nLastPara && !GetParaPortions()[nPara]->IsVisible() )
nPara++;
if ( nPara > nLastPara ) // then also backwards ...
@@ -3361,7 +3359,7 @@ void ImpEditEngine::UpdateSelections()
ParaPortion* pParaPortion = GetParaPortions()[nPara];
EditSelection aTmpSelection( EditPaM( pParaPortion->GetNode(), 0 ) );
pView->pImpEditView->SetEditSelection( aTmpSelection );
- bChanged=TRUE;
+ bChanged=sal_True;
break; // for loop
}
}
@@ -3382,7 +3380,7 @@ void ImpEditEngine::UpdateSelections()
}
// Delete ...
- for ( USHORT n = 0; n < nInvNodes; n++ )
+ for ( sal_uInt16 n = 0; n < nInvNodes; n++ )
{
DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n );
delete pInf;
@@ -3390,14 +3388,14 @@ void ImpEditEngine::UpdateSelections()
aDeletedNodes.Remove( 0, aDeletedNodes.Count() );
}
-EditSelection ImpEditEngine::ConvertSelection( USHORT nStartPara, USHORT nStartPos,
- USHORT nEndPara, USHORT nEndPos ) const
+EditSelection ImpEditEngine::ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 nStartPos,
+ sal_uInt16 nEndPara, sal_uInt16 nEndPos ) const
{
EditSelection aNewSelection;
// Start...
ContentNode* pNode = aEditDoc.SaveGetObject( nStartPara );
- USHORT nIndex = nStartPos;
+ sal_uInt16 nIndex = nStartPos;
if ( !pNode )
{
pNode = aEditDoc[ aEditDoc.Count()-1 ];
@@ -3437,15 +3435,15 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel )
return aMatchSel;
}
- USHORT nPos = aTmpSel.Min().GetIndex();
+ sal_uInt16 nPos = aTmpSel.Min().GetIndex();
ContentNode* pNode = aTmpSel.Min().GetNode();
if ( nPos >= pNode->Len() )
return aMatchSel;
- USHORT nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) );
+ sal_uInt16 nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) );
if ( nMatchChar != STRING_NOTFOUND )
{
- USHORT nNode = aEditDoc.GetPos( pNode );
+ sal_uInt16 nNode = aEditDoc.GetPos( pNode );
if ( ( nMatchChar % 2 ) == 0 )
{
// Search forward...
@@ -3453,8 +3451,8 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel )
DBG_ASSERT( aGroupChars.Len() > (nMatchChar+1), "Invalid group of MatchChars!" );
xub_Unicode nEC = aGroupChars.GetChar( nMatchChar+1 );
- USHORT nCur = aTmpSel.Min().GetIndex()+1;
- USHORT nLevel = 1;
+ sal_uInt16 nCur = aTmpSel.Min().GetIndex()+1;
+ sal_uInt16 nLevel = 1;
while ( pNode && nLevel )
{
XubString& rStr = *pNode;
@@ -3490,8 +3488,8 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel )
xub_Unicode nEC = aGroupChars.GetChar( nMatchChar );
xub_Unicode nSC = aGroupChars.GetChar( nMatchChar-1 );
- USHORT nCur = aTmpSel.Min().GetIndex()-1;
- USHORT nLevel = 1;
+ sal_uInt16 nCur = aTmpSel.Min().GetIndex()-1;
+ sal_uInt16 nLevel = 1;
while ( pNode && nLevel )
{
if ( pNode->Len() )
@@ -3541,7 +3539,7 @@ void ImpEditEngine::StopSelectionMode()
pActiveView->pImpEditView->SetEditSelection( aSel );
pActiveView->ShowCursor();
aSelEngine.Reset();
- bInSelection = FALSE;
+ bInSelection = sal_False;
}
}
@@ -3589,10 +3587,10 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable(
aText.ConvertLineEnd(); // System specific
pDataObj->GetString() = aText;
- SvxFontItem::EnableStoreUnicodeNames( TRUE );
- WriteBin( pDataObj->GetStream(), aSelection, TRUE );
+ SvxFontItem::EnableStoreUnicodeNames( sal_True );
+ WriteBin( pDataObj->GetStream(), aSelection, sal_True );
pDataObj->GetStream().Seek( 0 );
- SvxFontItem::EnableStoreUnicodeNames( FALSE );
+ SvxFontItem::EnableStoreUnicodeNames( sal_False );
((ImpEditEngine*)this)->WriteRTF( pDataObj->GetRTFStream(), aSelection );
pDataObj->GetRTFStream().Seek( 0 );
@@ -3621,14 +3619,14 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable(
return xDataObj;
}
-EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, BOOL bUseSpecial )
+EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial )
{
EditSelection aNewSelection( rPaM );
if ( rxDataObj.is() )
{
datatransfer::DataFlavor aFlavor;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( bUseSpecial )
{
@@ -3645,7 +3643,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer
SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ );
aNewSelection = Read( aBinStream, rBaseURL, EE_FORMAT_BIN, rPaM );
}
- bDone = TRUE;
+ bDone = sal_True;
}
catch( const ::com::sun::star::uno::Exception& )
{
@@ -3667,7 +3665,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer
SvMemoryStream aRTFStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ );
aNewSelection = Read( aRTFStream, rBaseURL, EE_FORMAT_RTF, rPaM );
}
- bDone = TRUE;
+ bDone = sal_True;
}
catch( const ::com::sun::star::uno::Exception& )
{
@@ -3691,7 +3689,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer
::rtl::OUString aText;
aData >>= aText;
aNewSelection = ImpInsertText( rPaM, aText );
- bDone = TRUE;
+ bDone = sal_True;
}
catch( ... )
{
@@ -3712,12 +3710,12 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion )
{
const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
- USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
// only from the top ...
- USHORT nFirstInvalid = 0xFFFF;
- USHORT nLine;
+ sal_uInt16 nFirstInvalid = 0xFFFF;
+ sal_uInt16 nLine;
for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
{
EditLine* pL = pPortion->GetLines().GetObject( nLine );
@@ -3739,7 +3737,7 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion )
if ( nFirstInvalid != 0 ) // Only if the first line is invalid
aRange.Min() = aRange.Max();
- USHORT nLastInvalid = pPortion->GetLines().Count()-1;
+ sal_uInt16 nLastInvalid = pPortion->GetLines().Count()-1;
for ( nLine = nFirstInvalid; nLine < pPortion->GetLines().Count(); nLine++ )
{
EditLine* pL = pPortion->GetLines().GetObject( nLine );
@@ -3770,17 +3768,17 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion )
return aRange;
}
-EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart )
+EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, sal_Bool bSmart )
{
DBG_ASSERT( pPortion->IsVisible(), "Why GetPaM() for an invisible paragraph?" );
DBG_ASSERT( IsFormatted(), "GetPaM: Not formatted" );
- USHORT nCurIndex = 0;
+ sal_uInt16 nCurIndex = 0;
EditPaM aPaM;
aPaM.SetNode( pPortion->GetNode() );
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
- USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
long nY = pPortion->GetFirstLineOffset();
@@ -3788,7 +3786,7 @@ EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart
DBG_ASSERT( pPortion->GetLines().Count(), "Empty ParaPortion in GetPaM!" );
EditLine* pLine = 0;
- for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
{
EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
nY += pTmpLine->GetHeight();
@@ -3826,16 +3824,16 @@ EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart
return aPaM;
}
-USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nXPos, BOOL bSmart )
+sal_uInt16 ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nXPos, sal_Bool bSmart )
{
DBG_ASSERT( pLine, "No line received: GetChar" );
- USHORT nChar = 0xFFFF;
- USHORT nCurIndex = pLine->GetStart();
+ sal_uInt16 nChar = 0xFFFF;
+ sal_uInt16 nCurIndex = pLine->GetStart();
// Search best matching portion with GetPortionXOffset()
- for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
+ for ( sal_uInt16 i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
{
TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i );
long nXLeft = GetPortionXOffset( pParaPortion, pLine, i );
@@ -3860,16 +3858,16 @@ USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long
}
else
{
- USHORT nMax = pPortion->GetLen();
- USHORT nOffset = 0xFFFF;
- USHORT nTmpCurIndex = nChar - pLine->GetStart();
+ sal_uInt16 nMax = pPortion->GetLen();
+ sal_uInt16 nOffset = 0xFFFF;
+ sal_uInt16 nTmpCurIndex = nChar - pLine->GetStart();
long nXInPortion = nXPos - nXLeft;
if ( pPortion->IsRightToLeft() )
nXInPortion = nXRight - nXPos;
// Search in Array...
- for ( USHORT x = 0; x < nMax; x++ )
+ for ( sal_uInt16 x = 0; x < nMax; x++ )
{
long nTmpPosMax = pLine->GetCharPosArray().GetObject( nTmpCurIndex+x );
if ( nTmpPosMax > nXInPortion )
@@ -3908,14 +3906,14 @@ USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long
if ( nChar && ( nChar < pParaPortion->GetNode()->Len() ) )
{
EditPaM aPaM( pParaPortion->GetNode(), nChar+1 );
- USHORT nScriptType = GetScriptType( aPaM );
+ sal_uInt16 nScriptType = GetScriptType( aPaM );
if ( nScriptType == i18n::ScriptType::COMPLEX )
{
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
sal_Int32 nCount = 1;
lang::Locale aLocale = GetLocale( aPaM );
- USHORT nRight = (USHORT)_xBI->nextCharacters( *pParaPortion->GetNode(), nChar, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
- USHORT nLeft = (USHORT)_xBI->previousCharacters( *pParaPortion->GetNode(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
+ sal_uInt16 nRight = (sal_uInt16)_xBI->nextCharacters( *pParaPortion->GetNode(), nChar, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
+ sal_uInt16 nLeft = (sal_uInt16)_xBI->previousCharacters( *pParaPortion->GetNode(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
if ( ( nLeft != nChar ) && ( nRight != nChar ) )
{
nChar = ( Abs( nRight - nChar ) < Abs( nLeft - nChar ) ) ? nRight : nLeft;
@@ -3940,7 +3938,7 @@ Range ImpEditEngine::GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* p
{
Range aLineXPosStartEnd;
- USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() );
+ sal_uInt16 nPara = GetEditDoc().GetPos( pParaPortion->GetNode() );
if ( !IsRightToLeft( nPara ) )
{
aLineXPosStartEnd.Min() = pLine->GetStartPosX();
@@ -3956,11 +3954,11 @@ Range ImpEditEngine::GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* p
return aLineXPosStartEnd;
}
-long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion )
+long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nTextPortion )
{
long nX = pLine->GetStartPosX();
- for ( USHORT i = pLine->GetStartPortion(); i < nTextPortion; i++ )
+ for ( sal_uInt16 i = pLine->GetStartPortion(); i < nTextPortion; i++ )
{
TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i );
switch ( pPortion->GetKind() )
@@ -3976,8 +3974,8 @@ long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLin
}
}
- USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() );
- BOOL bR2LPara = IsRightToLeft( nPara );
+ sal_uInt16 nPara = GetEditDoc().GetPos( pParaPortion->GetNode() );
+ sal_Bool bR2LPara = IsRightToLeft( nPara );
TextPortion* pDestPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
if ( pDestPortion->GetKind() != PORTIONKIND_TAB )
@@ -4045,20 +4043,20 @@ long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLin
return nX;
}
-long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nIndex, BOOL bPreferPortionStart )
+long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart )
{
DBG_ASSERT( pLine, "No line received: GetXPos" );
DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "GetXPos has to be called properly!" );
- BOOL bDoPreferPortionStart = bPreferPortionStart;
+ sal_Bool bDoPreferPortionStart = bPreferPortionStart;
// Assure that the portion belongs to this line:
if ( nIndex == pLine->GetStart() )
- bDoPreferPortionStart = TRUE;
+ bDoPreferPortionStart = sal_True;
else if ( nIndex == pLine->GetEnd() )
- bDoPreferPortionStart = FALSE;
+ bDoPreferPortionStart = sal_False;
- USHORT nTextPortionStart = 0;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart );
+ sal_uInt16 nTextPortionStart = 0;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart );
DBG_ASSERT( ( nTextPortion >= pLine->GetStartPortion() ) && ( nTextPortion <= pLine->GetEndPortion() ), "GetXPos: Portion not in current line! " );
@@ -4086,7 +4084,7 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT
if ( pNextPortion->GetKind() != PORTIONKIND_TAB )
{
if ( !bPreferPortionStart )
- nX = GetXPos( pParaPortion, pLine, nIndex, TRUE );
+ nX = GetXPos( pParaPortion, pLine, nIndex, sal_True );
else if ( !IsRightToLeft( GetEditDoc().GetPos( pParaPortion->GetNode() ) ) )
nX += nPortionTextWidth;
}
@@ -4108,7 +4106,7 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT
if( pLine->GetCharPosArray().Count() )
{
- USHORT nPos = nIndex - 1 - pLine->GetStart();
+ sal_uInt16 nPos = nIndex - 1 - pLine->GetStart();
if( nPos >= pLine->GetCharPosArray().Count() )
{
nPos = pLine->GetCharPosArray().Count()-1;
@@ -4132,10 +4130,10 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT
nX += pPortion->GetExtraInfos()->nPortionOffsetX;
if ( pPortion->GetExtraInfos()->nAsianCompressionTypes & CHAR_PUNCTUATIONRIGHT )
{
- BYTE nType = GetCharTypeForCompression( pParaPortion->GetNode()->GetChar( nIndex ) );
+ sal_uInt8 nType = GetCharTypeForCompression( pParaPortion->GetNode()->GetChar( nIndex ) );
if ( nType == CHAR_PUNCTUATIONRIGHT )
{
- USHORT n = nIndex - nTextPortionStart;
+ sal_uInt16 n = nIndex - nTextPortionStart;
const sal_Int32* pDXArray = pLine->GetCharPosArray().GetData()+( nTextPortionStart-pLine->GetStart() );
sal_Int32 nCharWidth = ( ( (n+1) < pPortion->GetLen() ) ? pDXArray[n] : pPortion->GetSize().Width() )
- ( n ? pDXArray[n-1] : 0 );
@@ -4183,14 +4181,14 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
if ( pPortion->IsVisible() )
{
DBG_ASSERT( pPortion->GetLines().Count(), "Paragraph with no lines in ParaPortion::CalcHeight" );
- for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
pPortion->nHeight += pPortion->GetLines().GetObject( nLine )->GetHeight();
if ( !aStatus.IsOutliner() )
{
const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
- USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+ sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
if ( nSBL )
{
@@ -4200,10 +4198,10 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
pPortion->nHeight += nSBL;
}
- USHORT nPortion = GetParaPortions().GetPos( pPortion );
+ sal_uInt16 nPortion = GetParaPortions().GetPos( pPortion );
if ( nPortion || aStatus.ULSpaceFirstParagraph() )
{
- USHORT nUpper = GetYValue( rULItem.GetUpper() );
+ sal_uInt16 nUpper = GetYValue( rULItem.GetUpper() );
pPortion->nHeight += nUpper;
pPortion->nFirstLineOffset = nUpper;
}
@@ -4226,7 +4224,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
// Only Writer3: Do not add up, but minimum distance.
// check if distance by LineSpacing > Upper:
- USHORT nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) );
+ sal_uInt16 nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) );
if ( nExtraSpace > pPortion->nFirstLineOffset )
{
// Paragraph becomes 'bigger':
@@ -4235,7 +4233,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
}
// Determine nFirstLineOffset now f(pNode) => now f(pNode, pPrev):
- USHORT nPrevLower = GetYValue( rPrevULItem.GetLower() );
+ sal_uInt16 nPrevLower = GetYValue( rPrevULItem.GetLower() );
// This PrevLower is still in the height of PrevPortion ...
if ( nPrevLower > pPortion->nFirstLineOffset )
@@ -4259,7 +4257,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPrev, rPrevLSItem ) );
if ( nExtraSpace > nPrevLower )
{
- USHORT nMoreLower = nExtraSpace - nPrevLower;
+ sal_uInt16 nMoreLower = nExtraSpace - nPrevLower;
// Paragraph becomes 'bigger', 'grows' downwards:
if ( nMoreLower > pPortion->nFirstLineOffset )
{
@@ -4273,7 +4271,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
}
}
-Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, USHORT nFlags )
+Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_uInt16 nIndex, sal_uInt16 nFlags )
{
DBG_ASSERT( pPortion->IsVisible(), "Why GetEditCursor() for an invisible paragraph?" );
DBG_ASSERT( IsFormatted() || GetTextRanger(), "GetEditCursor: Not formatted" );
@@ -4288,14 +4286,14 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, US
long nY = pPortion->GetFirstLineOffset();
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
- USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
- USHORT nCurIndex = 0;
+ sal_uInt16 nCurIndex = 0;
DBG_ASSERT( pPortion->GetLines().Count(), "Empty ParaPortion in GetEditCursor!" );
EditLine* pLine = 0;
- BOOL bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? TRUE : FALSE;
- for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ sal_Bool bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? sal_True : sal_False;
+ for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
{
EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
if ( ( pTmpLine->GetStart() == nIndex ) || ( pTmpLine->IsIn( nIndex, bEOL ) ) )
@@ -4342,7 +4340,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, US
}
else
{
- nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? TRUE : FALSE );
+ nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? sal_True : sal_False );
}
aEditCursor.Left() = aEditCursor.Right() = nX;
@@ -4377,7 +4375,7 @@ void ImpEditEngine::SetValidPaperSize( const Size& rNewSz )
aPaperSize.Height() = nMaxHeight;
}
-void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight )
+void ImpEditEngine::IndentBlock( EditView* pEditView, sal_Bool bRight )
{
ESelection aESel( CreateESel( pEditView->pImpEditView->GetEditSelection() ) );
aESel.Adjust();
@@ -4400,7 +4398,7 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight )
pEditView->pImpEditView->GetEditSelection().Max() );
UndoActionStart( bRight ? EDITUNDO_INDENTBLOCK : EDITUNDO_UNINDENTBLOCK );
- for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ )
{
ContentNode* pNode = GetEditDoc().GetObject( nPara );
if ( bRight )
@@ -4432,11 +4430,11 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight )
aNewSel.nEndPos = pLastNode->Len();
pEditView->pImpEditView->SetEditSelection( CreateSel( aNewSel ) );
pEditView->pImpEditView->DrawSelection();
- pEditView->pImpEditView->ShowCursor( FALSE, TRUE );
+ pEditView->pImpEditView->ShowCursor( sal_False, sal_True );
}
}
-rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const
+rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( sal_Bool bGetInternal ) const
{
rtl::Reference<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
if ( !xF.is() && bGetInternal )
@@ -4457,23 +4455,23 @@ svtools::ColorConfig& ImpEditEngine::GetColorConfig()
return *pColorConfig;
}
-BOOL ImpEditEngine::IsVisualCursorTravelingEnabled()
+sal_Bool ImpEditEngine::IsVisualCursorTravelingEnabled()
{
- BOOL bVisualCursorTravaling = FALSE;
+ sal_Bool bVisualCursorTravaling = sal_False;
if( !pCTLOptions )
pCTLOptions = new SvtCTLOptions;
if ( pCTLOptions->IsCTLFontEnabled() && ( pCTLOptions->GetCTLCursorMovement() == SvtCTLOptions::MOVEMENT_VISUAL ) )
{
- bVisualCursorTravaling = TRUE;
+ bVisualCursorTravaling = sal_True;
}
return bVisualCursorTravaling;
}
-BOOL ImpEditEngine::DoVisualCursorTraveling( const ContentNode* )
+sal_Bool ImpEditEngine::DoVisualCursorTraveling( const ContentNode* )
{
// Don't check if it's necessary, because we also need it when leaving the paragraph
return IsVisualCursorTravelingEnabled();
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 2f68e69640..fc1e8ce05b 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -36,7 +36,7 @@
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uIt16S
#include <svl/svstdarr.hxx>
#include <vcl/wrkwin.hxx>
@@ -102,15 +102,15 @@ SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
struct TabInfo
{
- BOOL bValid;
+ sal_Bool bValid;
SvxTabStop aTabStop;
xub_StrLen nCharPos;
- USHORT nTabPortion;
+ sal_uInt16 nTabPortion;
long nStartPosX;
long nTabPos;
- TabInfo() { bValid = FALSE; }
+ TabInfo() { bValid = sal_False; }
};
Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin )
@@ -135,7 +135,7 @@ Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin )
return aTranslatedPos;
}
-BYTE GetCharTypeForCompression( xub_Unicode cChar )
+sal_uInt8 GetCharTypeForCompression( xub_Unicode cChar )
{
switch ( cChar )
{
@@ -169,8 +169,8 @@ void lcl_DrawRedLines(
WrongList* pWrongs,
short nOrientation,
const Point& rOrigin,
- BOOL bVertical,
- BOOL bIsRightToLeft )
+ sal_Bool bVertical,
+ sal_Bool bIsRightToLeft )
{
// But only if font is not too small ...
long nHght = pOutDev->LogicToPixel( Size( 0, nFontHeight ) ).Height();
@@ -532,9 +532,9 @@ void ImpEditEngine::CheckAutoPageSize()
{
Size aPrevPaperSize( GetPaperSize() );
if ( GetStatus().AutoPageWidth() )
- aPaperSize.Width() = (long) !IsVertical() ? CalcTextWidth( TRUE ) : GetTextHeight();
+ aPaperSize.Width() = (long) !IsVertical() ? CalcTextWidth( sal_True ) : GetTextHeight();
if ( GetStatus().AutoPageHeight() )
- aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( TRUE );
+ aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( sal_True );
SetValidPaperSize( aPaperSize ); // consider Min, Max
@@ -588,7 +588,7 @@ static sal_Int32 ImplCalculateFontIndependentLineSpacing( const sal_Int32 nFontH
return ( nFontHeight * 12 ) / 10; // + 20%
}
-sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
+sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
{
ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
@@ -597,8 +597,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
DBG_ASSERT( pParaPortion->IsVisible(), "Invisible paragraphs not formatted!" );
DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion not invalid!" );
- BOOL bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 );
- BOOL bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger();
+ sal_Bool bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 );
+ sal_Bool bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger();
// ---------------------------------------------------------------
// Fast special treatment for empty paragraphs ...
@@ -632,7 +632,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
// ---------------------------------------------------------------
ContentNode* const pNode = pParaPortion->GetNode();
- BOOL bRightToLeftPara = IsRightToLeft( nPara );
+ sal_Bool bRightToLeftPara = IsRightToLeft( nPara );
SvxAdjust eJustification = GetJustification( nPara );
sal_Bool bHyphenatePara = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HYPHENATE )).GetValue();
@@ -641,7 +641,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
sal_Int32 nSpaceBeforeAndMinLabelWidth = GetSpaceBeforeAndMinLabelWidth( pNode, &nSpaceBefore, &nMinLabelWidth );
const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pNode );
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&) pNode->GetContentAttribs().GetItem( EE_PARA_SBL );
- const BOOL bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue();
+ const sal_Bool bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue();
const short nInvalidDiff = pParaPortion->GetInvalidDiff();
const sal_uInt16 nInvalidStart = pParaPortion->GetInvalidPosStart();
@@ -753,12 +753,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
sal_Bool bSameLineAgain = sal_False; // For TextRanger, if the height changes.
TabInfo aCurrentTab;
- BOOL bForceOneRun = bEmptyNodeWithPolygon;
- BOOL bCompressedChars = FALSE;
+ sal_Bool bForceOneRun = bEmptyNodeWithPolygon;
+ sal_Bool bCompressedChars = sal_False;
while ( ( nIndex < pNode->Len() ) || bForceOneRun )
{
- bForceOneRun = FALSE;
+ bForceOneRun = sal_False;
sal_Bool bEOL = sal_False;
sal_Bool bEOC = sal_False;
@@ -937,7 +937,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
short nAllSpaceBeforeText = static_cast< short >(rLRItem.GetTxtLeft()/* + rLRItem.GetTxtLeft()*/ + nSpaceBeforeAndMinLabelWidth);
aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos - nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/, aEditDoc.GetDefTab() );
aCurrentTab.nTabPos = GetXValue( (long) ( aCurrentTab.aTabStop.GetTabPos() + nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/ ) );
- aCurrentTab.bValid = FALSE;
+ aCurrentTab.bValid = sal_False;
// Switch direction in R2L para...
if ( bRightToLeftPara )
@@ -953,7 +953,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL ) )
{
// For LEFT / DEFAULT this tab is not considered.
- aCurrentTab.bValid = TRUE;
+ aCurrentTab.bValid = sal_True;
aCurrentTab.nStartPosX = nTmpWidth;
aCurrentTab.nCharPos = nTmpPos;
aCurrentTab.nTabPortion = nTmpPortion;
@@ -983,7 +983,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
bBrokenLine = sal_True;
}
pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
- bCompressedChars = FALSE;
+ bCompressedChars = sal_False;
}
break;
case EE_FEATURE_LINEBR:
@@ -993,7 +993,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
bEOL = sal_True;
bLineBreak = sal_True;
pPortion->GetKind() = PORTIONKIND_LINEBREAK;
- bCompressedChars = FALSE;
+ bCompressedChars = sal_False;
pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
}
break;
@@ -1025,7 +1025,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
}
// Compression in Fields????
// I think this could be a little bit difficult and is not very usefull
- bCompressedChars = FALSE;
+ bCompressedChars = sal_False;
}
break;
default: OSL_FAIL( "What feature?" );
@@ -1061,20 +1061,20 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
// And now check for Compression:
if ( pPortion->GetLen() && GetAsianCompressionMode() )
- bCompressedChars |= ImplCalcAsianCompression( pNode, pPortion, nTmpPos, (sal_Int32*)pLine->GetCharPosArray().GetData() + (nTmpPos-pLine->GetStart()), 10000, FALSE );
+ bCompressedChars |= ImplCalcAsianCompression( pNode, pPortion, nTmpPos, (sal_Int32*)pLine->GetCharPosArray().GetData() + (nTmpPos-pLine->GetStart()), 10000, sal_False );
nTmpWidth += pPortion->GetSize().Width();
pPortion->SetRightToLeft( GetRightToLeft( nPara, nTmpPos+1 ) );
- USHORT _nPortionEnd = nTmpPos + pPortion->GetLen();
+ sal_uInt16 _nPortionEnd = nTmpPos + pPortion->GetLen();
if( bScriptSpace && ( _nPortionEnd < pNode->Len() ) && ( nTmpWidth < nXWidth ) && IsScriptChange( EditPaM( pNode, _nPortionEnd ) ) )
{
- BOOL bAllow = FALSE;
- USHORT nScriptTypeLeft = GetScriptType( EditPaM( pNode, _nPortionEnd ) );
- USHORT nScriptTypeRight = GetScriptType( EditPaM( pNode, _nPortionEnd+1 ) );
+ sal_Bool bAllow = sal_False;
+ sal_uInt16 nScriptTypeLeft = GetScriptType( EditPaM( pNode, _nPortionEnd ) );
+ sal_uInt16 nScriptTypeRight = GetScriptType( EditPaM( pNode, _nPortionEnd+1 ) );
if ( ( nScriptTypeLeft == i18n::ScriptType::ASIAN ) || ( nScriptTypeRight == i18n::ScriptType::ASIAN ) )
- bAllow = TRUE;
+ bAllow = sal_True;
// No spacing within L2R/R2L nesting
if ( bAllow )
@@ -1090,7 +1090,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
if ( aCurrentTab.bValid && ( nTmpPortion != aCurrentTab.nTabPortion ) )
{
long nWidthAfterTab = 0;
- for ( USHORT n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ )
+ for ( sal_uInt16 n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ )
{
TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( n );
nWidthAfterTab += pTP->GetSize().Width();
@@ -1107,12 +1107,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
{
String aText = GetSelected( EditSelection( EditPaM( pParaPortion->GetNode(), nTmpPos ),
EditPaM( pParaPortion->GetNode(), nTmpPos + pPortion->GetLen() ) ) );
- USHORT nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() );
+ sal_uInt16 nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() );
if ( nDecPos != STRING_NOTFOUND )
{
nW -= pParaPortion->GetTextPortions().GetObject( nTmpPortion )->GetSize().Width();
nW += aTmpFont.QuickGetTextSize( GetRefDevice(), *pParaPortion->GetNode(), nTmpPos, nDecPos, NULL ).Width();
- aCurrentTab.bValid = FALSE;
+ aCurrentTab.bValid = sal_False;
}
}
else
@@ -1123,7 +1123,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
if ( nW >= nMaxW )
{
nW = nMaxW;
- aCurrentTab.bValid = FALSE;
+ aCurrentTab.bValid = sal_False;
}
TextPortion* pTabPortion = pParaPortion->GetTextPortions().GetObject( aCurrentTab.nTabPortion );
pTabPortion->GetSize().Width() = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW - nStartX;
@@ -1139,7 +1139,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
DBG_ASSERT( pPortion, "no portion!?" );
- aCurrentTab.bValid = FALSE;
+ aCurrentTab.bValid = sal_False;
// this was possibly a portion too far:
sal_Bool bFixedEnd = sal_False;
@@ -1234,7 +1234,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
if ( bCompressedChars && pPortion && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed )
{
// I need the manipulated DXArray for determining the break postion...
- ImplCalcAsianCompression( pNode, pPortion, nPortionStart, const_cast<sal_Int32*>(( pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()) )), 10000, TRUE );
+ ImplCalcAsianCompression( pNode, pPortion, nPortionStart, const_cast<sal_Int32*>(( pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()) )), 10000, sal_True );
}
if( pPortion )
ImpBreakLine( pParaPortion, pLine, pPortion, nPortionStart,
@@ -1513,8 +1513,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
pParaPortion->GetTextPortions().Insert( pDummyPortion, pParaPortion->GetTextPortions().Count() );
pLine = new EditLine;
pParaPortion->GetLines().Insert( pLine, ++nLine );
- bForceOneRun = TRUE;
- bProcessingEmptyLine = TRUE;
+ bForceOneRun = sal_True;
+ bProcessingEmptyLine = sal_True;
}
}
if ( pLine )
@@ -1603,7 +1603,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
if ( !aStatus.IsOutliner() )
{
- USHORT nPara = GetParaPortions().GetPos( pParaPortion );
+ sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion );
SvxAdjust eJustification = GetJustification( nPara );
long nMaxLineWidth = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height();
nMaxLineWidth -= GetXValue( rLRItem.GetRight() );
@@ -1636,7 +1636,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
}
else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
- USHORT nPara = GetParaPortions().GetPos( pParaPortion );
+ sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion );
if ( nPara || IsFixedCellHeight() || pTmpLine->GetStartPortion() ) // Not the very first line
{
// There are documents with PropLineSpace 0, why?
@@ -1722,8 +1722,8 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
else
{
sal_uInt16 nMinBreakPos = pLine->GetStart();
- USHORT nAttrs = pNode->GetCharAttribs().GetAttribs().Count();
- for ( USHORT nAttr = nAttrs; nAttr; )
+ sal_uInt16 nAttrs = pNode->GetCharAttribs().GetAttribs().Count();
+ for ( sal_uInt16 nAttr = nAttrs; nAttr; )
{
EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[--nAttr];
if ( pAttr->IsFeature() && ( pAttr->GetEnd() > nMinBreakPos ) && ( pAttr->GetEnd() <= nMaxBreakPos ) )
@@ -1743,15 +1743,15 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, Sequence< PropertyValue >(), 1 );
i18n::LineBreakUserOptions aUserOptions;
- const i18n::ForbiddenCharacters* pForbidden = GetForbiddenCharsTable()->GetForbiddenCharacters( SvxLocaleToLanguage( aLocale ), TRUE );
+ const i18n::ForbiddenCharacters* pForbidden = GetForbiddenCharsTable()->GetForbiddenCharacters( SvxLocaleToLanguage( aLocale ), sal_True );
aUserOptions.forbiddenBeginCharacters = pForbidden->beginLine;
aUserOptions.forbiddenEndCharacters = pForbidden->endLine;
aUserOptions.applyForbiddenRules = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_FORBIDDENRULES )).GetValue();
aUserOptions.allowPunctuationOutsideMargin = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HANGINGPUNCTUATION )).GetValue();
- aUserOptions.allowHyphenateEnglish = FALSE;
+ aUserOptions.allowHyphenateEnglish = sal_False;
i18n::LineBreakResults aLBR = _xBI->getLineBreak( *pNode, nMaxBreakPos, aLocale, nMinBreakPos, aHyphOptions, aUserOptions );
- nBreakPos = (USHORT)aLBR.breakIndex;
+ nBreakPos = (sal_uInt16)aLBR.breakIndex;
// BUG in I18N - under special condition (break behind field, #87327#) breakIndex is < nMinBreakPos
if ( nBreakPos < nMinBreakPos )
@@ -1789,10 +1789,10 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
{
i18n::Boundary aBoundary = _xBI->getWordBoundary( *pNode, nBreakPos, GetLocale( EditPaM( pNode, nBreakPos ) ), ::com::sun::star::i18n::WordType::DICTIONARY_WORD, sal_True );
sal_uInt16 nWordStart = nBreakPos;
- sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos;
+ sal_uInt16 nWordEnd = (sal_uInt16) aBoundary.endPos;
DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" );
- USHORT nWordLen = nWordEnd - nWordStart;
+ sal_uInt16 nWordLen = nWordEnd - nWordStart;
if ( ( nWordEnd >= nMaxBreakPos ) && ( nWordLen > 3 ) )
{
// May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
@@ -1945,20 +1945,20 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
if ( ( nRemainingSpace < 0 ) || pLine->IsEmpty() )
return ;
- const USHORT nFirstChar = pLine->GetStart();
- const USHORT nLastChar = pLine->GetEnd() -1; // Last points behind
+ const sal_uInt16 nFirstChar = pLine->GetStart();
+ const sal_uInt16 nLastChar = pLine->GetEnd() -1; // Last points behind
ContentNode* pNode = pParaPortion->GetNode();
DBG_ASSERT( nLastChar < pNode->Len(), "AdjustBlocks: Out of range!" );
// Search blanks or Kashidas...
SvUShorts aPositions;
- USHORT nLastScript = i18n::ScriptType::LATIN;
- for ( USHORT nChar = nFirstChar; nChar <= nLastChar; nChar++ )
+ sal_uInt16 nLastScript = i18n::ScriptType::LATIN;
+ for ( sal_uInt16 nChar = nFirstChar; nChar <= nLastChar; nChar++ )
{
EditPaM aPaM( pNode, nChar+1 );
LanguageType eLang = GetLanguage(aPaM);
- USHORT nScript = GetScriptType(aPaM);
+ sal_uInt16 nScript = GetScriptType(aPaM);
if ( MsLangId::getPrimaryLanguage( eLang) == LANGUAGE_ARABIC_PRIMARY_ONLY )
// Arabic script is handled later.
continue;
@@ -1998,7 +1998,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
if ( ( pNode->GetChar( nLastChar ) == ' ' ) && ( aPositions.Count() > 1 ) && ( MsLangId::getPrimaryLanguage( GetLanguage( EditPaM( pNode, nLastChar ) ) ) != LANGUAGE_ARABIC_PRIMARY_ONLY ) )
{
aPositions.Remove( aPositions.Count()-1, 1 );
- USHORT nPortionStart, nPortion;
+ sal_uInt16 nPortionStart, nPortion;
nPortion = pParaPortion->GetTextPortions().FindPortion( nLastChar+1, nPortionStart );
TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ];
long nRealWidth = pLine->GetCharPosArray()[nLastChar-nFirstChar];
@@ -2017,7 +2017,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
pLine->GetCharPosArray()[nLastChar-nFirstChar] -= nBlankWidth;
}
- USHORT nGaps = aPositions.Count();
+ sal_uInt16 nGaps = aPositions.Count();
const long nMore4Everyone = nRemainingSpace / nGaps;
long nSomeExtraSpace = nRemainingSpace - nMore4Everyone*nGaps;
@@ -2026,15 +2026,14 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
// Correct the positions in the Array and the portion widths:
// Last character won't be considered ...
- for ( USHORT n = 0; n < aPositions.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < aPositions.Count(); n++ )
{
- USHORT nChar = aPositions[n];
+ sal_uInt16 nChar = aPositions[n];
if ( nChar < nLastChar )
{
- USHORT nPortionStart, nPortion;
+ sal_uInt16 nPortionStart, nPortion;
nPortion = pParaPortion->GetTextPortions().FindPortion( nChar, nPortionStart, true );
TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ];
- USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen();
// The width of the portion:
pLastPortion->GetSize().Width() += nMore4Everyone;
@@ -2043,8 +2042,8 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
// Correct positions in array
// Even for kashidas just change positions, VCL will then draw the kashida automaticly
-
- for ( USHORT _n = nChar; _n < nPortionEnd; _n++ )
+ sal_uInt16 nPortionEnd = nPortionStart + pLastPortion->GetLen();
+ for ( sal_uInt16 _n = nChar; _n < nPortionEnd; _n++ )
{
pLine->GetCharPosArray()[_n-nFirstChar] += nMore4Everyone;
if ( nSomeExtraSpace )
@@ -2060,7 +2059,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
pLine->SetTextWidth( pLine->GetTextWidth() + nRemainingSpace );
}
-void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray )
+void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, SvUShorts& rArray )
{
// the search has to be performed on a per word base
@@ -2071,7 +2070,7 @@ void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT n
while ( ( aWordSel.Min().GetNode() == pNode ) && ( aWordSel.Min().GetIndex() < nEnd ) )
{
- USHORT nSavPos = aWordSel.Max().GetIndex();
+ sal_uInt16 nSavPos = aWordSel.Max().GetIndex();
if ( aWordSel.Max().GetIndex() > nEnd )
aWordSel.Max().GetIndex() = nEnd;
@@ -2221,7 +2220,7 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP
if ( pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed )
{
// We need the original size from the portion
- USHORT nTxtPortionStart = pPortion->GetTextPortions().GetStartPos( nSplitPortion );
+ sal_uInt16 nTxtPortionStart = pPortion->GetTextPortions().GetStartPos( nSplitPortion );
SvxFont aTmpFont( pPortion->GetNode()->GetCharAttribs().GetDefFont() );
SeekCursor( pPortion->GetNode(), nTxtPortionStart+1, aTmpFont );
aTmpFont.SetPhysFont( GetRefDevice() );
@@ -2260,15 +2259,15 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
}
aPositions.Insert( pNode->Len() );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( GetParaPortions().GetPos( pParaPortion ) );
const ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- for ( USHORT nT = 0; nT < rTypes.Count(); nT++ )
+ for ( size_t nT = 0; nT < rTypes.size(); nT++ )
aPositions.Insert( rTypes[nT].nStartPos );
const WritingDirectionInfos& rWritingDirections = pParaPortion->aWritingDirectionInfos;
- for ( USHORT nD = 0; nD < rWritingDirections.Count(); nD++ )
+ for ( size_t nD = 0; nD < rWritingDirections.size(); nD++ )
aPositions.Insert( rWritingDirections[nD].nStartPos );
if ( mpIMEInfos && mpIMEInfos->nLen && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) )
@@ -2358,7 +2357,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
!pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
{
DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "the empty portion was no TextPortion!" );
- USHORT & r =
+ sal_uInt16 & r =
pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen();
r = r + nNewChars;
}
@@ -2408,7 +2407,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
if ( ( nPos == nStartPos ) && ( (nPos+pTP->GetLen()) == nEnd ) )
{
// Remove portion;
- BYTE nType = pTP->GetKind();
+ sal_uInt8 nType = pTP->GetKind();
pParaPortion->GetTextPortions().Remove( nPortion );
delete pTP;
if ( nType == PORTIONKIND_LINEBREAK )
@@ -2473,7 +2472,7 @@ void ImpEditEngine::SetTextRanger( TextRanger* pRanger )
}
}
-void ImpEditEngine::SetVertical( BOOL bVertical )
+void ImpEditEngine::SetVertical( sal_Bool bVertical )
{
if ( IsVertical() != bVertical )
{
@@ -2488,7 +2487,7 @@ void ImpEditEngine::SetVertical( BOOL bVertical )
}
}
-void ImpEditEngine::SetFixedCellHeight( BOOL bUseFixedCellHeight )
+void ImpEditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight )
{
if ( IsFixedCellHeight() != bUseFixedCellHeight )
{
@@ -2708,7 +2707,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
rFont.SetColor( rStyleSettings.GetHighlightTextColor() );
rFont.SetFillColor( rStyleSettings.GetHighlightColor() );
- rFont.SetTransparent( FALSE );
+ rFont.SetTransparent( sal_False );
}
else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE )
{
@@ -2928,16 +2927,16 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
{
SeekCursor( pPortion->GetNode(), nIndex+1, aTmpFont, pOutDev );
- BOOL bDrawFrame = FALSE;
+ sal_Bool bDrawFrame = sal_False;
if ( ( pTextPortion->GetKind() == PORTIONKIND_FIELD ) && !aTmpFont.IsTransparent() &&
( GetBackgroundColor() != COL_AUTO ) && GetBackgroundColor().IsDark() &&
( IsAutoColorEnabled() && ( pOutDev->GetOutDevType() != OUTDEV_PRINTER ) ) )
{
- aTmpFont.SetTransparent( TRUE );
+ aTmpFont.SetTransparent( sal_True );
pOutDev->SetFillColor();
pOutDev->SetLineColor( GetAutoColor() );
- bDrawFrame = TRUE;
+ bDrawFrame = sal_True;
}
#ifdef EDITDEBUG
@@ -2966,8 +2965,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
ImplInitDigitMode( pOutDev, 0, 0, 0, aTmpFont.GetLanguage() );
XubString aText;
- USHORT nTextStart = 0;
- USHORT nTextLen = 0;
+ sal_uInt16 nTextStart = 0;
+ sal_uInt16 nTextLen = 0;
const sal_Int32* pDXArray = 0;
sal_Int32* pTmpDXArray = 0;
@@ -3039,7 +3038,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
{
const String aSlash( '/' );
const short nOldEscapement = aTmpFont.GetEscapement();
- const BYTE nOldPropr = aTmpFont.GetPropr();
+ const sal_uInt8 nOldPropr = aTmpFont.GetPropr();
aTmpFont.SetEscapement( -20 );
aTmpFont.SetPropr( 25 );
@@ -3274,7 +3273,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
if ( bSpecialUnderline )
{
Size aSz = aTmpFont.GetPhysTxtSize( pOutDev, aText, nTextStart, nTextLen );
- BYTE nProp = aTmpFont.GetPropr();
+ sal_uInt8 nProp = aTmpFont.GetPropr();
aTmpFont.SetEscapement( 0 );
aTmpFont.SetPropr( 100 );
aTmpFont.SetPhysFont( pOutDev );
@@ -3422,7 +3421,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
nChars = 3; // looks better
String aText;
- aText.Fill( (USHORT)nChars, pTextPortion->GetExtraValue() );
+ aText.Fill( (sal_uInt16)nChars, pTextPortion->GetExtraValue() );
aTmpFont.QuickDrawText( pOutDev, aTmpPos, aText, 0, aText.Len(), NULL );
pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText );
@@ -3553,7 +3552,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
}
}
- UINT8 nColorDiff = aFontColor.GetColorError( aBackgroundColor );
+ sal_uInt8 nColorDiff = aFontColor.GetColorError( aBackgroundColor );
if( nColorDiff < 8 )
aBackgroundColor = aFontColor.IsDark() ? COL_WHITE : COL_BLACK;
pVDev->SetBackground( aBackgroundColor );
@@ -4106,7 +4105,7 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
// Font height
for ( int nItem = 0; nItem < 3; nItem++ )
{
- USHORT nItemId = EE_CHAR_FONTHEIGHT;
+ sal_uInt16 nItemId = EE_CHAR_FONTHEIGHT;
if ( nItem == 1 )
nItemId = EE_CHAR_FONTHEIGHT_CJK;
else if ( nItem == 2 )
@@ -4214,7 +4213,7 @@ const SvxNumberFormat* ImpEditEngine::GetNumberFormat( const ContentNode *pNode
if (pNode)
{
// get index of paragraph
- USHORT nPara = GetEditDoc().GetPos( const_cast< ContentNode * >(pNode) );
+ sal_uInt16 nPara = GetEditDoc().GetPos( const_cast< ContentNode * >(pNode) );
DBG_ASSERT( nPara < USHRT_MAX, "node not found in array" );
if (nPara < USHRT_MAX)
{
@@ -4318,10 +4317,10 @@ void ImpEditEngine::ImplInitDigitMode( OutputDevice* pOutDev, String* pString, x
}
}
-void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex )
+void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, sal_uInt16 nIndex )
{
- BOOL bCTL = FALSE;
- BYTE bR2L = FALSE;
+ sal_Bool bCTL = sal_False;
+ sal_uInt8 bR2L = sal_False;
if ( nIndex == 0xFFFF )
{
bCTL = HasScriptType( nPara, i18n::ScriptType::COMPLEX );
@@ -4336,7 +4335,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USH
// it also works for issue 55927
}
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
// We always use the left postion for DrawText()
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL);
@@ -4416,7 +4415,7 @@ Color ImpEditEngine::GetAutoColor() const
}
-BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, USHORT nStartPos, sal_Int32* pDXArray, USHORT n100thPercentFromMax, BOOL bManipulateDXArray )
+sal_Bool ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_uInt16 nStartPos, sal_Int32* pDXArray, sal_uInt16 n100thPercentFromMax, sal_Bool bManipulateDXArray )
{
DBG_ASSERT( GetAsianCompressionMode(), "ImplCalcAsianCompression - Why?" );
DBG_ASSERT( pTextPortion->GetLen(), "ImplCalcAsianCompression - Empty Portion?" );
@@ -4425,18 +4424,18 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p
if ( n100thPercentFromMax == 10000 )
pTextPortion->SetExtraInfos( NULL );
- BOOL bCompressed = FALSE;
+ sal_Bool bCompressed = sal_False;
if ( GetScriptType( EditPaM( pNode, nStartPos+1 ) ) == i18n::ScriptType::ASIAN )
{
long nNewPortionWidth = pTextPortion->GetSize().Width();
- USHORT nPortionLen = pTextPortion->GetLen();
- for ( USHORT n = 0; n < nPortionLen; n++ )
+ sal_uInt16 nPortionLen = pTextPortion->GetLen();
+ for ( sal_uInt16 n = 0; n < nPortionLen; n++ )
{
- BYTE nType = GetCharTypeForCompression( pNode->GetChar( n+nStartPos ) );
+ sal_uInt8 nType = GetCharTypeForCompression( pNode->GetChar( n+nStartPos ) );
- BOOL bCompressPunctuation = ( nType == CHAR_PUNCTUATIONLEFT ) || ( nType == CHAR_PUNCTUATIONRIGHT );
- BOOL bCompressKana = ( nType == CHAR_KANA ) && ( GetAsianCompressionMode() == text::CharacterCompressionType::PUNCTUATION_AND_KANA );
+ sal_Bool bCompressPunctuation = ( nType == CHAR_PUNCTUATIONLEFT ) || ( nType == CHAR_PUNCTUATIONRIGHT );
+ sal_Bool bCompressKana = ( nType == CHAR_KANA ) && ( GetAsianCompressionMode() == text::CharacterCompressionType::PUNCTUATION_AND_KANA );
// create Extra infos only if needed...
if ( bCompressPunctuation || bCompressKana )
@@ -4484,9 +4483,9 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p
if ( nCompress )
{
- bCompressed = TRUE;
+ bCompressed = sal_True;
nNewPortionWidth -= nCompress;
- pTextPortion->GetExtraInfos()->bCompressed = TRUE;
+ pTextPortion->GetExtraInfos()->bCompressed = sal_True;
// Special handling for rightpunctuation: For the 'compression' we must
@@ -4502,19 +4501,19 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p
if ( n )
{
// -1: No entry for the last character
- for ( USHORT i = n-1; i < (nPortionLen-1); i++ )
+ for ( sal_uInt16 i = n-1; i < (nPortionLen-1); i++ )
pDXArray[i] -= nCompress;
}
else
{
- pTextPortion->GetExtraInfos()->bFirstCharIsRightPunktuation = TRUE;
+ pTextPortion->GetExtraInfos()->bFirstCharIsRightPunktuation = sal_True;
pTextPortion->GetExtraInfos()->nPortionOffsetX = -nCompress;
}
}
else
{
// -1: No entry for the last character
- for ( USHORT i = n; i < (nPortionLen-1); i++ )
+ for ( sal_uInt16 i = n; i < (nPortionLen-1); i++ )
pDXArray[i] -= nCompress;
}
}
@@ -4544,17 +4543,17 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p
void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, long nRemainingWidth )
{
- BOOL bFoundCompressedPortion = FALSE;
+ sal_Bool bFoundCompressedPortion = sal_False;
long nCompressed = 0;
TextPortionList aCompressedPortions;
- USHORT nPortion = pLine->GetEndPortion();
+ sal_uInt16 nPortion = pLine->GetEndPortion();
TextPortion* pTP = pParaPortion->GetTextPortions()[ nPortion ];
while ( pTP && ( pTP->GetKind() == PORTIONKIND_TEXT ) )
{
if ( pTP->GetExtraInfos() && pTP->GetExtraInfos()->bCompressed )
{
- bFoundCompressedPortion = TRUE;
+ bFoundCompressedPortion = sal_True;
nCompressed += pTP->GetExtraInfos()->nOrgWidth - pTP->GetSize().Width();
aCompressedPortions.Insert( pTP, aCompressedPortions.Count() );
}
@@ -4572,20 +4571,20 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion*
nCompressPercent /= nCompressed;
}
- for ( USHORT n = 0; n < aCompressedPortions.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < aCompressedPortions.Count(); n++ )
{
pTP = aCompressedPortions[n];
- pTP->GetExtraInfos()->bCompressed = FALSE;
+ pTP->GetExtraInfos()->bCompressed = sal_False;
pTP->GetSize().Width() = pTP->GetExtraInfos()->nOrgWidth;
if ( nCompressPercent )
{
- USHORT nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP );
- USHORT nTxtPortionStart = pParaPortion->GetTextPortions().GetStartPos( nTxtPortion );
+ sal_uInt16 nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP );
+ sal_uInt16 nTxtPortionStart = pParaPortion->GetTextPortions().GetStartPos( nTxtPortion );
DBG_ASSERT( nTxtPortionStart >= pLine->GetStart(), "Portion doesn't belong to the line!!!" );
sal_Int32* pDXArray = const_cast< sal_Int32* >( pLine->GetCharPosArray().GetData()+( nTxtPortionStart-pLine->GetStart() ) );
if ( pTP->GetExtraInfos()->pOrgDXArray )
memcpy( pDXArray, pTP->GetExtraInfos()->pOrgDXArray, (pTP->GetLen()-1)*sizeof(sal_Int32) );
- ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, nTxtPortionStart, pDXArray, (USHORT)nCompressPercent, TRUE );
+ ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, nTxtPortionStart, pDXArray, (sal_uInt16)nCompressPercent, sal_True );
}
}
}
@@ -4594,7 +4593,7 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion*
}
// redesigned to work with TextMarkingVector
-void ImpEditEngine::ImplFillTextMarkingVector(const lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const
+void ImpEditEngine::ImplFillTextMarkingVector(const lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen) const
{
// determine relevant logical text elements for the just-rendered
// string of characters.
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index ed020d65ad..48016aafe0 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -94,7 +94,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::linguistic2;
-void SwapUSHORTs( sal_uInt16& rX, sal_uInt16& rY )
+void Swapsal_uIt16s( sal_uInt16& rX, sal_uInt16& rY )
{
sal_uInt16 n = rX;
rX = rY;
@@ -290,7 +290,7 @@ sal_Bool ImpEditEngine::WriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, s
return ( rLst.Count() ? sal_True : sal_False );
}
-void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex, USHORT nScriptType )
+void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex, sal_uInt16 nScriptType )
{
sal_uInt16 nAttr = 0;
EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
@@ -307,7 +307,7 @@ void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex
}
}
-sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel, BOOL bStoreUnicodeStrings ) const
+sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel, sal_Bool bStoreUnicodeStrings ) const
{
BinTextObject* pObj = (BinTextObject*)CreateBinTextObject( aSel, NULL );
pObj->StoreUnicodeStrings( bStoreUnicodeStrings );
@@ -365,21 +365,21 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
aFontTable.Insert( 0, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO ) ) );
aFontTable.Insert( 1, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CJK ) ) );
aFontTable.Insert( 2, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CTL ) ) );
- for ( USHORT nScriptType = 0; nScriptType < 3; nScriptType++ )
+ for ( sal_uInt16 nScriptType = 0; nScriptType < 3; nScriptType++ )
{
- USHORT nWhich = EE_CHAR_FONTINFO;
+ sal_uInt16 nWhich = EE_CHAR_FONTINFO;
if ( nScriptType == 1 )
nWhich = EE_CHAR_FONTINFO_CJK;
else if ( nScriptType == 2 )
nWhich = EE_CHAR_FONTINFO_CTL;
- sal_uInt16 i = 0;
- SvxFontItem* pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem( nWhich, i );
+ sal_uInt32 i = 0;
+ SvxFontItem* pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem2( nWhich, i );
while ( pFontItem )
{
bool bAlreadyExist = false;
- ULONG nTestMax = nScriptType ? aFontTable.Count() : 1;
- for ( ULONG nTest = 0; !bAlreadyExist && ( nTest < nTestMax ); nTest++ )
+ sal_uLong nTestMax = nScriptType ? aFontTable.Count() : 1;
+ for ( sal_uLong nTest = 0; !bAlreadyExist && ( nTest < nTestMax ); nTest++ )
{
bAlreadyExist = *aFontTable.Get( nTest ) == *pFontItem;
}
@@ -387,7 +387,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
if ( !bAlreadyExist )
aFontTable.Insert( aFontTable.Count(), new SvxFontItem( *pFontItem ) );
- pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem( nWhich, ++i );
+ pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem2( nWhich, ++i );
}
}
@@ -443,17 +443,17 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
// Write out ColorList ...
SvxColorList aColorList;
- sal_uInt16 i = 0;
- SvxColorItem* pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_COLOR, i );
+ sal_uInt32 i = 0;
+ SvxColorItem* pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem2( EE_CHAR_COLOR, i );
while ( pColorItem )
{
- USHORT nPos = i;
+ sal_uInt32 nPos = i;
if ( pColorItem->GetValue() == COL_AUTO )
nPos = 0;
aColorList.Insert( new SvxColorItem( *pColorItem ), nPos );
- pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_COLOR, ++i );
+ pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem2( EE_CHAR_COLOR, ++i );
}
- aColorList.Insert( new SvxColorItem( (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR) ), (sal_uInt32)i );
+ aColorList.Insert( new SvxColorItem( (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR) ), i );
rOutput << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
for ( j = 0; j < aColorList.Count(); j++ )
@@ -646,7 +646,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
else
{
aAttribItems.Clear();
- USHORT nScriptType = GetScriptType( EditPaM( pNode, nIndex+1 ) );
+ sal_uInt16 nScriptType = GetScriptType( EditPaM( pNode, nIndex+1 ) );
if ( !n || IsScriptChange( EditPaM( pNode, nIndex ) ) )
{
SfxItemSet aAttribs = GetAttribs( nNode, nIndex+1, nIndex+1 );
@@ -663,8 +663,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
if ( WriteItemListAsRTF( aAttribItems, rOutput, nNode, nIndex, aFontTable, aColorList ) )
rOutput << ' ';
- USHORT nS = nIndex;
- USHORT nE = nIndex + pTextPortion->GetLen();
+ sal_uInt16 nS = nIndex;
+ sal_uInt16 nE = nIndex + pTextPortion->GetLen();
if ( n == nStartPortion )
nS = nStartPos;
if ( n == nEndPortion )
@@ -693,7 +693,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
#if defined (EDITDEBUG) && !defined( UNX )
{
SvFileStream aStream( String( RTL_CONSTASCII_USTRINGPARAM ( "d:\\rtf_out.rtf" ) ), STREAM_WRITE|STREAM_TRUNC );
- ULONG nP = rOutput.Tell();
+ sal_uLong nP = rOutput.Tell();
rOutput.Seek( 0 );
aStream << rOutput;
rOutput.Seek( nP );
@@ -908,7 +908,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
break;
case EE_CHAR_RELIEF:
{
- USHORT nRelief = ((const SvxCharReliefItem&)rItem).GetValue();
+ sal_uInt16 nRelief = ((const SvxCharReliefItem&)rItem).GetValue();
if ( nRelief == RELIEF_EMBOSSED )
rOutput << OOO_STRING_SVTOOLS_RTF_EMBO;
if ( nRelief == RELIEF_ENGRAVED )
@@ -917,7 +917,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
break;
case EE_CHAR_EMPHASISMARK:
{
- USHORT nMark = ((const SvxEmphasisMarkItem&)rItem).GetValue();
+ sal_uInt16 nMark = ((const SvxEmphasisMarkItem&)rItem).GetValue();
if ( nMark == EMPHASISMARK_NONE )
rOutput << OOO_STRING_SVTOOLS_RTF_ACCNONE;
else if ( nMark == EMPHASISMARK_SIDE_DOTS )
@@ -1147,7 +1147,7 @@ EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemP
pX->aLines.Insert( pNew, pX->aLines.Count() );
}
#ifdef DBG_UTIL
- USHORT nTest;
+ sal_uInt16 nTest;
int nTPLen = 0, nTxtLen = 0;
for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; )
nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen();
@@ -1242,7 +1242,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed
sal_uInt16 nNewAttribs = pC->GetAttribs().Count();
if ( nNewAttribs )
{
- BOOL bUpdateFields = FALSE;
+ sal_Bool bUpdateFields = sal_False;
for ( sal_uInt16 nAttr = 0; nAttr < nNewAttribs; nAttr++ )
{
XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr );
@@ -1269,7 +1269,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed
DBG_ASSERT( pAttr->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribute does not fit! (1)" );
aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttr );
if ( pAttr->Which() == EE_FEATURE_FIELD )
- bUpdateFields = TRUE;
+ bUpdateFields = sal_True;
}
else
{
@@ -1343,7 +1343,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed
pParaPortion->GetLines().Insert( pNew, m );
}
#ifdef DBG_UTIL
- USHORT nTest;
+ sal_uInt16 nTest;
int nTPLen = 0, nTxtLen = 0;
for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; )
nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen();
@@ -1381,10 +1381,10 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed
return aSel;
}
-LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, USHORT* pEndPos ) const
+LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, sal_uInt16* pEndPos ) const
{
short nScriptType = GetScriptType( rPaM, pEndPos ); // pEndPos will be valid now, pointing to ScriptChange or NodeLen
- USHORT nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType );
+ sal_uInt16 nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType );
const SvxLanguageItem* pLangItem = &(const SvxLanguageItem&)rPaM.GetNode()->GetContentAttribs().GetItem( nLangId );
EditCharAttrib* pAttr = rPaM.GetNode()->GetCharAttribs().FindAttrib( nLangId, rPaM.GetIndex() );
if ( pAttr )
@@ -1477,15 +1477,15 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang )
{
sal_Bool bHasConvTxt = sal_False;
- USHORT nParas = pEditEngine->GetParagraphCount();
- for (USHORT k = 0; k < nParas; ++k)
+ sal_uInt16 nParas = pEditEngine->GetParagraphCount();
+ for (sal_uInt16 k = 0; k < nParas; ++k)
{
SvUShorts aPortions;
pEditEngine->GetPortions( k, aPortions );
- for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos )
{
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0;
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0;
// if the paragraph is not empty we need to increase the index
// by one since the attribute of the character left to the
@@ -1510,7 +1510,7 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang )
void ImpEditEngine::Convert( EditView* pEditView,
LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont,
- INT32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc )
+ sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc )
{
// modified version of ImpEditEngine::Spell
@@ -1542,7 +1542,7 @@ void ImpEditEngine::Convert( EditView* pEditView,
// not work. Thus since chinese conversion is not interactive we start
// at the begin of the paragraph to solve the problem, i.e. have the
// TextConversion service get those characters together in the same call.
- USHORT nStartIdx = ( editeng::HangulHanjaConversion::IsChinese( nSrcLang ) ) ?
+ sal_uInt16 nStartIdx = ( editeng::HangulHanjaConversion::IsChinese( nSrcLang ) ) ?
0 : aWordStartPaM.GetIndex();
pConvInfo->aConvStart.nIndex = nStartIdx;
}
@@ -1574,12 +1574,12 @@ void ImpEditEngine::Convert( EditView* pEditView,
// disallow formatting, updating the view, ... while
// non-interactively converting the document. (saves time)
//if (!bIsInteractive)
- // SetUpdateMode( FALSE );
+ // SetUpdateMode( sal_False );
aWrp.Convert();
//if (!bIsInteractive)
- //SetUpdateMode( TRUE, 0, TRUE );
+ //SetUpdateMode( sal_True, 0, sal_True );
if ( !bMultipleDoc )
{
@@ -1598,8 +1598,8 @@ void ImpEditEngine::Convert( EditView* pEditView,
void ImpEditEngine::SetLanguageAndFont(
const ESelection &rESel,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId )
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId )
{
ESelection aOldSel = pActiveView->GetSelection();
pActiveView->SetSelection( rESel );
@@ -1654,7 +1654,7 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL
if (bAllowImplicitChangesForNotConvertibleText &&
!pEditEngine->GetText( pConvInfo->aConvContinue.nPara ).Len())
{
- USHORT nPara = pConvInfo->aConvContinue.nPara;
+ sal_uInt16 nPara = pConvInfo->aConvContinue.nPara;
ESelection aESel( nPara, 0, nPara, 0 );
// see comment for below same function call
SetLanguageAndFont( aESel,
@@ -1667,22 +1667,22 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL
pConvInfo->aConvContinue.nIndex >= pConvInfo->aConvTo.nIndex)
break;
- USHORT nAttribStart = USHRT_MAX;
- USHORT nAttribEnd = USHRT_MAX;
- USHORT nCurPos = USHRT_MAX;
+ sal_uInt16 nAttribStart = USHRT_MAX;
+ sal_uInt16 nAttribEnd = USHRT_MAX;
+ sal_uInt16 nCurPos = USHRT_MAX;
EPaM aCurStart = CreateEPaM( aCurSel.Min() );
SvUShorts aPortions;
- pEditEngine->GetPortions( (USHORT)aCurStart.nPara, aPortions );
- for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos )
+ pEditEngine->GetPortions( (sal_uInt16)aCurStart.nPara, aPortions );
+ for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos )
{
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0;
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0;
// the language attribute is obtained from the left character
// (like usually all other attributes)
// thus we usually have to add 1 in order to get the language
// of the text right to the cursor position
- USHORT nLangIdx = nEnd > nStart ? nStart + 1 : nStart;
+ sal_uInt16 nLangIdx = nEnd > nStart ? nStart + 1 : nStart;
LanguageType nLangFound = pEditEngine->GetLanguage( aCurStart.nPara, nLangIdx );
#ifdef DEBUG
lang::Locale aLocale( SvxCreateLocale( nLangFound ) );
@@ -2040,7 +2040,7 @@ void ImpEditEngine::AddPortionIterated(
pFieldAttr->GetStart() == aCursor.GetIndex() &&
pFieldAttr->GetStart() != pFieldAttr->GetEnd() &&
pFieldAttr->Which() == EE_FEATURE_FIELD;
- USHORT nEndField = bIsField ? pFieldAttr->GetEnd() : USHRT_MAX;
+ sal_uInt16 nEndField = bIsField ? pFieldAttr->GetEnd() : USHRT_MAX;
bool bIsEndField = false;
do
{
@@ -2119,8 +2119,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
rEditView.pImpEditView->SetEditSelection( aCurrentOldPosition->Max() );
}
- USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
- USHORT nLangWhichId = EE_CHAR_LANGUAGE;
+ sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
+ sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
@@ -2166,8 +2166,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
LanguageType eCurLanguage = GetLanguage( aCurrentPaM );
if(eCurLanguage != aCurrentNewPortion->eLanguage)
{
- USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
- USHORT nLangWhichId = EE_CHAR_LANGUAGE;
+ sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
+ sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
@@ -2197,9 +2197,9 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
aNext = EditPaM( aOldSel.Max().GetNode(), nEndOfSentence );
}
rEditView.pImpEditView->SetEditSelection( aNext );
-
+
FormatAndUpdate();
- aEditDoc.SetModified(TRUE);
+ aEditDoc.SetModified(sal_True);
}
}
@@ -2539,7 +2539,7 @@ sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxS
return nFound;
}
-BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditView )
+sal_Bool ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditView )
{
EditSelection aSel( pEditView->pImpEditView->GetEditSelection() );
aSel.Adjust( aEditDoc );
@@ -2548,7 +2548,7 @@ BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditVie
aStartPaM = aSel.Min();
EditSelection aFoundSel;
- BOOL bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel );
+ sal_Bool bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel );
if ( bFound && ( aFoundSel == aSel ) ) // For backwards-search
{
aStartPaM = aSel.Min();
@@ -2560,14 +2560,14 @@ BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditVie
{
// First, set the minimum, so the whole word is in the visible range.
pEditView->pImpEditView->SetEditSelection( aFoundSel.Min() );
- pEditView->ShowCursor( TRUE, FALSE );
+ pEditView->ShowCursor( sal_True, sal_False );
pEditView->pImpEditView->SetEditSelection( aFoundSel );
}
else
pEditView->pImpEditView->SetEditSelection( aSel.Max() );
pEditView->pImpEditView->DrawSelection();
- pEditView->ShowCursor( TRUE, FALSE );
+ pEditView->ShowCursor( sal_True, sal_False );
return bFound;
}
@@ -2625,7 +2625,7 @@ sal_Bool ImpEditEngine::ImpSearch( const SvxSearchItem& rSearchItem,
bool bFound = false;
if ( bBack )
{
- SwapUSHORTs( nStartPos, nEndPos );
+ Swapsal_uIt16s( nStartPos, nEndPos );
bFound = aSearcher.SearchBkwrd( aParaStr, &nStartPos, &nEndPos);
}
else
@@ -2665,7 +2665,7 @@ void ImpEditEngine::SetAutoCompleteText( const String& rStr, sal_Bool bClearTipW
struct TransliterationChgData
{
- USHORT nStart;
+ sal_uInt16 nStart;
xub_StrLen nLen;
EditSelection aSelection;
String aNewText;
@@ -2687,17 +2687,17 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
EditSelection aNewSel( aSel );
- const USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
- const USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ const sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ const sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
- BOOL bChanges = FALSE;
- BOOL bLenChanged = FALSE;
+ sal_Bool bChanges = sal_False;
+ sal_Bool bLenChanged = sal_False;
EditUndoTransliteration* pUndo = NULL;
utl::TransliterationWrapper aTranslitarationWrapper( ::comphelper::getProcessServiceFactory(), nTransliterationMode );
- BOOL bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode();
+ sal_Bool bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode();
- for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
{
ContentNode* pNode = aEditDoc.GetObject( nNode );
xub_StrLen nStartPos = 0;
@@ -2707,8 +2707,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
if ( nNode == nEndNode ) // can also be == nStart!
nEndPos = aSel.Max().GetIndex();
- USHORT nCurrentStart = nStartPos;
- USHORT nCurrentEnd = nEndPos;
+ sal_uInt16 nCurrentStart = nStartPos;
+ sal_uInt16 nCurrentEnd = nEndPos;
sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
// since we don't use Hiragana/Katakana or half-width/full-width transliterations here
@@ -2735,12 +2735,12 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
i18n::Boundary aEndBndry;
aSttBndry = _xBI->getWordBoundary(
*pNode, nStartPos,
- SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ),
- nWordType, TRUE /*prefer forward direction*/);
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ),
+ nWordType, sal_True /*prefer forward direction*/);
aEndBndry = _xBI->getWordBoundary(
*pNode, nEndPos,
- SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ),
- nWordType, FALSE /*prefer backward direction*/);
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ),
+ nWordType, sal_False /*prefer backward direction*/);
// prevent backtracking to the previous word if selection is at word boundary
if (aSttBndry.endPos <= nStartPos)
@@ -2950,22 +2950,22 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
{
const TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ];
- bChanges = TRUE;
+ bChanges = sal_True;
if (rData.nLen != rData.aNewText.Len())
- bLenChanged = TRUE;
+ bLenChanged = sal_True;
// Change text without loosing the attributes
- USHORT nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(),
+ sal_uInt16 nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(),
rData.nStart, rData.nLen, rData.aNewText, rData.aOffsets );
// adjust selection in end node to possibly changed size
if (aSel.Max().GetNode() == rData.aSelection.Max().GetNode())
aNewSel.Max().GetIndex() = aNewSel.Max().GetIndex() + nDiffs;
- USHORT nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() );
+ sal_uInt16 nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() );
ParaPortion* pParaPortion = GetParaPortions()[nSelNode];
- pParaPortion->MarkSelectionInvalid( rData.nStart,
- std::max< USHORT >( rData.nStart + rData.nLen,
+ pParaPortion->MarkSelectionInvalid( rData.nStart,
+ std::max< sal_uInt16 >( rData.nStart + rData.nLen,
rData.nStart + rData.aNewText.Len() ) );
}
}
@@ -2993,20 +2993,20 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
short ImpEditEngine::ReplaceTextOnly(
ContentNode* pNode,
- USHORT nCurrentStart, xub_StrLen nLen,
+ sal_uInt16 nCurrentStart, xub_StrLen nLen,
const String& rNewText,
const uno::Sequence< sal_Int32 >& rOffsets )
{
(void) nLen;
// Change text without loosing the attributes
- USHORT nCharsAfterTransliteration =
- sal::static_int_cast< USHORT >(rOffsets.getLength());
+ sal_uInt16 nCharsAfterTransliteration =
+ sal::static_int_cast< sal_uInt16 >(rOffsets.getLength());
const sal_Int32* pOffsets = rOffsets.getConstArray();
short nDiffs = 0;
- for ( USHORT n = 0; n < nCharsAfterTransliteration; n++ )
+ for ( sal_uInt16 n = 0; n < nCharsAfterTransliteration; n++ )
{
- USHORT nCurrentPos = nCurrentStart+n;
+ sal_uInt16 nCurrentPos = nCurrentStart+n;
sal_Int32 nDiff = (nCurrentPos-nDiffs) - pOffsets[n];
if ( !nDiff )
@@ -3021,7 +3021,7 @@ short ImpEditEngine::ReplaceTextOnly(
pNode->SetChar( nCurrentPos, rNewText.GetChar(n) );
DBG_ASSERT( (nCurrentPos+1) < pNode->Len(), "TransliterateText - String smaller than expected!" );
- GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< USHORT >(-nDiff) );
+ GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< sal_uInt16 >(-nDiff) );
}
else
{
@@ -3036,7 +3036,7 @@ short ImpEditEngine::ReplaceTextOnly(
}
-void ImpEditEngine::SetAsianCompressionMode( USHORT n )
+void ImpEditEngine::SetAsianCompressionMode( sal_uInt16 n )
{
if ( n != nAsianCompressionMode )
{
@@ -3049,7 +3049,7 @@ void ImpEditEngine::SetAsianCompressionMode( USHORT n )
}
}
-void ImpEditEngine::SetKernAsianPunctuation( BOOL b )
+void ImpEditEngine::SetKernAsianPunctuation( sal_Bool b )
{
if ( b != bKernAsianPunctuation )
{
@@ -3062,7 +3062,7 @@ void ImpEditEngine::SetKernAsianPunctuation( BOOL b )
}
}
-void ImpEditEngine::SetAddExtLeading( BOOL bExtLeading )
+void ImpEditEngine::SetAddExtLeading( sal_Bool bExtLeading )
{
if ( IsAddExtLeading() != bExtLeading )
{
@@ -3077,7 +3077,7 @@ void ImpEditEngine::SetAddExtLeading( BOOL bExtLeading )
-BOOL ImpEditEngine::ImplHasText() const
+sal_Bool ImpEditEngine::ImplHasText() const
{
return ( ( GetEditDoc().Count() > 1 ) || GetEditDoc().GetObject(0)->Len() );
}
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 2f9b039521..80b6e2dd7f 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -48,7 +48,7 @@ void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
}
}
-SfxStyleSheet* ImpEditEngine::GetStyleSheet( USHORT nPara ) const
+SfxStyleSheet* ImpEditEngine::GetStyleSheet( sal_uInt16 nPara ) const
{
ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
return pNode ? pNode->GetContentAttribs().GetStyleSheet() : NULL;
@@ -58,19 +58,19 @@ void ImpEditEngine::SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle )
{
aSel.Adjust( aEditDoc );
- USHORT nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() );
- USHORT nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() );
+ sal_uInt16 nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() );
- BOOL _bUpdate = GetUpdateMode();
- SetUpdateMode( FALSE );
+ sal_Bool _bUpdate = GetUpdateMode();
+ SetUpdateMode( sal_False );
- for ( USHORT n = nStartPara; n <= nEndPara; n++ )
+ for ( sal_uInt16 n = nStartPara; n <= nEndPara; n++ )
SetStyleSheet( n, pStyle );
SetUpdateMode( _bUpdate, 0 );
}
-void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle )
+void ImpEditEngine::SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle )
{
DBG_ASSERT( GetStyleSheetPool() || !pStyle, "SetStyleSheet: No StyleSheetPool registered!" );
ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
@@ -94,10 +94,10 @@ void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle )
pNode->GetContentAttribs().GetItems() ) );
}
if ( pCurStyle )
- EndListening( *pCurStyle, FALSE );
+ EndListening( *pCurStyle, sal_False );
pNode->SetStyleSheet( pStyle, aStatus.UseCharAttribs() );
if ( pStyle )
- StartListening( *pStyle, FALSE );
+ StartListening( *pStyle, sal_False );
ParaAttribsChanged( pNode );
}
FormatAndUpdate();
@@ -108,17 +108,17 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle )
SvxFont aFontFromStyle;
CreateFont( aFontFromStyle, pStyle->GetItemSet() );
- BOOL bUsed = FALSE;
- for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ )
+ sal_Bool bUsed = sal_False;
+ for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ )
{
ContentNode* pNode = aEditDoc.GetObject( nNode );
if ( pNode->GetStyleSheet() == pStyle )
{
- bUsed = TRUE;
+ bUsed = sal_True;
if ( aStatus.UseCharAttribs() )
pNode->SetStyleSheet( pStyle, aFontFromStyle );
else
- pNode->SetStyleSheet( pStyle, FALSE );
+ pNode->SetStyleSheet( pStyle, sal_False );
ParaAttribsChanged( pNode );
}
@@ -132,7 +132,7 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle )
void ImpEditEngine::RemoveStyleFromParagraphs( SfxStyleSheet* pStyle )
{
- for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ )
+ for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ )
{
ContentNode* pNode = aEditDoc.GetObject(nNode);
if ( pNode->GetStyleSheet() == pStyle )
@@ -152,7 +152,7 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
SfxStyleSheet* pStyle = NULL;
- ULONG nId = 0;
+ sal_uLong nId = 0;
if ( rHint.ISA( SfxStyleSheetHint ) )
{
@@ -191,8 +191,8 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S
ESelection aESel( CreateESel( aSel ) );
- USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
- USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
DBG_ASSERT( nStartNode <= nEndNode, "CreateAttribUndo: Start > End ?!" );
@@ -210,14 +210,14 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S
SfxItemPool* pPool = pUndo->GetNewAttribs().GetPool();
- for ( USHORT nPara = nStartNode; nPara <= nEndNode; nPara++ )
+ for ( sal_uInt16 nPara = nStartNode; nPara <= nEndNode; nPara++ )
{
ContentNode* pNode = aEditDoc.GetObject( nPara );
DBG_ASSERT( aEditDoc.SaveGetObject( nPara ), "Node not found: CreateAttribUndo" );
ContentAttribsInfo* pInf = new ContentAttribsInfo( pNode->GetContentAttribs().GetItems() );
pUndo->GetContentInfos().Insert( pInf, pUndo->GetContentInfos().Count() );
- for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
{
EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ];
if ( pAttr->GetLen() )
@@ -230,7 +230,7 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S
return pUndo;
}
-void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel )
+void ImpEditEngine::UndoActionStart( sal_uInt16 nId, const ESelection& aSel )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@@ -240,7 +240,7 @@ void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel )
}
}
-void ImpEditEngine::UndoActionStart( USHORT nId )
+void ImpEditEngine::UndoActionStart( sal_uInt16 nId )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@@ -249,7 +249,7 @@ void ImpEditEngine::UndoActionStart( USHORT nId )
}
}
-void ImpEditEngine::UndoActionEnd( USHORT )
+void ImpEditEngine::UndoActionEnd( sal_uInt16 )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@@ -259,13 +259,13 @@ void ImpEditEngine::UndoActionEnd( USHORT )
}
}
-void ImpEditEngine::InsertUndo( EditUndo* pUndo, BOOL bTryMerge )
+void ImpEditEngine::InsertUndo( EditUndo* pUndo, sal_Bool bTryMerge )
{
DBG_ASSERT( !IsInUndo(), "InsertUndo in Undomodus!" );
if ( pUndoMarkSelection )
{
EditUndoMarkSelection* pU = new EditUndoMarkSelection( this, *pUndoMarkSelection );
- GetUndoManager().AddUndoAction( pU, FALSE );
+ GetUndoManager().AddUndoAction( pU, sal_False );
delete pUndoMarkSelection;
pUndoMarkSelection = NULL;
}
@@ -280,7 +280,7 @@ void ImpEditEngine::ResetUndoManager()
GetUndoManager().Clear();
}
-void ImpEditEngine::EnableUndo( BOOL bEnable )
+void ImpEditEngine::EnableUndo( sal_Bool bEnable )
{
// When switching the mode Delete list:
if ( bEnable != IsUndoEnabled() )
@@ -289,39 +289,39 @@ void ImpEditEngine::EnableUndo( BOOL bEnable )
bUndoEnabled = bEnable;
}
-BOOL ImpEditEngine::Undo( EditView* pView )
+sal_Bool ImpEditEngine::Undo( EditView* pView )
{
if ( HasUndoManager() && GetUndoManager().GetUndoActionCount() )
{
SetActiveView( pView );
- GetUndoManager().Undo( 1 );
- return TRUE;
+ GetUndoManager().Undo();
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ImpEditEngine::Redo( EditView* pView )
+sal_Bool ImpEditEngine::Redo( EditView* pView )
{
if ( HasUndoManager() && GetUndoManager().GetRedoActionCount() )
{
SetActiveView( pView );
- GetUndoManager().Redo( 0 );
- return TRUE;
+ GetUndoManager().Redo();
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ImpEditEngine::Repeat( EditView* /* pView */ )
+sal_Bool ImpEditEngine::Repeat( EditView* /* pView */ )
{
if ( HasUndoManager() && GetUndoManager().GetRepeatActionCount() )
{
DBG_WARNING( "Repeat not implemented!" );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib )
+SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttrib )
{
DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
@@ -329,11 +329,11 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib )
SfxItemSet aCurSet( GetEmptyItemSet() );
- USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
- USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
// iterate over the paragraphs ...
- for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
{
ContentNode* pNode = aEditDoc.GetObject( nNode );
DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node not found: GetAttrib" );
@@ -356,7 +356,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib )
if( bOnlyHardAttrib != EditEngineAttribs_OnlyHard )
{
// and then paragraph formatting and template...
- for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+ for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
{
if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
@@ -402,7 +402,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib )
// fill empty slots with defaults ...
if ( bOnlyHardAttrib == EditEngineAttribs_All )
{
- for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ )
+ for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ )
{
if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
@@ -414,7 +414,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib )
}
-SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const
+SfxItemSet ImpEditEngine::GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const
{
// Optimized function with less Puts(), which cause unnecessary cloning from default items.
// If this works, change GetAttribs( EditSelection ) to use this for each paragraph and merge the results!
@@ -438,7 +438,7 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd,
// StyleSheet / Parattribs...
if ( pNode->GetStyleSheet() && ( nFlags & GETATTRIBS_STYLESHEET ) )
- aAttribs.Set( pNode->GetStyleSheet()->GetItemSet(), TRUE );
+ aAttribs.Set( pNode->GetStyleSheet()->GetItemSet(), sal_True );
if ( nFlags & GETATTRIBS_PARAATTRIBS )
aAttribs.Put( pNode->GetContentAttribs().GetItems() );
@@ -451,13 +451,13 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd,
pNode->GetCharAttribs().OptimizeRanges( ((ImpEditEngine*)this)->GetEditDoc().GetItemPool() );
const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
- for ( USHORT nAttr = 0; nAttr < rAttrs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ )
{
EditCharAttrib* pAttr = rAttrs.GetObject( nAttr );
if ( nStart == nEnd )
{
- USHORT nCursorPos = nStart;
+ sal_uInt16 nCursorPos = nStart;
if ( ( pAttr->GetStart() <= nCursorPos ) && ( pAttr->GetEnd() >= nCursorPos ) )
{
// To be used the attribute has to start BEFORE the position, or it must be a
@@ -505,17 +505,17 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd,
}
-void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial )
+void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_uInt8 nSpecial )
{
aSel.Adjust( aEditDoc );
// When no selection => use the Attribute on the word.
// ( the RTF-parser should actually never call the Method whithout a Range )
if ( ( nSpecial == ATTRSPECIAL_WHOLEWORD ) && !aSel.HasRange() )
- aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, FALSE );
+ aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_False );
- USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
- USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() )
{
@@ -524,7 +524,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE
InsertUndo( pUndo );
}
- BOOL bCheckLanguage = FALSE;
+ sal_Bool bCheckLanguage = sal_False;
if ( GetStatus().DoOnlineSpelling() )
{
bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SFX_ITEM_ON ) ||
@@ -533,10 +533,10 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE
}
// iterate over the paragraphs ...
- for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
{
- BOOL bParaAttribFound = FALSE;
- BOOL bCharAttribFound = FALSE;
+ sal_Bool bParaAttribFound = sal_False;
+ sal_Bool bCharAttribFound = sal_False;
ContentNode* pNode = aEditDoc.GetObject( nNode );
ParaPortion* pPortion = GetParaPortions().GetObject( nNode );
@@ -557,12 +557,12 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE
// if ( fp )
// {
// fprintf( fp, "\n\n=> Character-Attribute: Paragraph %i, %i-%i\n", nNode, nStartPos, nEndPos );
-// DbgOutItemSet( fp, rSet, TRUE, FALSE );
+// DbgOutItemSet( fp, rSet, sal_True, sal_False );
// fclose( fp );
// }
#endif
- for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+ for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
{
if ( rSet.GetItemState( nWhich ) == SFX_ITEM_ON )
{
@@ -570,17 +570,17 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE
if ( nWhich <= EE_PARA_END )
{
pNode->GetContentAttribs().GetItems().Put( rItem );
- bParaAttribFound = TRUE;
+ bParaAttribFound = sal_True;
}
else
{
aEditDoc.InsertAttrib( pNode, nStartPos, nEndPos, rItem );
- bCharAttribFound = TRUE;
+ bCharAttribFound = sal_True;
if ( nSpecial == ATTRSPECIAL_EDGE )
{
CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
- USHORT nAttrs = rAttribs.Count();
- for ( USHORT n = 0; n < nAttrs; n++ )
+ sal_uInt16 nAttrs = rAttribs.Count();
+ for ( sal_uInt16 n = 0; n < nAttrs; n++ )
{
EditCharAttrib* pAttr = rAttribs.GetObject( n );
if ( pAttr->GetStart() > nEndPos )
@@ -588,7 +588,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE
if ( ( pAttr->GetEnd() == nEndPos ) && ( pAttr->Which() == nWhich ) )
{
- pAttr->SetEdge( TRUE );
+ pAttr->SetEdge( sal_True );
break;
}
}
@@ -603,7 +603,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE
}
else if ( bCharAttribFound )
{
- bFormatted = FALSE;
+ bFormatted = sal_False;
if ( !pNode->Len() || ( nStartPos != nEndPos ) )
{
pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos );
@@ -614,12 +614,12 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE
}
}
-void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttribs, USHORT nWhich )
+void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich )
{
aSel.Adjust( aEditDoc );
- USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
- USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
const SfxItemSet* _pEmptyItemSet = bRemoveParaAttribs ? &GetEmptyItemSet() : 0;
@@ -627,14 +627,14 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri
{
// Possibly a special Undo, or itemset*
EditUndoSetAttribs* pUndo = CreateAttribUndo( aSel, GetEmptyItemSet() );
- pUndo->SetRemoveAttribs( TRUE );
+ pUndo->SetRemoveAttribs( sal_True );
pUndo->SetRemoveParaAttribs( bRemoveParaAttribs );
pUndo->SetRemoveWhich( nWhich );
InsertUndo( pUndo );
}
// iterate over the paragraphs ...
- for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
{
ContentNode* pNode = aEditDoc.GetObject( nNode );
ParaPortion* pPortion = GetParaPortions().GetObject( nNode );
@@ -650,7 +650,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri
nEndPos = aSel.Max().GetIndex();
// Optimize: If whole paragraph, then RemoveCharAttribs (nPara)?
- BOOL bChanged = aEditDoc.RemoveAttribs( pNode, nStartPos, nEndPos, nWhich );
+ sal_Bool bChanged = aEditDoc.RemoveAttribs( pNode, nStartPos, nEndPos, nWhich );
if ( bRemoveParaAttribs )
{
SetParaAttribs( nNode, *_pEmptyItemSet ); // Invalidated
@@ -666,7 +666,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri
if ( !nWhich )
{
SfxItemSet aAttribs( GetParaAttribs( nNode ) );
- for ( USHORT nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ )
+ for ( sal_uInt16 nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ )
aAttribs.ClearItem( nW );
SetParaAttribs( nNode, aAttribs );
}
@@ -674,7 +674,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri
if ( bChanged && !bRemoveParaAttribs )
{
- bFormatted = FALSE;
+ bFormatted = sal_False;
pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos );
}
}
@@ -682,7 +682,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri
typedef EditCharAttrib* EditCharAttribPtr;
-void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemoveFeatures )
+void ImpEditEngine::RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich, sal_Bool bRemoveFeatures )
{
ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
ParaPortion* pPortion = GetParaPortions().SaveGetObject( nPara );
@@ -693,7 +693,7 @@ void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemove
if ( !pNode )
return;
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
EditCharAttribPtr pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
while ( pAttr )
{
@@ -711,7 +711,7 @@ void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemove
pPortion->MarkSelectionInvalid( 0, pNode->Len() );
}
-void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void ImpEditEngine::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
@@ -723,7 +723,7 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
// if ( fp )
// {
// fprintf( fp, "\n\n=> Paragraph-Attribute: Paragraph %i\n", nPara );
-// DbgOutItemSet( fp, rSet, TRUE, FALSE );
+// DbgOutItemSet( fp, rSet, sal_True, sal_False );
// fclose( fp );
// }
#endif
@@ -751,14 +751,14 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
}
}
-const SfxItemSet& ImpEditEngine::GetParaAttribs( USHORT nPara ) const
+const SfxItemSet& ImpEditEngine::GetParaAttribs( sal_uInt16 nPara ) const
{
ContentNode* pNode = aEditDoc.GetObject( nPara );
DBG_ASSERT( pNode, "Node not found: GetParaAttribs" );
return pNode->GetContentAttribs().GetItems();
}
-BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const
+sal_Bool ImpEditEngine::HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
ContentNode* pNode = aEditDoc.GetObject( nPara );
DBG_ASSERT( pNode, "Node not found: HasParaAttrib" );
@@ -766,7 +766,7 @@ BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const
return pNode->GetContentAttribs().HasItem( nWhich );
}
-const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich ) const
+const SfxPoolItem& ImpEditEngine::GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
ContentNode* pNode = aEditDoc.GetObject( nPara );
DBG_ASSERT( pNode, "Node not found: GetParaAttrib" );
@@ -774,13 +774,13 @@ const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich ) c
return pNode->GetContentAttribs().GetItem( nWhich );
}
-void ImpEditEngine::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const
+void ImpEditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const
{
rLst.Remove( 0, rLst.Count() );
ContentNode* pNode = aEditDoc.GetObject( nPara );
if ( pNode )
{
- for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
{
EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ];
EECharAttrib aEEAttr;
@@ -797,13 +797,13 @@ void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode )
{
pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() );
xub_StrLen nEndPos = pNode->Len();
- for ( USHORT nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich++ )
+ for ( sal_uInt16 nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich++ )
{
if ( pNode->GetContentAttribs().HasItem( nWhich ) )
{
const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
// Fill the gap:
- USHORT nLastEnd = 0;
+ sal_uInt16 nLastEnd = 0;
EditCharAttrib* pAttr = pNode->GetCharAttribs().FindNextAttrib( nWhich, nLastEnd );
while ( pAttr )
{
@@ -819,7 +819,7 @@ void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode )
aEditDoc.InsertAttrib( pNode, nLastEnd, nEndPos, rItem );
}
}
- bFormatted = FALSE;
+ bFormatted = sal_False;
// Portion does not need to be invalidated here, happens elsewhere.
}
@@ -861,9 +861,9 @@ ImplIMEInfos::ImplIMEInfos( const EditPaM& rPos, const String& rOldTextAfterStar
{
aPos = rPos;
nLen = 0;
- bCursor = TRUE;
+ bCursor = sal_True;
pAttribs = NULL;
- bWasCursorOverwrite = FALSE;
+ bWasCursorOverwrite = sal_False;
}
ImplIMEInfos::~ImplIMEInfos()
@@ -871,12 +871,12 @@ ImplIMEInfos::~ImplIMEInfos()
delete[] pAttribs;
}
-void ImplIMEInfos::CopyAttribs( const USHORT* pA, USHORT nL )
+void ImplIMEInfos::CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL )
{
nLen = nL;
delete[] pAttribs;
- pAttribs = new USHORT[ nL ];
- memcpy( pAttribs, pA, nL*sizeof(USHORT) );
+ pAttribs = new sal_uInt16[ nL ];
+ memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) );
}
void ImplIMEInfos::DestroyAttribs()
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index baf960f4f9..262f1330c9 100644..100755
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -63,7 +63,7 @@ TextConvWrapper::TextConvWrapper( Window* pWindow,
const Font* pTargetFont,
sal_Int32 nOptions,
sal_Bool bIsInteractive,
- BOOL bIsStart,
+ sal_Bool bIsStart,
EditView* pView ) :
HangulHanjaConversion( pWindow, rxMSF, rSourceLocale, rTargetLocale, pTargetFont, nOptions, bIsInteractive )
{
@@ -259,8 +259,8 @@ sal_Bool TextConvWrapper::ConvContinue_impl()
void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId )
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId )
{
ESelection aOldSel = pEditView->GetSelection();
pEditView->SetSelection( rESel );
@@ -294,7 +294,7 @@ void TextConvWrapper::SelectNewUnit_impl(
const sal_Int32 nUnitStart,
const sal_Int32 nUnitEnd )
{
- BOOL bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd;
+ sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd;
DBG_ASSERT( bOK, "invalid arguments" );
if (!bOK)
return;
@@ -302,8 +302,8 @@ void TextConvWrapper::SelectNewUnit_impl(
ESelection aSelection = pEditView->GetSelection();
DBG_ASSERT( aSelection.nStartPara == aSelection.nEndPara,
"paragraph mismatch in selection" );
- aSelection.nStartPos = (USHORT) (nLastPos + nUnitOffset + nUnitStart);
- aSelection.nEndPos = (USHORT) (nLastPos + nUnitOffset + nUnitEnd);
+ aSelection.nStartPos = (sal_uInt16) (nLastPos + nUnitOffset + nUnitStart);
+ aSelection.nEndPos = (sal_uInt16) (nLastPos + nUnitOffset + nUnitEnd);
pEditView->SetSelection( aSelection );
}
@@ -345,7 +345,7 @@ void TextConvWrapper::ReplaceUnit(
ReplacementAction eAction,
LanguageType *pNewUnitLanguage )
{
- BOOL bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd;
+ sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd;
DBG_ASSERT( bOK, "invalid arguments" );
if (!bOK)
return;
@@ -378,7 +378,7 @@ void TextConvWrapper::ReplaceUnit(
default:
OSL_FAIL( "unexpected case" );
}
- nUnitOffset = sal::static_int_cast< USHORT >(
+ nUnitOffset = sal::static_int_cast< sal_uInt16 >(
nUnitOffset + nUnitStart + aNewTxt.getLength());
// remember current original language for kater use
@@ -431,13 +431,13 @@ void TextConvWrapper::ReplaceUnit(
{
// Note: replacement is always done in the current paragraph
// which is the one ConvContinue points to
- pConvInfo->aConvContinue.nIndex = sal::static_int_cast< USHORT >(
+ pConvInfo->aConvContinue.nIndex = sal::static_int_cast< sal_uInt16 >(
pConvInfo->aConvContinue.nIndex + nDelta);
// if that is the same as the one where the conversions ends
// the end needs to be updated also
if (pConvInfo->aConvTo.nPara == pConvInfo->aConvContinue.nPara)
- pConvInfo->aConvTo.nIndex = sal::static_int_cast< USHORT >(
+ pConvInfo->aConvTo.nIndex = sal::static_int_cast< sal_uInt16 >(
pConvInfo->aConvTo.nIndex + nDelta);
}
}
diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx
index e8d17075d7..3323e53035 100644..100755
--- a/editeng/source/editeng/textconv.hxx
+++ b/editeng/source/editeng/textconv.hxx
@@ -42,8 +42,8 @@ class TextConvWrapper : public editeng::HangulHanjaConversion
{
rtl::OUString aConvText; // convertible text part found last time
LanguageType nConvTextLang; // language of aConvText
- USHORT nLastPos; // starting position of the last found text portion (word)
- USHORT nUnitOffset; // offset of current unit in the current text portion (word)
+ sal_uInt16 nLastPos; // starting position of the last found text portion (word)
+ sal_uInt16 nUnitOffset; // offset of current unit in the current text portion (word)
ESelection aConvSel; // selection to be converted if
// 'HasRange' is true, other conversion
@@ -100,8 +100,8 @@ protected:
virtual sal_Bool HasRubySupport() const;
void SetLanguageAndFont( const ESelection &rESel,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId );
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId );
public:
@@ -110,9 +110,9 @@ public:
const ::com::sun::star::lang::Locale& rSourceLocale,
const ::com::sun::star::lang::Locale& rTargetLocale,
const Font* pTargetFont,
- INT32 nOptions,
+ sal_Int32 nOptions,
sal_Bool bIsInteractive,
- BOOL bIsStart, EditView* pView );
+ sal_Bool bIsStart, EditView* pView );
virtual ~TextConvWrapper();
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index f58f4b486d..b950714436 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -40,7 +40,7 @@
#include <tools/tenccvt.hxx>
-#define BULITEM_VERSION ((USHORT)2)
+#define BULITEM_VERSION ((sal_uInt16)2)
// -----------------------------------------------------------------------
@@ -50,20 +50,20 @@ TYPEINIT1(SvxBulletItem,SfxPoolItem);
void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont )
{
- USHORT nTemp;
+ sal_uInt16 nTemp;
rStream << rFont.GetColor();
- nTemp = (USHORT)rFont.GetFamily(); rStream << nTemp;
+ nTemp = (sal_uInt16)rFont.GetFamily(); rStream << nTemp;
- nTemp = (USHORT)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion());
+ nTemp = (sal_uInt16)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion());
rStream << nTemp;
- nTemp = (USHORT)rFont.GetPitch(); rStream << nTemp;
- nTemp = (USHORT)rFont.GetAlign(); rStream << nTemp;
- nTemp = (USHORT)rFont.GetWeight(); rStream << nTemp;
- nTemp = (USHORT)rFont.GetUnderline(); rStream << nTemp;
- nTemp = (USHORT)rFont.GetStrikeout(); rStream << nTemp;
- nTemp = (USHORT)rFont.GetItalic(); rStream << nTemp;
+ nTemp = (sal_uInt16)rFont.GetPitch(); rStream << nTemp;
+ nTemp = (sal_uInt16)rFont.GetAlign(); rStream << nTemp;
+ nTemp = (sal_uInt16)rFont.GetWeight(); rStream << nTemp;
+ nTemp = (sal_uInt16)rFont.GetUnderline(); rStream << nTemp;
+ nTemp = (sal_uInt16)rFont.GetStrikeout(); rStream << nTemp;
+ nTemp = (sal_uInt16)rFont.GetItalic(); rStream << nTemp;
// UNICODE: rStream << rFont.GetName();
rStream.WriteByteString(rFont.GetName());
@@ -75,12 +75,12 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont )
// -----------------------------------------------------------------------
-Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer )
+Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer )
{
Font aFont;
Color aColor;
rStream >> aColor; aFont.SetColor( aColor );
- USHORT nTemp;
+ sal_uInt16 nTemp;
rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp);
rStream >> nTemp;
@@ -106,7 +106,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer )
aFont.SetSize( aSize );
}
- BOOL bTemp;
+ sal_Bool bTemp;
rStream >> bTemp; aFont.SetOutline( bTemp );
rStream >> bTemp; aFont.SetShadow( bTemp );
rStream >> bTemp; aFont.SetTransparent( bTemp );
@@ -116,7 +116,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer )
// -----------------------------------------------------------------------
-SvxBulletItem::SvxBulletItem( USHORT _nWhich ) : SfxPoolItem( _nWhich )
+SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
{
SetDefaultFont_Impl();
SetDefaults_Impl();
@@ -125,7 +125,7 @@ SvxBulletItem::SvxBulletItem( USHORT _nWhich ) : SfxPoolItem( _nWhich )
// -----------------------------------------------------------------------
-SvxBulletItem::SvxBulletItem( BYTE nNewStyle, const Font& rFont, USHORT /*nStart*/, USHORT _nWhich ) : SfxPoolItem( _nWhich )
+SvxBulletItem::SvxBulletItem( sal_uInt8 nNewStyle, const Font& rFont, sal_uInt16 /*nStart*/, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
{
SetDefaults_Impl();
nStyle = nNewStyle;
@@ -135,7 +135,7 @@ SvxBulletItem::SvxBulletItem( BYTE nNewStyle, const Font& rFont, USHORT /*nStart
// -----------------------------------------------------------------------
-SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, USHORT _nWhich ) : SfxPoolItem( _nWhich )
+SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
{
SetDefaults_Impl();
aFont = rFont;
@@ -146,7 +146,7 @@ SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, USHORT _nWhi
// -----------------------------------------------------------------------
-SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, USHORT _nWhich ) : SfxPoolItem( _nWhich )
+SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
{
SetDefaults_Impl();
@@ -161,7 +161,7 @@ SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, USHORT _nWhich ) : SfxPoolItem
// -----------------------------------------------------------------------
-SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, USHORT _nWhich ) : SfxPoolItem( _nWhich )
+SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
{
SetDefaults_Impl();
@@ -176,7 +176,7 @@ SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, USHORT _nWhic
// -----------------------------------------------------------------------
-SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT _nWhich ) :
+SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich ),
pGraphicObject( NULL )
{
@@ -188,10 +188,10 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT _nWhich ) :
{
// Safe Load with Test on empty Bitmap
Bitmap aBmp;
- const UINT32 nOldPos = rStrm.Tell();
+ const sal_uInt32 nOldPos = rStrm.Tell();
// Ignore Errorcode when reading Bitmap,
// see comment in SvxBulletItem::Store()
- BOOL bOldError = rStrm.GetError() ? TRUE : FALSE;
+ sal_Bool bOldError = rStrm.GetError() ? sal_True : sal_False;
rStrm >> aBmp;
if ( !bOldError && rStrm.GetError() )
{
@@ -260,7 +260,7 @@ SfxPoolItem* SvxBulletItem::Clone( SfxItemPool * /*pPool*/ ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, USHORT /*nVersion*/ ) const
+SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) const
{
return new SvxBulletItem( rStrm, Which() );
}
@@ -271,7 +271,7 @@ void SvxBulletItem::SetDefaultFont_Impl()
{
aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 );
aFont.SetAlign( ALIGN_BOTTOM);
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
}
// -----------------------------------------------------------------------
@@ -289,7 +289,7 @@ void SvxBulletItem::SetDefaults_Impl()
// -----------------------------------------------------------------------
-USHORT SvxBulletItem::GetVersion( USHORT /*nVersion*/ ) const
+sal_uInt16 SvxBulletItem::GetVersion( sal_uInt16 /*nVersion*/ ) const
{
return BULITEM_VERSION;
}
@@ -367,7 +367,7 @@ int SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
// -----------------------------------------------------------------------
-SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const
+SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
{
// Correction for empty bitmap
if( ( nStyle == BS_BMP ) &&
@@ -388,16 +388,16 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const
StoreFont( rStrm, aFont );
else
{
- ULONG _nStart = rStrm.Tell();
+ sal_uLong _nStart = rStrm.Tell();
// Small preliminary estimate of the size ...
- USHORT nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1;
+ sal_uInt16 nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1;
const Bitmap aBmp( pGraphicObject->GetGraphic().GetBitmap() );
- ULONG nBytes = aBmp.GetSizeBytes();
- if ( nBytes < ULONG(0xFF00*nFac) )
+ sal_uLong nBytes = aBmp.GetSizeBytes();
+ if ( nBytes < sal_uLong(0xFF00*nFac) )
rStrm << aBmp;
- ULONG nEnd = rStrm.Tell();
+ sal_uLong nEnd = rStrm.Tell();
// Item can not write with an overhead more than 64K or SfxMultiRecord
// will crash. Then prefer to forego on the bitmap, it is only
// important for the outliner and only for <= 5.0.
diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx
index fca652ed7d..dad17e9c01 100644
--- a/editeng/source/items/charhiddenitem.cxx
+++ b/editeng/source/items/charhiddenitem.cxx
@@ -36,7 +36,7 @@
TYPEINIT1_FACTORY(SvxCharHiddenItem, SfxBoolItem, new SvxCharHiddenItem(sal_False, 0));
-SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const USHORT nId ) :
+SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const sal_uInt16 nId ) :
SfxBoolItem( nId, bHidden )
{
}
@@ -62,7 +62,7 @@ SfxItemPresentation SvxCharHiddenItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = RID_SVXITEMS_CHARHIDDEN_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_CHARHIDDEN_FALSE;
if ( GetValue() )
nId = RID_SVXITEMS_CHARHIDDEN_TRUE;
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 11d863a49a..d72f955ba2 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -75,7 +75,7 @@ int SvxFieldData::operator==( const SvxFieldData& rFld ) const
{
DBG_ASSERT( Type() == rFld.Type(), "==: Different Types" );
(void)rFld;
- return TRUE; // Basic class is always the same.
+ return sal_True; // Basic class is always the same.
}
// -----------------------------------------------------------------------
@@ -103,7 +103,7 @@ MetaAction* SvxFieldData::createEndComment() const
// -----------------------------------------------------------------------
-SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) :
+SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const sal_uInt16 nId ) :
SfxPoolItem( nId )
{
pField = pFld; // belongs directly to the item
@@ -111,7 +111,7 @@ SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) :
// -----------------------------------------------------------------------
-SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const USHORT nId ) :
+SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ) :
SfxPoolItem( nId )
{
pField = rField.Clone();
@@ -141,7 +141,7 @@ SfxPoolItem* SvxFieldItem::Clone( SfxItemPool* ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const
+SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
SvxFieldData* pData = 0;
SvPersistStream aPStrm( GetClassManager(), &rStrm );
@@ -158,7 +158,7 @@ SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SvxFieldItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const
+SvStream& SvxFieldItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
{
DBG_ASSERT( pField, "SvxFieldItem::Store: Field?!" );
SvPersistStream aPStrm( GetClassManager(), &rStrm );
@@ -185,10 +185,10 @@ int SvxFieldItem::operator==( const SfxPoolItem& rItem ) const
const SvxFieldData* pOtherFld = ((const SvxFieldItem&)rItem).GetField();
if ( !pField && !pOtherFld )
- return TRUE;
+ return sal_True;
if ( ( !pField && pOtherFld ) || ( pField && !pOtherFld ) )
- return FALSE;
+ return sal_False;
return ( ( pField->Type() == pOtherFld->Type() )
&& ( *pField == *pOtherFld ) );
@@ -230,7 +230,7 @@ SvxFieldData* SvxDateField::Clone() const
int SvxDateField::operator==( const SvxFieldData& rOther ) const
{
if ( rOther.Type() != Type() )
- return FALSE;
+ return sal_False;
const SvxDateField& rOtherFld = (const SvxDateField&) rOther;
return ( ( nFixDate == rOtherFld.nFixDate ) &&
@@ -242,7 +242,7 @@ int SvxDateField::operator==( const SvxFieldData& rOther ) const
void SvxDateField::Load( SvPersistStream & rStm )
{
- USHORT nType, nFormat;
+ sal_uInt16 nType, nFormat;
rStm >> nFixDate;
rStm >> nType;
@@ -257,8 +257,8 @@ void SvxDateField::Load( SvPersistStream & rStm )
void SvxDateField::Save( SvPersistStream & rStm )
{
rStm << nFixDate;
- rStm << (USHORT)eType;
- rStm << (USHORT)eFormat;
+ rStm << (sal_uInt16)eType;
+ rStm << (sal_uInt16)eFormat;
}
// -----------------------------------------------------------------------
@@ -285,7 +285,7 @@ String SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumberF
eFormat = SVXDATEFORMAT_STDSMALL;
}
- ULONG nFormatKey;
+ sal_uLong nFormatKey;
switch( eFormat )
{
@@ -366,7 +366,7 @@ SvxFieldData* SvxURLField::Clone() const
int SvxURLField::operator==( const SvxFieldData& rOther ) const
{
if ( rOther.Type() != Type() )
- return FALSE;
+ return sal_False;
const SvxURLField& rOtherFld = (const SvxURLField&) rOther;
return ( ( eFormat == rOtherFld.eFormat ) &&
@@ -377,83 +377,46 @@ int SvxURLField::operator==( const SvxFieldData& rOther ) const
// -----------------------------------------------------------------------
-void SvxURLField::Load( SvPersistStream & rStm )
+static void write_unicode( SvPersistStream & rStm, const String& rString )
{
- USHORT nFormat;
- sal_uInt32 nFrameMarker, nCharSetMarker;
- long nUlongSize = (long)sizeof(sal_uInt32);
- String aTmpURL;
-
- rStm >> nFormat;
-
- // UNICODE: rStm >> aTmpURL;
- rStm.ReadByteString(aTmpURL);
-
- // UNICODE: rStm >> aRepresentation;
- // read to a temp string first, read text encoding and
- // convert later to stay compatible to fileformat
- ByteString aTempString;
- rtl_TextEncoding aTempEncoding = RTL_TEXTENCODING_MS_1252; // Init for old documents
- rStm.ReadByteString(aTempString);
+ sal_uInt16 nL = rString.Len();
+ rStm << nL;
+ rStm.Write( rString.GetBuffer(), nL*sizeof(sal_Unicode) );
+}
- rStm >> nFrameMarker;
- if ( nFrameMarker == FRAME_MARKER )
+static void read_unicode( SvPersistStream & rStm, String& rString )
+{
+ sal_uInt16 nL = 0;
+ rStm >> nL;
+ if ( nL )
{
- // UNICODE: rStm >> aTargetFrame;
- rStm.ReadByteString(aTargetFrame);
-
- rStm >> nCharSetMarker;
- if ( nCharSetMarker == CHARSET_MARKER )
- {
- USHORT nCharSet;
- rStm >> nCharSet;
-
- // remember encoding
- aTempEncoding = (rtl_TextEncoding)nCharSet;
- }
- else
- rStm.SeekRel( -nUlongSize );
+ rString.AllocBuffer( nL );
+ rStm.Read( rString.GetBufferAccess(), nL*sizeof(sal_Unicode) );
+ rString.ReleaseBufferAccess( nL );
}
- else
- rStm.SeekRel( -nUlongSize );
+}
- // now build representation string due to known encoding
- aRepresentation = String(aTempString, aTempEncoding);
+void SvxURLField::Load( SvPersistStream & rStm )
+{
+ sal_uInt16 nFormat = 0;
+ rStm >> nFormat;
eFormat= (SvxURLFormat)nFormat;
- // Relative save => make it absolute for loading
- OSL_FAIL("No BaseURL!");
- // TODO/MBA: no BaseURL
- aURL = INetURLObject::GetAbsURL( String(), aTmpURL );
+ read_unicode( rStm, aURL );
+ read_unicode( rStm, aRepresentation );
+ read_unicode( rStm, aTargetFrame );
}
// -----------------------------------------------------------------------
void SvxURLField::Save( SvPersistStream & rStm )
{
- // Relative save of the URL
- OSL_FAIL("No BaseURL!");
- // TODO/MBA: no BaseURL
- String aTmpURL = INetURLObject::GetRelURL( String(), aURL );
-
- rStm << (USHORT)eFormat;
-
- // UNICODE: rStm << aTmpURL;
- rStm.WriteByteString(aTmpURL);
-
- // UNICODE: rStm << aRepresentation;
- rStm.WriteByteString(aRepresentation);
-
- rStm << FRAME_MARKER;
+ rStm << (sal_uInt16)eFormat;
- // UNICODE: rStm << aTargetFrame;
- rStm.WriteByteString(aTargetFrame);
-
- rStm << CHARSET_MARKER;
-
- // #90477# rStm << (USHORT)GetStoreCharSet(gsl_getSystemTextEncoding(), rStm.GetVersion());
- rStm << (USHORT)GetSOStoreTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rStm.GetVersion());
+ write_unicode( rStm, aURL );
+ write_unicode( rStm, aRepresentation );
+ write_unicode( rStm, aTargetFrame );
}
MetaAction* SvxURLField::createBeginComment() const
@@ -461,7 +424,7 @@ MetaAction* SvxURLField::createBeginComment() const
// #i46618# Adding target URL to metafile comment
return new MetaCommentAction( "FIELD_SEQ_BEGIN",
0,
- reinterpret_cast<const BYTE*>(aURL.GetBuffer()),
+ reinterpret_cast<const sal_uInt8*>(aURL.GetBuffer()),
2*aURL.Len() );
}
@@ -616,7 +579,7 @@ SvxFieldData* SvxExtTimeField::Clone() const
int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const
{
if ( rOther.Type() != Type() )
- return FALSE;
+ return sal_False;
const SvxExtTimeField& rOtherFld = (const SvxExtTimeField&) rOther;
return ( ( nFixTime == rOtherFld.nFixTime ) &&
@@ -628,7 +591,7 @@ int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const
void SvxExtTimeField::Load( SvPersistStream & rStm )
{
- USHORT nType, nFormat;
+ sal_uInt16 nType, nFormat;
rStm >> nFixTime;
rStm >> nType;
@@ -643,8 +606,8 @@ void SvxExtTimeField::Load( SvPersistStream & rStm )
void SvxExtTimeField::Save( SvPersistStream & rStm )
{
rStm << nFixTime;
- rStm << (USHORT) eType;
- rStm << (USHORT) eFormat;
+ rStm << (sal_uInt16) eType;
+ rStm << (sal_uInt16) eFormat;
}
//----------------------------------------------------------------------------
@@ -684,7 +647,7 @@ String SvxExtTimeField::GetFormatted( Time& aTime, SvxTimeFormat eFormat, SvNumb
String aFormatCode( RTL_CONSTASCII_USTRINGPARAM( "HH:MM:SS.00 AM/PM" ) );
xub_StrLen nCheckPos;
short nType;
- /*BOOL bInserted = */rFormatter.PutandConvertEntry( aFormatCode,
+ /*sal_Bool bInserted = */rFormatter.PutandConvertEntry( aFormatCode,
nCheckPos, nType, nFormatKey, LANGUAGE_ENGLISH_US, eLang );
DBG_ASSERT( nCheckPos == 0, "SVXTIMEFORMAT_12_HMSH: could not insert format code" );
if ( nCheckPos )
@@ -755,7 +718,7 @@ SvxFieldData* SvxExtFileField::Clone() const
int SvxExtFileField::operator==( const SvxFieldData& rOther ) const
{
if ( rOther.Type() != Type() )
- return FALSE;
+ return sal_False;
const SvxExtFileField& rOtherFld = (const SvxExtFileField&) rOther;
return ( ( aFile == rOtherFld.aFile ) &&
@@ -767,7 +730,7 @@ int SvxExtFileField::operator==( const SvxFieldData& rOther ) const
void SvxExtFileField::Load( SvPersistStream & rStm )
{
- USHORT nType, nFormat;
+ sal_uInt16 nType, nFormat;
// UNICODE: rStm >> aFile;
rStm.ReadByteString(aFile);
@@ -786,8 +749,8 @@ void SvxExtFileField::Save( SvPersistStream & rStm )
// UNICODE: rStm << aFile;
rStm.WriteByteString(aFile);
- rStm << (USHORT) eType;
- rStm << (USHORT) eFormat;
+ rStm << (sal_uInt16) eType;
+ rStm << (sal_uInt16) eFormat;
}
//----------------------------------------------------------------------------
@@ -907,7 +870,7 @@ SvxFieldData* SvxAuthorField::Clone() const
int SvxAuthorField::operator==( const SvxFieldData& rOther ) const
{
if ( rOther.Type() != Type() )
- return FALSE;
+ return sal_False;
const SvxAuthorField& rOtherFld = (const SvxAuthorField&) rOther;
return ( ( aName == rOtherFld.aName ) &&
@@ -921,16 +884,11 @@ int SvxAuthorField::operator==( const SvxFieldData& rOther ) const
void SvxAuthorField::Load( SvPersistStream & rStm )
{
- USHORT nType, nFormat;
-
- // UNICODE: rStm >> aName;
- rStm.ReadByteString(aName);
+ sal_uInt16 nType = 0, nFormat = 0;
- // UNICODE: rStm >> aFirstName;
- rStm.ReadByteString(aFirstName);
-
- // UNICODE: rStm >> aShortName;
- rStm.ReadByteString(aShortName);
+ read_unicode( rStm, aName );
+ read_unicode( rStm, aFirstName );
+ read_unicode( rStm, aShortName );
rStm >> nType;
rStm >> nFormat;
@@ -943,17 +901,12 @@ void SvxAuthorField::Load( SvPersistStream & rStm )
void SvxAuthorField::Save( SvPersistStream & rStm )
{
- // UNICODE: rStm << aName;
- rStm.WriteByteString(aName);
-
- // UNICODE: rStm << aFirstName;
- rStm.WriteByteString(aFirstName);
-
- // UNICODE: rStm << aShortName;
- rStm.WriteByteString(aShortName);
+ write_unicode( rStm, aName );
+ write_unicode( rStm, aFirstName );
+ write_unicode( rStm, aShortName );
- rStm << (USHORT) eType;
- rStm << (USHORT) eFormat;
+ rStm << (sal_uInt16) eType;
+ rStm << (sal_uInt16) eFormat;
}
//----------------------------------------------------------------------------
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index a18fec5c49..042dcca98c 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -189,7 +189,7 @@ SfxItemPresentation SvxPaperBinItem::GetPresentation
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- BYTE nValue = GetValue();
+ sal_uInt8 nValue = GetValue();
if ( PAPERBIN_PRINTER_SETTINGS == nValue )
rText = EE_RESSTR(RID_SVXSTR_PAPERBIN_SETTINGS);
@@ -219,7 +219,7 @@ SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) :
}
// -----------------------------------------------------------------------
-bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxSizeItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -242,7 +242,7 @@ bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
// -----------------------------------------------------------------------
-bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxSizeItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -429,7 +429,7 @@ SvxLRSpaceItem::SvxLRSpaceItem( const long nLeft, const long nRight,
}
// -----------------------------------------------------------------------
-bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
bool bRet = true;
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
@@ -474,7 +474,7 @@ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
}
// -----------------------------------------------------------------------
-bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -504,9 +504,9 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
if((rVal >>= nRel) && nRel >= 0 && nRel < USHRT_MAX)
{
if(MID_L_REL_MARGIN== nMemberId)
- nPropLeftMargin = (USHORT)nRel;
+ nPropLeftMargin = (sal_uInt16)nRel;
else
- nPropRightMargin = (USHORT)nRel;
+ nPropRightMargin = (sal_uInt16)nRel;
}
else
return false;
@@ -517,7 +517,7 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
break;
case MID_FIRST_LINE_REL_INDENT:
- SetPropTxtFirstLineOfst ( (USHORT)nVal );
+ SetPropTxtFirstLineOfst ( (sal_uInt16)nVal );
break;
case MID_FIRST_AUTO:
@@ -820,7 +820,7 @@ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow,
}
// -----------------------------------------------------------------------
-bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxULSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -846,7 +846,7 @@ bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
}
// -----------------------------------------------------------------------
-bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxULSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -871,12 +871,12 @@ bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
case MID_UP_MARGIN :
if(!(rVal >>= nVal) || nVal < 0)
return false;
- SetUpper((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal));
+ SetUpper((sal_uInt16)(bConvert ? MM100_TO_TWIP(nVal) : nVal));
break;
case MID_LO_MARGIN :
if(!(rVal >>= nVal) || nVal < 0)
return false;
- SetLower((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal));
+ SetLower((sal_uInt16)(bConvert ? MM100_TO_TWIP(nVal) : nVal));
break;
case MID_UP_REL_MARGIN:
case MID_LO_REL_MARGIN:
@@ -885,9 +885,9 @@ bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
if((rVal >>= nRel) && nRel > 1 )
{
if(MID_UP_REL_MARGIN == nMemberId)
- nPropUpper = (USHORT)nRel;
+ nPropUpper = (sal_uInt16)nRel;
else
- nPropLower = (USHORT)nRel;
+ nPropLower = (sal_uInt16)nRel;
}
else
return false;
@@ -1155,7 +1155,7 @@ int SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const
bPos == ( (SvxProtectItem&)rAttr ).bPos );
}
-bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxProtectItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bValue;
@@ -1173,7 +1173,7 @@ bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxProtectItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bVal( Any2Bool(rVal) );
@@ -1266,8 +1266,8 @@ SfxPoolItem* SvxProtectItem::Create( SvStream& rStrm, sal_uInt16 ) const
// class SvxShadowItem ---------------------------------------------------
-SvxShadowItem::SvxShadowItem( const USHORT nId,
- const Color *pColor, const USHORT nW,
+SvxShadowItem::SvxShadowItem( const sal_uInt16 nId,
+ const Color *pColor, const sal_uInt16 nW,
const SvxShadowLocation eLoc ) :
SfxEnumItemInterface( nId ),
aShadowColor(COL_GRAY),
@@ -1279,7 +1279,7 @@ SvxShadowItem::SvxShadowItem( const USHORT nId,
}
// -----------------------------------------------------------------------
-bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxShadowItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1312,7 +1312,7 @@ bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
// -----------------------------------------------------------------------
-bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1549,10 +1549,10 @@ void SvxShadowItem::SetEnumValue( sal_uInt16 nVal )
SvxBorderLine::SvxBorderLine( const Color *pCol, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist,
SvxBorderStyle nStyle )
-: nOutWidth( nOut )
+: m_nStyle( nStyle )
+, nOutWidth( nOut )
, nInWidth ( nIn )
, nDistance( nDist )
-, m_nStyle( nStyle )
{
if ( pCol )
aColor = *pCol;
@@ -1687,8 +1687,8 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit,
bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const
{
- const USHORT nThisSize = GetOutWidth() + GetDistance() + GetInWidth();
- const USHORT nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth();
+ const sal_uInt16 nThisSize = GetOutWidth() + GetDistance() + GetInWidth();
+ const sal_uInt16 nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth();
if (nThisSize > nOtherSize)
{
@@ -1823,7 +1823,7 @@ table::BorderLine2 SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, sal_Boo
return aLine;
}
// -----------------------------------------------------------------------
-bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
table::BorderLine2 aRetLine;
@@ -1966,7 +1966,7 @@ lcl_extractBorderLine(const uno::Any& rAny, table::BorderLine2& rLine)
template<typename Item>
bool
-lcl_setLine(const uno::Any& rAny, Item& rItem, USHORT nLine, const bool bConvert)
+lcl_setLine(const uno::Any& rAny, Item& rItem, sal_uInt16 nLine, const bool bConvert)
{
bool bDone = false;
table::BorderLine2 aBorderLine;
@@ -1982,7 +1982,7 @@ lcl_setLine(const uno::Any& rAny, Item& rItem, USHORT nLine, const bool bConvert
}
-bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
sal_uInt16 nLine = BOX_LINE_TOP;
@@ -2756,7 +2756,7 @@ void SvxBoxInfoItem::ResetFlags()
nValidFlags = 0x7F; // all valid except Disable
}
-bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
table::BorderLine2 aRetLine;
@@ -2821,7 +2821,7 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
// -----------------------------------------------------------------------
-bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -2850,14 +2850,14 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
else
return sal_False;
if ( aSeq[3] >>= nFlags )
- nValidFlags = (BYTE)nFlags;
+ nValidFlags = (sal_uInt8)nFlags;
else
return sal_False;
if (( aSeq[4] >>= nVal ) && ( nVal >= 0 ))
{
if( bConvert )
nVal = MM100_TO_TWIP(nVal);
- SetDefDist( (USHORT)nVal );
+ SetDefDist( (sal_uInt16)nVal );
}
}
return sal_True;
@@ -2942,7 +2942,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
sal_Int16 nFlags = sal_Int16();
bRet = (rVal >>= nFlags);
if ( bRet )
- nValidFlags = (BYTE)nFlags;
+ nValidFlags = (sal_uInt8)nFlags;
break;
}
case MID_DISTANCE:
@@ -2953,7 +2953,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
if( bConvert )
nVal = MM100_TO_TWIP(nVal);
- SetDefDist( (USHORT)nVal );
+ SetDefDist( (sal_uInt16)nVal );
}
break;
}
@@ -3007,7 +3007,7 @@ XubString SvxFmtBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const
}
// -----------------------------------------------------------------------
-bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
style::BreakType eBreak = style::BreakType_NONE;
switch ( (SvxBreak)GetValue() )
@@ -3024,7 +3024,7 @@ bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
return true;
}
// -----------------------------------------------------------------------
-bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
style::BreakType nBreak;
@@ -3207,7 +3207,7 @@ SfxPoolItem* SvxLineItem::Clone( SfxItemPool* ) const
return new SvxLineItem( *this );
}
-bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const
+bool SvxLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemId ) const
{
sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS);
nMemId &= ~CONVERT_TWIPS;
@@ -3235,7 +3235,7 @@ bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const
// -----------------------------------------------------------------------
-bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId )
+bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId )
{
sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS);
nMemId &= ~CONVERT_TWIPS;
@@ -3261,9 +3261,9 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId )
switch ( nMemId )
{
case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break;
- case MID_OUTER_WIDTH: pLine->SetOutWidth((USHORT)nVal); break;
- case MID_INNER_WIDTH: pLine->SetInWidth((USHORT)nVal); break;
- case MID_DISTANCE: pLine->SetDistance((USHORT)nVal); break;
+ case MID_OUTER_WIDTH: pLine->SetOutWidth((sal_uInt16)nVal); break;
+ case MID_INNER_WIDTH: pLine->SetInWidth((sal_uInt16)nVal); break;
+ case MID_DISTANCE: pLine->SetDistance((sal_uInt16)nVal); break;
case MID_LINE_STYLE: pLine->SetStyle((SvxBorderStyle)nVal); break;
default:
OSL_FAIL( "Wrong MemberId" );
@@ -3641,7 +3641,7 @@ inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans)
return (sal_Int8)((nTrans * 100 + 127) / 254);
}
-bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId)
@@ -3702,7 +3702,7 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
// -----------------------------------------------------------------------
-bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId)
@@ -4209,7 +4209,7 @@ CntWallpaperItem* SvxBrushItem::CreateCntWallpaperItem() const
{
CntWallpaperItem* pItem = new CntWallpaperItem( 0 );
pItem->SetColor( aColor.GetColor() );
- pItem->SetStyle( (USHORT)GraphicPos2WallpaperStyle( GetGraphicPos() ) );
+ pItem->SetStyle( (sal_uInt16)GraphicPos2WallpaperStyle( GetGraphicPos() ) );
sal_Bool bLink = (pStrLink != 0);
if( bLink )
{
@@ -4241,14 +4241,14 @@ void SvxBrushItem::ApplyGraphicTransparency_Impl()
}
// class SvxFrameDirectionItem ----------------------------------------------
-SvxFrameDirectionItem::SvxFrameDirectionItem( USHORT _nWhich )
- : SfxUInt16Item( _nWhich, (UINT16)FRMDIR_HORI_LEFT_TOP )
+SvxFrameDirectionItem::SvxFrameDirectionItem( sal_uInt16 _nWhich )
+ : SfxUInt16Item( _nWhich, (sal_uInt16)FRMDIR_HORI_LEFT_TOP )
{
}
SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue ,
- USHORT _nWhich )
- : SfxUInt16Item( _nWhich, (UINT16)nValue )
+ sal_uInt16 _nWhich )
+ : SfxUInt16Item( _nWhich, (sal_uInt16)nValue )
{
}
@@ -4268,21 +4268,21 @@ SfxPoolItem* SvxFrameDirectionItem::Clone( SfxItemPool * ) const
return new SvxFrameDirectionItem( *this );
}
-SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, USHORT /*nVer*/ ) const
+SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/ ) const
{
sal_uInt16 nValue;
rStrm >> nValue;
return new SvxFrameDirectionItem( (SvxFrameDirection)nValue, Which() );
}
-SvStream& SvxFrameDirectionItem::Store( SvStream & rStrm, USHORT /*nIVer*/ ) const
+SvStream& SvxFrameDirectionItem::Store( SvStream & rStrm, sal_uInt16 /*nIVer*/ ) const
{
sal_uInt16 nValue = GetValue();
rStrm << nValue;
return rStrm;
}
-USHORT SvxFrameDirectionItem::GetVersion( USHORT nFVer ) const
+sal_uInt16 SvxFrameDirectionItem::GetVersion( sal_uInt16 nFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFVer ? USHRT_MAX : 0;
}
@@ -4312,7 +4312,7 @@ SfxItemPresentation SvxFrameDirectionItem::GetPresentation(
}
bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE )
+ sal_uInt8 )
{
sal_Int16 nVal = sal_Int16();
sal_Bool bRet = ( rVal >>= nVal );
@@ -4346,7 +4346,7 @@ bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal,
}
bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE ) const
+ sal_uInt8 ) const
{
// translate SvxFrameDirection into WritingDirection2
sal_Int16 nVal;
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index ea8808ce75..ea8808ce75 100644..100755
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index e7bab2dfa4..c8f4c7c3e1 100644..100755
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -52,14 +52,14 @@ using namespace ::com::sun::star;
-SvxHorJustifyItem::SvxHorJustifyItem( const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)SVX_HOR_JUSTIFY_STANDARD )
+SvxHorJustifyItem::SvxHorJustifyItem( const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)SVX_HOR_JUSTIFY_STANDARD )
{
}
SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify,
- const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)eJustify )
+ const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)eJustify )
{
}
@@ -86,7 +86,7 @@ SfxItemPresentation SvxHorJustifyItem::GetPresentation
}
-bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -129,7 +129,7 @@ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -155,7 +155,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
case table::CellHoriJustify_REPEAT: eSvx = SVX_HOR_JUSTIFY_REPEAT; break;
default: ; //prevent warning
}
- SetValue( (USHORT)eSvx );
+ SetValue( (sal_uInt16)eSvx );
}
break;
case MID_HORJUST_ADJUST:
@@ -175,14 +175,14 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
case style::ParagraphAdjust_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break;
case style::ParagraphAdjust_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break;
}
- SetValue( (USHORT)eSvx );
+ SetValue( (sal_uInt16)eSvx );
}
}
return true;
}
-XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const
+XubString SvxHorJustifyItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal);
@@ -195,28 +195,28 @@ SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const
+SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, sal_uInt16 ) const
{
- USHORT nVal;
+ sal_uInt16 nVal;
rStream >> nVal;
return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() );
}
-USHORT SvxHorJustifyItem::GetValueCount() const
+sal_uInt16 SvxHorJustifyItem::GetValueCount() const
{
return SVX_HOR_JUSTIFY_REPEAT + 1; // Last Enum value + 1
}
-SvxVerJustifyItem::SvxVerJustifyItem( const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)SVX_VER_JUSTIFY_STANDARD )
+SvxVerJustifyItem::SvxVerJustifyItem( const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)SVX_VER_JUSTIFY_STANDARD )
{
}
SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify,
- const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)eJustify )
+ const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)eJustify )
{
}
@@ -244,7 +244,7 @@ SfxItemPresentation SvxVerJustifyItem::GetPresentation
}
-bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -281,7 +281,7 @@ bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -301,7 +301,7 @@ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
case style::VerticalAlignment_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
default:;
}
- SetValue( (USHORT)eSvx );
+ SetValue( (sal_uInt16)eSvx );
break;
}
default:
@@ -319,7 +319,7 @@ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
case table::CellVertJustify2::BLOCK: eSvx = SVX_VER_JUSTIFY_BLOCK; break;
default: ; //prevent warning
}
- SetValue( (USHORT)eSvx );
+ SetValue( (sal_uInt16)eSvx );
break;
}
}
@@ -328,7 +328,7 @@ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
}
-XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const
+XubString SvxVerJustifyItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal);
@@ -341,29 +341,29 @@ SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const
+SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, sal_uInt16 ) const
{
- USHORT nVal;
+ sal_uInt16 nVal;
rStream >> nVal;
return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() );
}
-USHORT SvxVerJustifyItem::GetValueCount() const
+sal_uInt16 SvxVerJustifyItem::GetValueCount() const
{
return SVX_VER_JUSTIFY_BOTTOM + 1; // Last Enum value + 1
}
-SvxJustifyMethodItem::SvxJustifyMethodItem( const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)SVX_JUSTIFY_METHOD_AUTO )
+SvxJustifyMethodItem::SvxJustifyMethodItem( const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)SVX_JUSTIFY_METHOD_AUTO )
{
}
SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify,
- const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)eJustify )
+ const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)eJustify )
{
}
@@ -391,7 +391,7 @@ SfxItemPresentation SvxJustifyMethodItem::GetPresentation
}
-bool SvxJustifyMethodItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvxJustifyMethodItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
sal_Int32 nUno = table::CellJustifyMethod::AUTO;
switch (static_cast<SvxCellJustifyMethod>(GetValue()))
@@ -404,7 +404,7 @@ bool SvxJustifyMethodItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) cons
return true;
}
-bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
sal_Int32 nVal = table::CellJustifyMethod::AUTO;
if (!(rVal >>= nVal))
@@ -421,12 +421,12 @@ bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
break;
default:;
}
- SetValue(static_cast<USHORT>(eSvx));
+ SetValue(static_cast<sal_uInt16>(eSvx));
return true;
}
-XubString SvxJustifyMethodItem::GetValueText( USHORT nVal ) const
+XubString SvxJustifyMethodItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal);
@@ -439,15 +439,15 @@ SfxPoolItem* SvxJustifyMethodItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, USHORT ) const
+SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, sal_uInt16 ) const
{
- USHORT nVal;
+ sal_uInt16 nVal;
rStream >> nVal;
return new SvxJustifyMethodItem( (SvxCellJustifyMethod)nVal, Which() );
}
-USHORT SvxJustifyMethodItem::GetValueCount() const
+sal_uInt16 SvxJustifyMethodItem::GetValueCount() const
{
return SVX_JUSTIFY_METHOD_DISTRIBUTE + 1; // Last Enum value + 1
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 1d66b58235..266776a0cc 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -110,14 +110,14 @@ SvxNumberType::~SvxNumberType()
xFormatter = 0;
}
-String SvxNumberType::GetNumStr( ULONG nNo ) const
+String SvxNumberType::GetNumStr( sal_uLong nNo ) const
{
LanguageType eLang = Application::GetSettings().GetLanguage();
Locale aLocale = SvxCreateLocale(eLang);
return GetNumStr( nNo, aLocale );
}
-String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const
+String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const
{
lcl_getFormatter(xFormatter);
String aTmpStr;
@@ -206,16 +206,16 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
mnIndentAt( 0 )
{
- USHORT nVersion;
+ sal_uInt16 nVersion;
rStream >> nVersion;
- USHORT nUSHORT;
+ sal_uInt16 nUSHORT;
rStream >> nUSHORT;
SetNumberingType((sal_Int16)nUSHORT);
rStream >> nUSHORT;
eNumAdjust = (SvxAdjust)nUSHORT;
rStream >> nUSHORT;
- nInclUpperLevels = (BYTE)nUSHORT;
+ nInclUpperLevels = (sal_uInt8)nUSHORT;
rStream >> nUSHORT;
nStart = nUSHORT;
rStream >> nUSHORT;
@@ -263,7 +263,7 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
rStream >> nUSHORT;
nBulletRelSize = nUSHORT;
rStream >> nUSHORT;
- SetShowSymbol((BOOL)nUSHORT);
+ SetShowSymbol((sal_Bool)nUSHORT);
if( nVersion < NUMITEM_VERSION_03 )
cBullet = ByteString::ConvertToUnicode( (sal_Char)cBullet,
@@ -271,7 +271,7 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
: RTL_TEXTENCODING_SYMBOL );
if(pBulletFont)
{
- BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
+ sal_Bool bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
if(bConvertBulletFont)
{
@@ -313,13 +313,13 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
pBulletFont->SetName(sFontName);
}
- rStream << (USHORT)NUMITEM_VERSION_04;
+ rStream << (sal_uInt16)NUMITEM_VERSION_04;
- rStream << (USHORT)GetNumberingType();
- rStream << (USHORT)eNumAdjust;
- rStream << (USHORT)nInclUpperLevels;
+ rStream << (sal_uInt16)GetNumberingType();
+ rStream << (sal_uInt16)eNumAdjust;
+ rStream << (sal_uInt16)nInclUpperLevels;
rStream << nStart;
- rStream << (USHORT)cBullet;
+ rStream << (sal_uInt16)cBullet;
rStream << nFirstLineOffset;
rStream << nAbsLSpace;
@@ -332,7 +332,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
rStream.WriteByteString(sCharStyleName, eEnc);
if(pGraphicBrush)
{
- rStream << (USHORT)1;
+ rStream << (sal_uInt16)1;
// in SD or SI force bullet itself to be stored,
// for that purpose throw away link when link and graphic
@@ -346,16 +346,16 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION);
}
else
- rStream << (USHORT)0;
+ rStream << (sal_uInt16)0;
- rStream << (USHORT)eVertOrient;
+ rStream << (sal_uInt16)eVertOrient;
if(pBulletFont)
{
- rStream << (USHORT)1;
+ rStream << (sal_uInt16)1;
rStream << *pBulletFont;
}
else
- rStream << (USHORT)0;
+ rStream << (sal_uInt16)0;
rStream << aGraphicSize;
Color nTempColor = nBulletColor;
@@ -363,10 +363,10 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
nTempColor = COL_BLACK;
rStream << nTempColor;
rStream << nBulletRelSize;
- rStream << (USHORT)IsShowSymbol();
+ rStream << (sal_uInt16)IsShowSymbol();
- rStream << ( USHORT ) mePositionAndSpaceMode;
- rStream << ( USHORT ) meLabelFollowedBy;
+ rStream << ( sal_uInt16 ) mePositionAndSpaceMode;
+ rStream << ( sal_uInt16 ) meLabelFollowedBy;
rStream << ( long ) mnListtabPos;
rStream << ( long ) mnFirstLineIndent;
rStream << ( long ) mnIndentAt;
@@ -410,7 +410,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat )
return *this;
}
-BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
+sal_Bool SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
{
if( GetNumberingType() != rFormat.GetNumberingType() ||
eNumAdjust != rFormat.eNumAdjust ||
@@ -435,14 +435,14 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
IsShowSymbol() != rFormat.IsShowSymbol() ||
sCharStyleName != rFormat.sCharStyleName
)
- return FALSE;
+ return sal_False;
if (
(pGraphicBrush && !rFormat.pGraphicBrush) ||
(!pGraphicBrush && rFormat.pGraphicBrush) ||
(pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush)
)
{
- return FALSE;
+ return sal_False;
}
if (
(pBulletFont && !rFormat.pBulletFont) ||
@@ -450,9 +450,9 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
(pBulletFont && *pBulletFont != *rFormat.pBulletFont)
)
{
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem,
@@ -612,7 +612,7 @@ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic)
return aRetSize;
}
-String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper )
+String SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper )
{
nNo %= 4000; // more can not be displayed
// i, ii, iii, iv, v, vi, vii, vii, viii, ix
@@ -622,11 +622,11 @@ String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper )
: "mdclxvi--"; // +2 Dummy entries!
String sRet;
- USHORT nMask = 1000;
+ sal_uInt16 nMask = 1000;
while( nMask )
{
- BYTE nZahl = BYTE(nNo / nMask);
- BYTE nDiff = 1;
+ sal_uInt8 nZahl = sal_uInt8(nNo / nMask);
+ sal_uInt8 nDiff = 1;
nNo %= nMask;
if( 5 < nZahl )
@@ -666,9 +666,9 @@ const String& SvxNumberFormat::GetCharFmtName()const
sal_Int32 SvxNumRule::nRefCount = 0;
static SvxNumberFormat* pStdNumFmt = 0;
static SvxNumberFormat* pStdOutlineNumFmt = 0;
-SvxNumRule::SvxNumRule( ULONG nFeatures,
- USHORT nLevels,
- BOOL bCont,
+SvxNumRule::SvxNumRule( sal_uLong nFeatures,
+ sal_uInt16 nLevels,
+ sal_Bool bCont,
SvxNumRuleType eType,
SvxNumberFormat::SvxNumPositionAndSpaceMode
eDefaultNumberFormatPositionAndSpaceMode )
@@ -680,7 +680,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures,
++nRefCount;
LanguageType eLang = Application::GetSettings().GetLanguage();
aLocale = SvxCreateLocale(eLang);
- for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
{
if(i < nLevels)
{
@@ -719,7 +719,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures,
}
else
aFmts[i] = 0;
- aFmtsSet[i] = FALSE;
+ aFmtsSet[i] = sal_False;
}
}
@@ -732,7 +732,7 @@ SvxNumRule::SvxNumRule(const SvxNumRule& rCopy)
bContinuousNumbering = rCopy.bContinuousNumbering;
eNumberingType = rCopy.eNumberingType;
memset( aFmts, 0, sizeof( aFmts ));
- for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
{
if(rCopy.aFmts[i])
aFmts[i] = new SvxNumberFormat(*rCopy.aFmts[i]);
@@ -747,31 +747,31 @@ SvxNumRule::SvxNumRule(SvStream &rStream)
++nRefCount;
LanguageType eLang = Application::GetSettings().GetLanguage();
aLocale = SvxCreateLocale(eLang);
- USHORT nVersion;
- USHORT nTemp;
+ sal_uInt16 nVersion;
+ sal_uInt16 nTemp;
rStream >> nVersion;
rStream >> nLevelCount;
rStream >> nTemp;
nFeatureFlags = nTemp;
rStream >> nTemp;
- bContinuousNumbering = (BOOL)nTemp;
+ bContinuousNumbering = (sal_Bool)nTemp;
rStream >> nTemp;
eNumberingType = (SvxNumRuleType)nTemp;
memset( aFmts, 0, sizeof( aFmts ));
- for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
{
- USHORT nSet;
+ sal_uInt16 nSet;
rStream >> nSet;
if(nSet)
aFmts[i] = new SvxNumberFormat(rStream);
else
aFmts[i] = 0;
- aFmtsSet[i] = aFmts[i] ? TRUE : FALSE;
+ aFmtsSet[i] = aFmts[i] ? sal_True : sal_False;
}
if(NUMITEM_VERSION_02 <= nVersion)
{
- USHORT nShort;
+ sal_uInt16 nShort;
rStream >> nShort;
nFeatureFlags = nShort;
}
@@ -779,20 +779,20 @@ SvxNumRule::SvxNumRule(SvStream &rStream)
SvStream& SvxNumRule::Store(SvStream &rStream)
{
- rStream<<(USHORT)NUMITEM_VERSION_03;
+ rStream<<(sal_uInt16)NUMITEM_VERSION_03;
rStream<<nLevelCount;
//first save of nFeatureFlags for old versions
- rStream<<(USHORT)nFeatureFlags;
- rStream<<(USHORT)bContinuousNumbering;
- rStream<<(USHORT)eNumberingType;
+ rStream<<(sal_uInt16)nFeatureFlags;
+ rStream<<(sal_uInt16)bContinuousNumbering;
+ rStream<<(sal_uInt16)eNumberingType;
FontToSubsFontConverter pConverter = 0;
- BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
- for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ sal_Bool bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
+ for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
{
if(aFmts[i])
{
- rStream << USHORT(1);
+ rStream << sal_uInt16(1);
if(bConvertBulletFont && aFmts[i]->GetBulletFont())
{
if(!pConverter)
@@ -803,10 +803,10 @@ SvStream& SvxNumRule::Store(SvStream &rStream)
aFmts[i]->Store(rStream, pConverter);
}
else
- rStream << USHORT(0);
+ rStream << sal_uInt16(0);
}
//second save of nFeatureFlags for new versions
- rStream<<(USHORT)nFeatureFlags;
+ rStream<<(sal_uInt16)nFeatureFlags;
if(pConverter)
DestroyFontToSubsFontConverter(pConverter);
@@ -815,7 +815,7 @@ SvStream& SvxNumRule::Store(SvStream &rStream)
SvxNumRule::~SvxNumRule()
{
- for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
delete aFmts[i];
if(!--nRefCount)
{
@@ -830,7 +830,7 @@ SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy )
nFeatureFlags = rCopy.nFeatureFlags;
bContinuousNumbering = rCopy.bContinuousNumbering;
eNumberingType = rCopy.eNumberingType;
- for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
{
delete aFmts[i];
if(rCopy.aFmts[i])
@@ -848,8 +848,8 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const
nFeatureFlags != rCopy.nFeatureFlags ||
bContinuousNumbering != rCopy.bContinuousNumbering ||
eNumberingType != rCopy.eNumberingType)
- return FALSE;
- for(USHORT i = 0; i < nLevelCount; i++)
+ return sal_False;
+ for(sal_uInt16 i = 0; i < nLevelCount; i++)
{
if (
(aFmtsSet[i] != rCopy.aFmtsSet[i]) ||
@@ -858,13 +858,13 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const
(aFmts[i] && *aFmts[i] != *rCopy.aFmts[i])
)
{
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
-const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const
+const SvxNumberFormat* SvxNumRule::Get(sal_uInt16 nLevel)const
{
DBG_ASSERT(nLevel < SVX_MAX_NUM, "Wrong Level" );
if( nLevel < SVX_MAX_NUM )
@@ -873,7 +873,7 @@ const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const
return 0;
}
-const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const
+const SvxNumberFormat& SvxNumRule::GetLevel(sal_uInt16 nLevel)const
{
if(!pStdNumFmt)
{
@@ -888,8 +888,7 @@ const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const
*pStdNumFmt : *pStdOutlineNumFmt;
}
-
-void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsValid )
+void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, sal_Bool bIsValid )
{
DBG_ASSERT(i < SVX_MAX_NUM, "Wrong Level" );
@@ -901,7 +900,7 @@ void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsVal
}
}
-void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt)
+void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt)
{
DBG_ASSERT(nLevel < SVX_MAX_NUM, "Wrong Level" );
@@ -918,7 +917,7 @@ void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt)
}
}
-String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) const
+String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings ) const
{
String aStr;
if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) )
@@ -926,12 +925,12 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c
const SvxNumberFormat& rMyNFmt = GetLevel( rNum.GetLevel() );
if( SVX_NUM_NUMBER_NONE != rMyNFmt.GetNumberingType() )
{
- BYTE i = rNum.GetLevel();
+ sal_uInt8 i = rNum.GetLevel();
if( !IsContinuousNumbering() &&
1 < rMyNFmt.GetIncludeUpperLevels() ) // only on own level?
{
- BYTE n = rMyNFmt.GetIncludeUpperLevels();
+ sal_uInt8 n = rMyNFmt.GetIncludeUpperLevels();
if( 1 < n )
{
if( i+1 >= n )
@@ -974,10 +973,10 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c
}
// changes linked to embedded bitmaps
-BOOL SvxNumRule::UnLinkGraphics()
+sal_Bool SvxNumRule::UnLinkGraphics()
{
- BOOL bRet = FALSE;
- for(USHORT i = 0; i < GetLevelCount(); i++)
+ sal_Bool bRet = sal_False;
+ for(sal_uInt16 i = 0; i < GetLevelCount(); i++)
{
SvxNumberFormat aFmt(GetLevel(i));
const SvxBrushItem* pBrush = aFmt.GetBrush();
@@ -995,7 +994,7 @@ BOOL SvxNumRule::UnLinkGraphics()
aTempItem.SetGraphic(*pGraphic);
sal_Int16 eOrient = aFmt.GetVertOrient();
aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if((SVX_NUM_BITMAP|LINK_TOKEN) == aFmt.GetNumberingType())
@@ -1011,13 +1010,13 @@ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule) :
{
}
-SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, USHORT _nWhich ) :
+SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich),
pNumRule(new SvxNumRule(rRule))
{
}
-SfxPoolItem* SvxNumBulletItem::Create(SvStream &s, USHORT n) const
+SfxPoolItem* SvxNumBulletItem::Create(SvStream &s, sal_uInt16 n) const
{
return SfxPoolItem::Create(s, n );
}
@@ -1043,24 +1042,24 @@ SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool * ) const
return new SvxNumBulletItem(*this);
}
-USHORT SvxNumBulletItem::GetVersion( USHORT /*nFileVersion*/ ) const
+sal_uInt16 SvxNumBulletItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const
{
return NUMITEM_VERSION_03;
}
-SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ )const
+SvStream& SvxNumBulletItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/ )const
{
pNumRule->Store(rStream);
return rStream;
}
-bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= SvxCreateNumRule( pNumRule );
return true;
}
-bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< container::XIndexReplace > xRule;
if( rVal >>= xRule )
@@ -1086,12 +1085,12 @@ bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nM
return false;
}
-SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevels, SvxNumRuleType eType )
+SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevels, SvxNumRuleType eType )
{
- const USHORT nSrcLevels = pRule->GetLevelCount();
+ const sal_uInt16 nSrcLevels = pRule->GetLevelCount();
SvxNumRule* pNewRule = new SvxNumRule( pRule->GetFeatureFlags(), nLevels, pRule->IsContinuousNumbering(), eType );
- for( USHORT nLevel = 0; (nLevel < nLevels) && (nLevel < nSrcLevels); nLevel++ )
+ for( sal_uInt16 nLevel = 0; (nLevel < nLevels) && (nLevel < nSrcLevels); nLevel++ )
pNewRule->SetLevel( nLevel, pRule->GetLevel( nLevel ) );
return pNewRule;
diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx
index 82df688afd..82df688afd 100644..100755
--- a/editeng/source/items/optitems.cxx
+++ b/editeng/source/items/optitems.cxx
diff --git a/editeng/source/items/page.src b/editeng/source/items/page.src
index 9a39dc85e6..5d1448858a 100644..100755
--- a/editeng/source/items/page.src
+++ b/editeng/source/items/page.src
@@ -29,154 +29,6 @@
#include <editeng/editrids.hrc>
-String RID_SVXSTR_PAPER_A0
-{
- Text = "A0" ;
-};
-String RID_SVXSTR_PAPER_A1
-{
- Text = "A1" ;
-};
-String RID_SVXSTR_PAPER_A2
-{
- Text = "A2" ;
-};
-String RID_SVXSTR_PAPER_A3
-{
- Text = "A3" ;
-};
-String RID_SVXSTR_PAPER_A4
-{
- Text = "A4" ;
-};
-String RID_SVXSTR_PAPER_A5
-{
- Text = "A5" ;
-};
-String RID_SVXSTR_PAPER_B4_ISO
-{
- Text = "B4 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_B5_ISO
-{
- Text = "B5 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_LETTER
-{
- Text = "Letter" ;
-};
-String RID_SVXSTR_PAPER_LEGAL
-{
- Text = "Legal" ;
-};
-String RID_SVXSTR_PAPER_TABLOID
-{
- Text = "Tabloid" ;
-};
-String RID_SVXSTR_PAPER_USER
-{
- Text [ en-US ] = "User Defined" ;
-};
-String RID_SVXSTR_PAPER_B6_ISO
-{
- Text = "B6 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_C4
-{
- Text = "C4 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C5
-{
- Text = "C5 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C6
-{
- Text = "C6 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C65
-{
- Text = "C6/5 Envelope" ;
-};
-String RID_SVXSTR_PAPER_DL
-{
- Text = "DL Envelope" ;
-};
-String RID_SVXSTR_PAPER_DIA
-{
- Text = "Dia Slide" ;
-};
-String RID_SVXSTR_PAPER_SCREEN
-{
- Text [ en-US ] = "Screen" ;
-};
-String RID_SVXSTR_PAPER_C
-{
- Text = "C" ;
-};
-String RID_SVXSTR_PAPER_D
-{
- Text = "D" ;
-};
-String RID_SVXSTR_PAPER_E
-{
- Text = "E" ;
-};
-String RID_SVXSTR_PAPER_EXECUTIVE
-{
- Text = "Executive" ;
-};
-String RID_SVXSTR_PAPER_LEGAL2
-{
- Text = "Long Bond" ;
-};
-String RID_SVXSTR_PAPER_MONARCH
-{
- Text = "#8 (Monarch) Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM675
-{
- Text = "#6 3/4 (Personal) Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM9
-{
- Text = "#9 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM10
-{
- Text = "#10 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM11
-{
- Text = "#11 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM12
-{
- Text = "#12 Envelope" ;
-};
-String RID_SVXSTR_PAPER_KAI16
-{
- Text = "16 Kai" ;
-};
-String RID_SVXSTR_PAPER_KAI32
-{
- Text = "32 Kai" ;
-};
-String RID_SVXSTR_PAPER_KAI32BIG
-{
- Text = "Big 32 Kai" ;
-};
-String RID_SVXSTR_PAPER_B4_JIS
-{
- Text = "B4 (JIS)" ;
-};
-String RID_SVXSTR_PAPER_B5_JIS
-{
- Text = "B5 (JIS)" ;
-};
-String RID_SVXSTR_PAPER_B6_JIS
-{
- Text = "B6 (JIS)" ;
-};
String RID_SVXSTR_PAPERBIN
{
Text [ en-US ] = "Paper tray" ;
diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx
index e899af4f47..8796f6d7bc 100644..100755
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -43,9 +43,9 @@
Description: Is the printer valid
--------------------------------------------------------------------*/
-inline BOOL IsValidPrinter( const Printer* pPtr )
+inline sal_Bool IsValidPrinter( const Printer* pPtr )
{
- return pPtr->GetName().Len() ? TRUE : FALSE;
+ return pPtr->GetName().Len() ? sal_True : sal_False;
}
//------------------------------------------------------------------------
@@ -134,51 +134,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
String SvxPaperInfo::GetName( Paper ePaper )
{
- USHORT nResId = 0;
-
- switch ( ePaper )
- {
- case PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break;
- case PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break;
- case PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break;
- case PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break;
- case PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break;
- case PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break;
- case PAPER_B4_ISO: nResId = RID_SVXSTR_PAPER_B4_ISO; break;
- case PAPER_B5_ISO: nResId = RID_SVXSTR_PAPER_B5_ISO; break;
- case PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break;
- case PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break;
- case PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break;
- case PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break;
- case PAPER_B6_ISO: nResId = RID_SVXSTR_PAPER_B6_ISO; break;
- case PAPER_ENV_C4: nResId = RID_SVXSTR_PAPER_C4; break;
- case PAPER_ENV_C5: nResId = RID_SVXSTR_PAPER_C5; break;
- case PAPER_ENV_C6: nResId = RID_SVXSTR_PAPER_C6; break;
- case PAPER_ENV_C65: nResId = RID_SVXSTR_PAPER_C65; break;
- case PAPER_ENV_DL: nResId = RID_SVXSTR_PAPER_DL; break;
- case PAPER_SLIDE_DIA: nResId = RID_SVXSTR_PAPER_DIA; break;
- case PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break;
- case PAPER_C: nResId = RID_SVXSTR_PAPER_C; break;
- case PAPER_D: nResId = RID_SVXSTR_PAPER_D; break;
- case PAPER_E: nResId = RID_SVXSTR_PAPER_E; break;
- case PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break;
- case PAPER_FANFOLD_LEGAL_DE: nResId = RID_SVXSTR_PAPER_LEGAL2; break;
- case PAPER_ENV_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break;
- case PAPER_ENV_PERSONAL: nResId = RID_SVXSTR_PAPER_COM675; break;
- case PAPER_ENV_9: nResId = RID_SVXSTR_PAPER_COM9; break;
- case PAPER_ENV_10: nResId = RID_SVXSTR_PAPER_COM10; break;
- case PAPER_ENV_11: nResId = RID_SVXSTR_PAPER_COM11; break;
- case PAPER_ENV_12: nResId = RID_SVXSTR_PAPER_COM12; break;
- case PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break;
- case PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break;
- case PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break;
- case PAPER_B4_JIS: nResId = RID_SVXSTR_PAPER_B4_JIS; break;
- case PAPER_B5_JIS: nResId = RID_SVXSTR_PAPER_B5_JIS; break;
- case PAPER_B6_JIS: nResId = RID_SVXSTR_PAPER_B6_JIS; break;
- default: DBG_ERRORFILE( "unknown papersize" );
- }
-
- return ( nResId > 0 ) ? String( EditResId( nResId ) ) : String();
+ return String( Printer::GetPaperName( ePaper ) );
}
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 20dd54f1a3..3ad8db0640 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -145,7 +145,7 @@ int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const
- ein sal_uInt16 for the mode
- ein sal_uInt32 for all values (distance, height, rel. detail)
*/
-bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -190,7 +190,7 @@ bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -241,7 +241,7 @@ bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
eLineSpace = aLSp.Mode == style::LineSpacingMode::FIX ? SVX_LINE_SPACE_FIX : SVX_LINE_SPACE_MIN;
nLineHeight = aLSp.Height;
if(bConvert)
- nLineHeight = (USHORT)MM100_TO_TWIP_UNSIGNED(nLineHeight);
+ nLineHeight = (sal_uInt16)MM100_TO_TWIP_UNSIGNED(nLineHeight);
}
break;
}
@@ -382,7 +382,7 @@ int SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const
? 1 : 0 );
}
-bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
@@ -400,7 +400,7 @@ bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
@@ -420,7 +420,7 @@ bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
eVal != SVX_ADJUST_LEFT &&
eVal != SVX_ADJUST_BLOCK &&
eVal != SVX_ADJUST_CENTER)
- return FALSE;
+ return sal_False;
if(eVal < (sal_uInt16)SVX_ADJUST_END)
nMemberId == MID_PARA_ADJUST ?
SetAdjust((SvxAdjust)eVal) :
@@ -542,7 +542,7 @@ SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
// class SvxWidowsItem ---------------------------------------------------
-SvxWidowsItem::SvxWidowsItem(const BYTE nL, const USHORT nId ) :
+SvxWidowsItem::SvxWidowsItem(const sal_uInt8 nL, const sal_uInt16 nId ) :
SfxByteItem( nId, nL )
{
}
@@ -614,7 +614,7 @@ SfxItemPresentation SvxWidowsItem::GetPresentation
// class SvxOrphansItem --------------------------------------------------
-SvxOrphansItem::SvxOrphansItem(const BYTE nL, const USHORT nId ) :
+SvxOrphansItem::SvxOrphansItem(const sal_uInt8 nL, const sal_uInt16 nId ) :
SfxByteItem( nId, nL )
{
}
@@ -696,7 +696,7 @@ SvxHyphenZoneItem::SvxHyphenZoneItem( const sal_Bool bHyph, const sal_uInt16 nId
}
// -----------------------------------------------------------------------
-bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -717,7 +717,7 @@ bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
// -----------------------------------------------------------------------
-bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Int16 nNewVal = 0;
@@ -732,13 +732,13 @@ bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
bHyphen = Any2Bool(rVal);
break;
case MID_HYPHEN_MIN_LEAD:
- nMinLead = (BYTE)nNewVal;
+ nMinLead = (sal_uInt8)nNewVal;
break;
case MID_HYPHEN_MIN_TRAIL:
- nMinTrail = (BYTE)nNewVal;
+ nMinTrail = (sal_uInt8)nNewVal;
break;
case MID_HYPHEN_MAX_HYPHENS:
- nMaxHyphens = (BYTE)nNewVal;
+ nMaxHyphens = (sal_uInt8)nNewVal;
break;
}
return true;
@@ -976,7 +976,7 @@ SvxTabStopItem& SvxTabStopItem::operator=( const SvxTabStopItem& rTSI )
return *this;
}
-bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1017,7 +1017,7 @@ bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return sal_True;
}
-bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1337,7 +1337,7 @@ SfxPoolItem* SvxPageModelItem::Clone( SfxItemPool* ) const
//------------------------------------------------------------------------
-bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
@@ -1351,7 +1351,7 @@ bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberI
return sal_True;
}
-bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId )
+bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet;
@@ -1411,14 +1411,14 @@ SfxPoolItem* SvxScriptSpaceItem::Clone( SfxItemPool * ) const
return new SvxScriptSpaceItem( GetValue(), Which() );
}
-SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, USHORT) const
+SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool bFlag;
rStrm >> bFlag;
return new SvxScriptSpaceItem( bFlag, Which() );
}
-USHORT SvxScriptSpaceItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxScriptSpaceItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
@@ -1464,14 +1464,14 @@ SfxPoolItem* SvxHangingPunctuationItem::Clone( SfxItemPool * ) const
return new SvxHangingPunctuationItem( GetValue(), Which() );
}
-SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, USHORT) const
+SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool nValue;
rStrm >> nValue;
return new SvxHangingPunctuationItem( nValue, Which() );
}
-USHORT SvxHangingPunctuationItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxHangingPunctuationItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
@@ -1517,14 +1517,14 @@ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool * ) const
return new SvxForbiddenRuleItem( GetValue(), Which() );
}
-SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const
+SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool nValue;
rStrm >> nValue;
return new SvxForbiddenRuleItem( nValue, Which() );
}
-USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxForbiddenRuleItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
@@ -1573,20 +1573,20 @@ SfxPoolItem* SvxParaVertAlignItem::Clone( SfxItemPool* ) const
return new SvxParaVertAlignItem( GetValue(), Which() );
}
-SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, USHORT ) const
+SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nVal;
rStrm >> nVal;
return new SvxParaVertAlignItem( nVal, Which() );
}
-SvStream& SvxParaVertAlignItem::Store( SvStream & rStrm, USHORT ) const
+SvStream& SvxParaVertAlignItem::Store( SvStream & rStrm, sal_uInt16 ) const
{
rStrm << GetValue();
return rStrm;
}
-USHORT SvxParaVertAlignItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxParaVertAlignItem::GetVersion( sal_uInt16 nFFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
}
@@ -1604,7 +1604,7 @@ SfxItemPresentation SvxParaVertAlignItem::GetPresentation(
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nTmp;
+ sal_uInt16 nTmp;
switch( GetValue() )
{
case AUTOMATIC: nTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break;
@@ -1623,19 +1623,19 @@ SfxItemPresentation SvxParaVertAlignItem::GetPresentation(
}
bool SvxParaVertAlignItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE /*nMemberId*/ ) const
+ sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= (sal_Int16)GetValue();
return sal_True;
}
bool SvxParaVertAlignItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE /*nMemberId*/ )
+ sal_uInt8 /*nMemberId*/ )
{
sal_Int16 nVal = sal_Int16();
if((rVal >>= nVal) && nVal >=0 && nVal <= BOTTOM )
{
- SetValue( (USHORT)nVal );
+ SetValue( (sal_uInt16)nVal );
return sal_True;
}
else
@@ -1659,14 +1659,14 @@ SfxPoolItem* SvxParaGridItem::Clone( SfxItemPool * ) const
return new SvxParaGridItem( GetValue(), Which() );
}
-SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, USHORT) const
+SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool bFlag;
rStrm >> bFlag;
return new SvxParaGridItem( bFlag, Which() );
}
-USHORT SvxParaGridItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxParaGridItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx
index 69f727da6d..856364d3dd 100644..100755
--- a/editeng/source/items/svdfield.cxx
+++ b/editeng/source/items/svdfield.cxx
@@ -49,14 +49,14 @@ int SdrMeasureField::operator==(const SvxFieldData& rSrc) const
void SdrMeasureField::Load(SvPersistStream& rIn)
{
- UINT16 nFieldKind;
+ sal_uInt16 nFieldKind;
rIn>>nFieldKind;
eMeasureFieldKind=(SdrMeasureFieldKind)nFieldKind;
}
void SdrMeasureField::Save(SvPersistStream& rOut)
{
- rOut<<(UINT16)eMeasureFieldKind;
+ rOut<<(sal_uInt16)eMeasureFieldKind;
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index f98e1ed271..909f2c580e 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -81,7 +81,7 @@ SvxFont::SvxFont( const SvxFont &rFont )
void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
- const Size& rSize, const Color& rCol, BOOL bLeft )
+ const Size& rSize, const Color& rCol, sal_Bool bLeft )
{
long nLeft = ( rRect.Left() + rRect.Right() - rSize.Width() )/ 2;
long nRight = nLeft + rSize.Width();
@@ -146,12 +146,12 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
// Every beginning of a word is capitalized, the rest of the word
// is taken over as is.
// Bug: if the attribute starts in the middle of the word.
- BOOL bBlank = TRUE;
+ sal_Bool bBlank = sal_True;
- for( USHORT i = 0; i < aTxt.Len(); ++i )
+ for( sal_uInt16 i = 0; i < aTxt.Len(); ++i )
{
if( sal_Unicode(' ') == aTxt.GetChar(i) || sal_Unicode('\t') == aTxt.GetChar(i) )
- bBlank = TRUE;
+ bBlank = sal_True;
else
{
if( bBlank )
@@ -160,7 +160,7 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
aCharClass.toUpper( aTemp );
aTxt.Replace( i, 1, aTemp );
}
- bBlank = FALSE;
+ bBlank = sal_False;
}
}
break;
@@ -201,11 +201,11 @@ public:
: pOut(_pOut), rTxt(_rTxt), nIdx(_nIdx), nLen(_nLen)
{ }
- virtual void DoSpace( const BOOL bDraw );
+ virtual void DoSpace( const sal_Bool bDraw );
virtual void SetSpace();
virtual void Do( const XubString &rTxt,
const xub_StrLen nIdx, const xub_StrLen nLen,
- const BOOL bUpper ) = 0;
+ const sal_Bool bUpper ) = 0;
inline OutputDevice *GetOut() { return pOut; }
inline const XubString &GetTxt() const { return rTxt; }
@@ -213,12 +213,12 @@ public:
xub_StrLen GetLen() const { return nLen; }
};
-void SvxDoCapitals::DoSpace( const BOOL /*bDraw*/ ) { }
+void SvxDoCapitals::DoSpace( const sal_Bool /*bDraw*/ ) { }
void SvxDoCapitals::SetSpace() { }
void SvxDoCapitals::Do( const XubString &/*_rTxt*/, const xub_StrLen /*_nIdx*/,
- const xub_StrLen /*_nLen*/, const BOOL /*bUpper*/ ) { }
+ const xub_StrLen /*_nLen*/, const sal_Bool /*bUpper*/ ) { }
/*************************************************************************
* SvxFont::DoOnCapitals() const
@@ -233,9 +233,9 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
const xub_StrLen nLen = STRING_LEN == nPartLen ? rDo.GetLen() : nPartLen;
const XubString aTxt( CalcCaseMap( rTxt ) );
- const USHORT nTxtLen = Min( rTxt.Len(), nLen );
- USHORT nPos = 0;
- USHORT nOldPos = nPos;
+ const sal_uInt16 nTxtLen = Min( rTxt.Len(), nLen );
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nOldPos = nPos;
// #108210#
// Test if string length differ between original and CaseMapped
@@ -275,11 +275,11 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
const XubString aSnippet(rTxt, nIdx + nOldPos, nPos-nOldPos);
XubString aNewText = CalcCaseMap(aSnippet);
- rDo.Do( aNewText, 0, aNewText.Len(), TRUE );
+ rDo.Do( aNewText, 0, aNewText.Len(), sal_True );
}
else
{
- rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, TRUE );
+ rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, sal_True );
}
nOldPos = nPos;
@@ -305,11 +305,11 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
const XubString aSnippet(rTxt, nIdx + nOldPos, nPos - nOldPos);
XubString aNewText = CalcCaseMap(aSnippet);
- rDo.Do( aNewText, 0, aNewText.Len(), FALSE );
+ rDo.Do( aNewText, 0, aNewText.Len(), sal_False );
}
else
{
- rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, FALSE );
+ rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, sal_False );
}
nOldPos = nPos;
@@ -320,7 +320,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
if( nOldPos != nPos )
{
- rDo.DoSpace( FALSE );
+ rDo.DoSpace( sal_False );
if(bCaseMapLengthDiffers)
{
@@ -330,18 +330,18 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
const XubString aSnippet(rTxt, nIdx + nOldPos, nPos - nOldPos);
XubString aNewText = CalcCaseMap(aSnippet);
- rDo.Do( aNewText, 0, aNewText.Len(), FALSE );
+ rDo.Do( aNewText, 0, aNewText.Len(), sal_False );
}
else
{
- rDo.Do( aTxt, nIdx + nOldPos, nPos - nOldPos, FALSE );
+ rDo.Do( aTxt, nIdx + nOldPos, nPos - nOldPos, sal_False );
}
nOldPos = nPos;
rDo.SetSpace();
}
}
- rDo.DoSpace( TRUE );
+ rDo.DoSpace( sal_True );
}
@@ -432,7 +432,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt )
}
Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const XubString &rTxt,
- const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray ) const
+ const sal_uInt16 nIdx, const sal_uInt16 nLen, sal_Int32* pDXArray ) const
{
if ( !IsCaseMap() && !IsKern() )
return Size( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ),
@@ -657,18 +657,18 @@ public:
{ }
virtual void Do( const XubString &rTxt, const xub_StrLen nIdx,
- const xub_StrLen nLen, const BOOL bUpper );
+ const xub_StrLen nLen, const sal_Bool bUpper );
inline const Size &GetSize() const { return aTxtSize; };
};
void SvxDoGetCapitalSize::Do( const XubString &_rTxt, const xub_StrLen _nIdx,
- const xub_StrLen _nLen, const BOOL bUpper )
+ const xub_StrLen _nLen, const sal_Bool bUpper )
{
Size aPartSize;
if ( !bUpper )
{
- BYTE nProp = pFont->GetPropr();
+ sal_uInt8 nProp = pFont->GetPropr();
pFont->SetProprRel( SMALL_CAPS_PERCENTAGE );
pFont->SetPhysFont( pOut );
aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) );
@@ -720,23 +720,23 @@ public:
aSpacePos( rPos ),
nKern( nKrn )
{ }
- virtual void DoSpace( const BOOL bDraw );
+ virtual void DoSpace( const sal_Bool bDraw );
virtual void SetSpace();
virtual void Do( const XubString &rTxt, const xub_StrLen nIdx,
- const xub_StrLen nLen, const BOOL bUpper );
+ const xub_StrLen nLen, const sal_Bool bUpper );
};
-void SvxDoDrawCapital::DoSpace( const BOOL bDraw )
+void SvxDoDrawCapital::DoSpace( const sal_Bool bDraw )
{
if ( bDraw || pFont->IsWordLineMode() )
{
- USHORT nDiff = (USHORT)(aPos.X() - aSpacePos.X());
+ sal_uInt16 nDiff = (sal_uInt16)(aPos.X() - aSpacePos.X());
if ( nDiff )
{
- BOOL bWordWise = pFont->IsWordLineMode();
- BOOL bTrans = pFont->IsTransparent();
- pFont->SetWordLineMode( FALSE );
- pFont->SetTransparent( TRUE );
+ sal_Bool bWordWise = pFont->IsWordLineMode();
+ sal_Bool bTrans = pFont->IsTransparent();
+ pFont->SetWordLineMode( sal_False );
+ pFont->SetTransparent( sal_True );
pFont->SetPhysFont( pOut );
pOut->DrawStretchText( aSpacePos, nDiff, XubString( sDoubleSpace,
RTL_TEXTENCODING_MS_1252 ), 0, 2 );
@@ -754,9 +754,9 @@ void SvxDoDrawCapital::SetSpace()
}
void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx,
- const xub_StrLen _nLen, const BOOL bUpper)
+ const xub_StrLen _nLen, const sal_Bool bUpper)
{
- BYTE nProp = 0;
+ sal_uInt8 nProp = 0;
Size aPartSize;
// Set the desired font
diff --git a/editeng/source/items/svxitems.src b/editeng/source/items/svxitems.src
index 383683be18..383683be18 100644..100755
--- a/editeng/source/items/svxitems.src
+++ b/editeng/source/items/svxitems.src
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index d12a847919..43a6ab8808 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -124,7 +124,7 @@ using namespace ::com::sun::star::text;
#define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L))
#define MM100_TO_TWIP_UNSIGNED(MM100) ((((MM100)*72L+63L)/127L))
-BOOL SvxFontItem::bEnableStoreUnicodeNames = FALSE;
+sal_Bool SvxFontItem::bEnableStoreUnicodeNames = sal_False;
// STATIC DATA -----------------------------------------------------------
@@ -169,7 +169,7 @@ TYPEINIT1(SvxScriptSetItem, SfxSetItem );
// class SvxFontListItem -------------------------------------------------
SvxFontListItem::SvxFontListItem( const FontList* pFontLst,
- const USHORT nId ) :
+ const sal_uInt16 nId ) :
SfxPoolItem( nId ),
pFontList( pFontLst )
{
@@ -178,7 +178,7 @@ SvxFontListItem::SvxFontListItem( const FontList* pFontLst,
sal_Int32 nCount = pFontList->GetFontNameCount();
aFontNameSeq.realloc( nCount );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
aFontNameSeq[i] = pFontList->GetFontName(i).GetName();
}
}
@@ -209,7 +209,7 @@ int SvxFontListItem::operator==( const SfxPoolItem& rAttr ) const
return( pFontList == ((SvxFontListItem&)rAttr).pFontList );
}
-bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= aFontNameSeq;
return true;
@@ -231,7 +231,7 @@ SfxItemPresentation SvxFontListItem::GetPresentation
// class SvxFontItem -----------------------------------------------------
-SvxFontItem::SvxFontItem( const USHORT nId ) :
+SvxFontItem::SvxFontItem( const sal_uInt16 nId ) :
SfxPoolItem( nId )
{
eFamily = FAMILY_SWISS;
@@ -243,7 +243,7 @@ SvxFontItem::SvxFontItem( const USHORT nId ) :
SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
const XubString& aStName, const FontPitch eFontPitch,
- const rtl_TextEncoding eFontTextEncoding, const USHORT nId ) :
+ const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId ) :
SfxPoolItem( nId ),
@@ -257,7 +257,7 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
// -----------------------------------------------------------------------
-bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -286,7 +286,7 @@ bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
// -----------------------------------------------------------------------
-bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId)
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -380,14 +380,14 @@ SfxPoolItem* SvxFontItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- BOOL bToBats =
+ sal_Bool bToBats =
GetFamilyName().EqualsAscii( "StarSymbol", 0, sizeof("StarSymbol")-1 ) ||
GetFamilyName().EqualsAscii( "OpenSymbol", 0, sizeof("OpenSymbol")-1 );
- rStrm << (BYTE) GetFamily() << (BYTE) GetPitch()
- << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()));
+ rStrm << (sal_uInt8) GetFamily() << (sal_uInt8) GetPitch()
+ << (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()));
String aStoreFamilyName( GetFamilyName() );
if( bToBats )
@@ -409,9 +409,9 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE _eFamily, eFontPitch, eFontTextEncoding;
+ sal_uInt8 _eFamily, eFontPitch, eFontTextEncoding;
String aName, aStyle;
rStrm >> _eFamily;
rStrm >> eFontPitch;
@@ -424,7 +424,7 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const
rStrm.ReadByteString(aStyle);
// Set the "correct" textencoding
- eFontTextEncoding = (BYTE)GetSOLoadTextEncoding( eFontTextEncoding, (USHORT)rStrm.GetVersion() );
+ eFontTextEncoding = (sal_uInt8)GetSOLoadTextEncoding( eFontTextEncoding, (sal_uInt16)rStrm.GetVersion() );
// at some point, the StarBats changes from ANSI font to SYMBOL font
if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName.EqualsAscii("StarBats") )
@@ -476,15 +476,15 @@ SfxItemPresentation SvxFontItem::GetPresentation
//------------------------------------------------------------------------
-void SvxFontItem::EnableStoreUnicodeNames( BOOL bEnable )
+void SvxFontItem::EnableStoreUnicodeNames( sal_Bool bEnable )
{
bEnableStoreUnicodeNames = bEnable;
}
// class SvxPostureItem --------------------------------------------------
-SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)ePosture )
+SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)ePosture )
{
}
@@ -497,24 +497,24 @@ SfxPoolItem* SvxPostureItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-USHORT SvxPostureItem::GetValueCount() const
+sal_uInt16 SvxPostureItem::GetValueCount() const
{
return ITALIC_NORMAL + 1; // ITALIC_NONE also belongs here
}
// -----------------------------------------------------------------------
-SvStream& SvxPostureItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxPostureItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE)GetValue();
+ rStrm << (sal_uInt8)GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nPosture;
+ sal_uInt8 nPosture;
rStrm >> nPosture;
return new SvxPostureItem( (const FontItalic)nPosture, Which() );
}
@@ -545,13 +545,13 @@ SfxItemPresentation SvxPostureItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxPostureItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (USHORT)ITALIC_NORMAL, "enum overflow!" );
+ DBG_ASSERT( nPos <= (sal_uInt16)ITALIC_NORMAL, "enum overflow!" );
XubString sTxt;
FontItalic eItalic = (FontItalic)nPos;
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( eItalic )
{
@@ -566,7 +566,7 @@ XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const
return sTxt;
}
-bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxPostureItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
@@ -581,7 +581,7 @@ bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxPostureItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
@@ -600,7 +600,7 @@ bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
eSlant = (awt::FontSlant)nValue;
}
- SetValue((USHORT)eSlant);
+ SetValue((sal_uInt16)eSlant);
}
}
return true;
@@ -614,7 +614,7 @@ int SvxPostureItem::HasBoolValue() const
// -----------------------------------------------------------------------
-BOOL SvxPostureItem::GetBoolValue() const
+sal_Bool SvxPostureItem::GetBoolValue() const
{
return ( (FontItalic)GetValue() >= ITALIC_OBLIQUE );
}
@@ -623,13 +623,13 @@ BOOL SvxPostureItem::GetBoolValue() const
void SvxPostureItem::SetBoolValue( sal_Bool bVal )
{
- SetValue( (USHORT)(bVal ? ITALIC_NORMAL : ITALIC_NONE) );
+ SetValue( (sal_uInt16)(bVal ? ITALIC_NORMAL : ITALIC_NONE) );
}
// class SvxWeightItem ---------------------------------------------------
-SvxWeightItem::SvxWeightItem( const FontWeight eWght, const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)eWght )
+SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)eWght )
{
}
@@ -653,12 +653,12 @@ sal_Bool SvxWeightItem::GetBoolValue() const
void SvxWeightItem::SetBoolValue( sal_Bool bVal )
{
- SetValue( (USHORT)(bVal ? WEIGHT_BOLD : WEIGHT_NORMAL) );
+ SetValue( (sal_uInt16)(bVal ? WEIGHT_BOLD : WEIGHT_NORMAL) );
}
// -----------------------------------------------------------------------
-USHORT SvxWeightItem::GetValueCount() const
+sal_uInt16 SvxWeightItem::GetValueCount() const
{
return WEIGHT_BLACK; // WEIGHT_DONTKNOW does not belong
}
@@ -672,17 +672,17 @@ SfxPoolItem* SvxWeightItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxWeightItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxWeightItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE)GetValue();
+ rStrm << (sal_uInt8)GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nWeight;
+ sal_uInt8 nWeight;
rStrm >> nWeight;
return new SvxWeightItem( (FontWeight)nWeight, Which() );
}
@@ -713,13 +713,13 @@ SfxItemPresentation SvxWeightItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxWeightItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxWeightItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (USHORT)WEIGHT_BLACK, "enum overflow!" );
+ DBG_ASSERT( nPos <= (sal_uInt16)WEIGHT_BLACK, "enum overflow!" );
return EE_RESSTR( RID_SVXITEMS_WEIGHT_BEGIN + nPos );
}
-bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxWeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
@@ -736,7 +736,7 @@ bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxWeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
@@ -754,7 +754,7 @@ bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
return sal_False;
fValue = (float)nValue;
}
- SetValue( (USHORT)VCLUnoHelper::ConvertFontWeight((float)fValue) );
+ SetValue( (sal_uInt16)VCLUnoHelper::ConvertFontWeight((float)fValue) );
}
break;
}
@@ -763,9 +763,9 @@ bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
// class SvxFontHeightItem -----------------------------------------------
-SvxFontHeightItem::SvxFontHeightItem( const ULONG nSz,
- const USHORT nPrp,
- const USHORT nId ) :
+SvxFontHeightItem::SvxFontHeightItem( const sal_uLong nSz,
+ const sal_uInt16 nPrp,
+ const sal_uInt16 nId ) :
SfxPoolItem( nId )
{
SetHeight( nSz,nPrp ); // calculate in percentage
@@ -780,17 +780,17 @@ SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
{
- rStrm << (USHORT)GetHeight();
+ rStrm << (sal_uInt16)GetHeight();
if( FONTHEIGHT_UNIT_VERSION <= nItemVersion )
- rStrm << GetProp() << (USHORT)GetPropUnit();
+ rStrm << GetProp() << (sal_uInt16)GetPropUnit();
else
{
// When exporting to the old versions the relative information is lost
// when there is no percentage
- USHORT _nProp = GetProp();
+ sal_uInt16 _nProp = GetProp();
if( SFX_MAPUNIT_RELATIVE != GetPropUnit() )
_nProp = 100;
rStrm << _nProp;
@@ -801,9 +801,9 @@ SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) cons
// -----------------------------------------------------------------------
SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
- USHORT nVersion ) const
+ sal_uInt16 nVersion ) const
{
- USHORT nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE;
+ sal_uInt16 nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE;
rStrm >> nsize;
@@ -811,9 +811,9 @@ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
rStrm >> nprop;
else
{
- BYTE nP;
+ sal_uInt8 nP;
rStrm >> nP;
- nprop = (USHORT)nP;
+ nprop = (sal_uInt16)nP;
}
if( FONTHEIGHT_UNIT_VERSION <= nVersion )
@@ -834,7 +834,7 @@ int SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const
GetPropUnit() == ((SvxFontHeightItem&)rItem).GetPropUnit();
}
-bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxFontHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// In StarOne is the uno::Any always 1/100mm. Through the MemberId it is
// controlled if the value in the Item should be 1/100mm or Twips.
@@ -968,7 +968,7 @@ sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUn
return nRet;
}
-bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1093,7 +1093,7 @@ SfxItemPresentation SvxFontHeightItem::GetPresentation
// -----------------------------------------------------------------------
-USHORT SvxFontHeightItem::GetVersion(USHORT nFileVersion) const
+sal_uInt16 SvxFontHeightItem::GetVersion(sal_uInt16 nFileVersion) const
{
return (nFileVersion <= SOFFICE_FILEFORMAT_40)
? FONTHEIGHT_16_VERSION
@@ -1115,7 +1115,7 @@ bool SvxFontHeightItem::HasMetrics() const
return true;
}
-void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp,
+void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp,
SfxMapUnit eUnit )
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
@@ -1133,7 +1133,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp,
ePropUnit = eUnit;
}
-void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, USHORT nNewProp,
+void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp,
SfxMapUnit eMetric, SfxMapUnit eCoreMetric )
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
@@ -1155,7 +1155,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, USHORT nNewProp,
// class SvxFontWidthItem -----------------------------------------------
-SvxFontWidthItem::SvxFontWidthItem( const USHORT nSz, const USHORT nPrp, const USHORT nId ) :
+SvxFontWidthItem::SvxFontWidthItem( const sal_uInt16 nSz, const sal_uInt16 nPrp, const sal_uInt16 nId ) :
SfxPoolItem( nId )
{
nWidth = nSz;
@@ -1171,7 +1171,7 @@ SfxPoolItem* SvxFontWidthItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxFontWidthItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm << GetWidth() << GetProp();
return rStrm;
@@ -1181,7 +1181,7 @@ SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) c
bool SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv )
{
- nWidth = (USHORT)Scale( nWidth, nMult, nDiv );
+ nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv );
return true;
}
@@ -1195,10 +1195,10 @@ bool SvxFontWidthItem::HasMetrics() const
// -----------------------------------------------------------------------
SfxPoolItem* SvxFontWidthItem::Create( SvStream& rStrm,
- USHORT /*nVersion*/ ) const
+ sal_uInt16 /*nVersion*/ ) const
{
- USHORT nS;
- USHORT nP;
+ sal_uInt16 nS;
+ sal_uInt16 nP;
rStrm >> nS;
rStrm >> nP;
@@ -1216,7 +1216,7 @@ int SvxFontWidthItem::operator==( const SfxPoolItem& rItem ) const
GetProp() == ((SvxFontWidthItem&)rItem).GetProp();
}
-bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxFontWidthItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1232,7 +1232,7 @@ bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxFontWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxFontWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1287,8 +1287,8 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation
// class SvxTextLineItem ------------------------------------------------
-SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const USHORT nId )
- : SfxEnumItem( nId, (USHORT)eSt ), mColor( COL_TRANSPARENT )
+SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const sal_uInt16 nId )
+ : SfxEnumItem( nId, (sal_uInt16)eSt ), mColor( COL_TRANSPARENT )
{
}
@@ -1310,7 +1310,7 @@ sal_Bool SvxTextLineItem::GetBoolValue() const
void SvxTextLineItem::SetBoolValue( sal_Bool bVal )
{
- SetValue( (USHORT)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) );
+ SetValue( (sal_uInt16)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) );
}
// -----------------------------------------------------------------------
@@ -1324,24 +1324,24 @@ SfxPoolItem* SvxTextLineItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-USHORT SvxTextLineItem::GetValueCount() const
+sal_uInt16 SvxTextLineItem::GetValueCount() const
{
return UNDERLINE_DOTTED + 1; // UNDERLINE_NONE also belongs here
}
// -----------------------------------------------------------------------
-SvStream& SvxTextLineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxTextLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE)GetValue();
+ rStrm << (sal_uInt8)GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nState;
+ sal_uInt8 nState;
rStrm >> nState;
return new SvxTextLineItem( (FontUnderline)nState, Which() );
}
@@ -1374,13 +1374,13 @@ SfxItemPresentation SvxTextLineItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const
+XubString SvxTextLineItem::GetValueTextByPos( sal_uInt16 /*nPos*/ ) const
{
OSL_FAIL("SvxTextLineItem::GetValueTextByPos: Pure virtual method");
return XubString();
}
-bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxTextLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -1402,7 +1402,7 @@ bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
}
-bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxTextLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_True;
@@ -1451,7 +1451,7 @@ int SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const
// class SvxUnderlineItem ------------------------------------------------
-SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId )
+SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const sal_uInt16 nId )
: SvxTextLineItem( eSt, nId )
{
}
@@ -1467,24 +1467,24 @@ SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nState;
+ sal_uInt8 nState;
rStrm >> nState;
return new SvxUnderlineItem( (FontUnderline)nState, Which() );
}
// -----------------------------------------------------------------------
-XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxUnderlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
+ DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" );
return EE_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos );
}
// class SvxOverlineItem ------------------------------------------------
-SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const USHORT nId )
+SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const sal_uInt16 nId )
: SvxTextLineItem( eSt, nId )
{
}
@@ -1500,25 +1500,25 @@ SfxPoolItem* SvxOverlineItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nState;
+ sal_uInt8 nState;
rStrm >> nState;
return new SvxOverlineItem( (FontUnderline)nState, Which() );
}
// -----------------------------------------------------------------------
-XubString SvxOverlineItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
+ DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" );
return EE_RESSTR( RID_SVXITEMS_OL_BEGIN + nPos );
}
// class SvxCrossedOutItem -----------------------------------------------
-SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const USHORT nId )
- : SfxEnumItem( nId, (USHORT)eSt )
+SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const sal_uInt16 nId )
+ : SfxEnumItem( nId, (sal_uInt16)eSt )
{
}
@@ -1540,12 +1540,12 @@ sal_Bool SvxCrossedOutItem::GetBoolValue() const
void SvxCrossedOutItem::SetBoolValue( sal_Bool bVal )
{
- SetValue( (USHORT)(bVal ? STRIKEOUT_SINGLE : STRIKEOUT_NONE) );
+ SetValue( (sal_uInt16)(bVal ? STRIKEOUT_SINGLE : STRIKEOUT_NONE) );
}
// -----------------------------------------------------------------------
-USHORT SvxCrossedOutItem::GetValueCount() const
+sal_uInt16 SvxCrossedOutItem::GetValueCount() const
{
return STRIKEOUT_DOUBLE + 1; // STRIKEOUT_NONE belongs also here
}
@@ -1559,17 +1559,17 @@ SfxPoolItem* SvxCrossedOutItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE)GetValue();
+ rStrm << (sal_uInt8)GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE eCross;
+ sal_uInt8 eCross;
rStrm >> eCross;
return new SvxCrossedOutItem( (FontStrikeout)eCross, Which() );
}
@@ -1600,13 +1600,13 @@ SfxItemPresentation SvxCrossedOutItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxCrossedOutItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxCrossedOutItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (USHORT)STRIKEOUT_X, "enum overflow!" );
+ DBG_ASSERT( nPos <= (sal_uInt16)STRIKEOUT_X, "enum overflow!" );
return EE_RESSTR( RID_SVXITEMS_STRIKEOUT_BEGIN + nPos );
}
-bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -1621,7 +1621,7 @@ bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -1642,7 +1642,7 @@ bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
}
// class SvxShadowedItem -------------------------------------------------
-SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const USHORT nId ) :
+SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const sal_uInt16 nId ) :
SfxBoolItem( nId, bShadowed )
{
}
@@ -1656,17 +1656,17 @@ SfxPoolItem* SvxShadowedItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxShadowedItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxShadowedItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE) GetValue();
+ rStrm << (sal_uInt8) GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nState;
+ sal_uInt8 nState;
rStrm >> nState;
return new SvxShadowedItem( nState, Which() );
}
@@ -1689,7 +1689,7 @@ SfxItemPresentation SvxShadowedItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = RID_SVXITEMS_SHADOWED_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_SHADOWED_FALSE;
if ( GetValue() )
nId = RID_SVXITEMS_SHADOWED_TRUE;
@@ -1703,7 +1703,7 @@ SfxItemPresentation SvxShadowedItem::GetPresentation
// class SvxAutoKernItem -------------------------------------------------
-SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const USHORT nId ) :
+SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const sal_uInt16 nId ) :
SfxBoolItem( nId, bAutoKern )
{
}
@@ -1717,17 +1717,17 @@ SfxPoolItem* SvxAutoKernItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxAutoKernItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxAutoKernItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE) GetValue();
+ rStrm << (sal_uInt8) GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nState;
+ sal_uInt8 nState;
rStrm >> nState;
return new SvxAutoKernItem( nState, Which() );
}
@@ -1750,7 +1750,7 @@ SfxItemPresentation SvxAutoKernItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = RID_SVXITEMS_AUTOKERN_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_AUTOKERN_FALSE;
if ( GetValue() )
nId = RID_SVXITEMS_AUTOKERN_TRUE;
@@ -1765,7 +1765,7 @@ SfxItemPresentation SvxAutoKernItem::GetPresentation
// class SvxWordLineModeItem ---------------------------------------------
SvxWordLineModeItem::SvxWordLineModeItem( const sal_Bool bWordLineMode,
- const USHORT nId ) :
+ const sal_uInt16 nId ) :
SfxBoolItem( nId, bWordLineMode )
{
}
@@ -1779,7 +1779,7 @@ SfxPoolItem* SvxWordLineModeItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm << (sal_Bool) GetValue();
return rStrm;
@@ -1787,7 +1787,7 @@ SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/
// -----------------------------------------------------------------------
-SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Bool bValue;
rStrm >> bValue;
@@ -1812,7 +1812,7 @@ SfxItemPresentation SvxWordLineModeItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = RID_SVXITEMS_WORDLINE_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_WORDLINE_FALSE;
if ( GetValue() )
nId = RID_SVXITEMS_WORDLINE_TRUE;
@@ -1826,7 +1826,7 @@ SfxItemPresentation SvxWordLineModeItem::GetPresentation
// class SvxContourItem --------------------------------------------------
-SvxContourItem::SvxContourItem( const sal_Bool bContoured, const USHORT nId ) :
+SvxContourItem::SvxContourItem( const sal_Bool bContoured, const sal_uInt16 nId ) :
SfxBoolItem( nId, bContoured )
{
}
@@ -1840,7 +1840,7 @@ SfxPoolItem* SvxContourItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxContourItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm << (sal_Bool) GetValue();
return rStrm;
@@ -1848,7 +1848,7 @@ SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) con
// -----------------------------------------------------------------------
-SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Bool bValue;
rStrm >> bValue;
@@ -1873,7 +1873,7 @@ SfxItemPresentation SvxContourItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = RID_SVXITEMS_CONTOUR_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_CONTOUR_FALSE;
if ( GetValue() )
nId = RID_SVXITEMS_CONTOUR_TRUE;
@@ -1887,7 +1887,7 @@ SfxItemPresentation SvxContourItem::GetPresentation
// class SvxPropSizeItem -------------------------------------------------
-SvxPropSizeItem::SvxPropSizeItem( const USHORT nPercent, const USHORT nId ) :
+SvxPropSizeItem::SvxPropSizeItem( const sal_uInt16 nPercent, const sal_uInt16 nId ) :
SfxUInt16Item( nId, nPercent )
{
}
@@ -1901,17 +1901,17 @@ SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxPropSizeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxPropSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (USHORT) GetValue();
+ rStrm << (sal_uInt16) GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, sal_uInt16) const
{
- USHORT nSize;
+ sal_uInt16 nSize;
rStrm >> nSize;
return new SvxPropSizeItem( nSize, Which() );
}
@@ -1932,7 +1932,7 @@ SfxItemPresentation SvxPropSizeItem::GetPresentation
// class SvxColorItem ----------------------------------------------------
-SvxColorItem::SvxColorItem( const USHORT nId ) :
+SvxColorItem::SvxColorItem( const sal_uInt16 nId ) :
SfxPoolItem( nId ),
mColor( COL_BLACK )
{
@@ -1940,7 +1940,7 @@ SvxColorItem::SvxColorItem( const USHORT nId ) :
// -----------------------------------------------------------------------
-SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) :
+SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) :
SfxPoolItem( nId ),
mColor( rCol )
{
@@ -1948,7 +1948,7 @@ SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) :
// -----------------------------------------------------------------------
-SvxColorItem::SvxColorItem( SvStream &rStrm, const USHORT nId ) :
+SvxColorItem::SvxColorItem( SvStream &rStrm, const sal_uInt16 nId ) :
SfxPoolItem( nId )
{
Color aColor;
@@ -1971,7 +1971,7 @@ SvxColorItem::~SvxColorItem()
}
// -----------------------------------------------------------------------
-USHORT SvxColorItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
@@ -1991,7 +1991,7 @@ int SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
// -----------------------------------------------------------------------
-bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= (sal_Int32)(mColor.GetColor());
return true;
@@ -1999,7 +1999,7 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
// -----------------------------------------------------------------------
-bool SvxColorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
sal_Int32 nColor = 0;
if(!(rVal >>= nColor))
@@ -2018,7 +2018,7 @@ SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
{
if( VERSION_USEAUTOCOLOR == nItemVersion &&
COL_AUTO == mColor.GetColor() )
@@ -2030,7 +2030,7 @@ SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, USHORT /*nVer*/ ) const
+SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, sal_uInt16 /*nVer*/ ) const
{
return new SvxColorItem( rStrm, Which() );
}
@@ -2068,7 +2068,7 @@ void SvxColorItem::SetValue( const Color& rNewCol )
// class SvxCharSetColorItem ---------------------------------------------
-SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) :
+SvxCharSetColorItem::SvxCharSetColorItem( const sal_uInt16 nId ) :
SvxColorItem( nId ),
eFrom( RTL_TEXTENCODING_DONTKNOW )
@@ -2079,7 +2079,7 @@ SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) :
SvxCharSetColorItem::SvxCharSetColorItem( const Color& rCol,
const rtl_TextEncoding _eFrom,
- const USHORT nId ) :
+ const sal_uInt16 nId ) :
SvxColorItem( rCol, nId ),
eFrom( _eFrom )
@@ -2096,18 +2096,18 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())
+ rStrm << (sal_uInt8)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())
<< GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE cSet;
+ sal_uInt8 cSet;
Color aColor;
rStrm >> cSet >> aColor;
return new SvxCharSetColorItem( aColor, (rtl_TextEncoding)cSet, Which() );
@@ -2129,7 +2129,7 @@ SfxItemPresentation SvxCharSetColorItem::GetPresentation
// class SvxKerningItem --------------------------------------------------
-SvxKerningItem::SvxKerningItem( const short nKern, const USHORT nId ) :
+SvxKerningItem::SvxKerningItem( const short nKern, const sal_uInt16 nId ) :
SfxInt16Item( nId, nKern )
{
}
@@ -2143,7 +2143,7 @@ SfxPoolItem* SvxKerningItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxKerningItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxKerningItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm << (short) GetValue();
return rStrm;
@@ -2166,7 +2166,7 @@ bool SvxKerningItem::HasMetrics() const
// -----------------------------------------------------------------------
-SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, sal_uInt16) const
{
short nValue;
rStrm >> nValue;
@@ -2195,7 +2195,7 @@ SfxItemPresentation SvxKerningItem::GetPresentation
case SFX_ITEM_PRESENTATION_COMPLETE:
{
rText = EE_RESSTR(RID_SVXITEMS_KERNING_COMPLETE);
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( GetValue() > 0 )
nId = RID_SVXITEMS_KERNING_EXPANDED;
@@ -2213,7 +2213,7 @@ SfxItemPresentation SvxKerningItem::GetPresentation
return SFX_ITEM_PRESENTATION_NONE;
}
-bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxKerningItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Int16 nVal = GetValue();
if(nMemberId & CONVERT_TWIPS)
@@ -2222,7 +2222,7 @@ bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
// -----------------------------------------------------------------------
-bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+bool SvxKerningItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId)
{
sal_Int16 nVal = sal_Int16();
if(!(rVal >>= nVal))
@@ -2235,14 +2235,14 @@ bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
// class SvxCaseMapItem --------------------------------------------------
-SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const USHORT nId ) :
- SfxEnumItem( nId, (USHORT)eMap )
+SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const sal_uInt16 nId ) :
+ SfxEnumItem( nId, (sal_uInt16)eMap )
{
}
// -----------------------------------------------------------------------
-USHORT SvxCaseMapItem::GetValueCount() const
+sal_uInt16 SvxCaseMapItem::GetValueCount() const
{
return SVX_CASEMAP_END; // SVX_CASEMAP_KAPITAELCHEN + 1
}
@@ -2256,17 +2256,17 @@ SfxPoolItem* SvxCaseMapItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxCaseMapItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxCaseMapItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE) GetValue();
+ rStrm << (sal_uInt8) GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE cMap;
+ sal_uInt8 cMap;
rStrm >> cMap;
return new SvxCaseMapItem( (const SvxCaseMap)cMap, Which() );
}
@@ -2297,13 +2297,13 @@ SfxItemPresentation SvxCaseMapItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxCaseMapItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxCaseMapItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos < (USHORT)SVX_CASEMAP_END, "enum overflow!" );
+ DBG_ASSERT( nPos < (sal_uInt16)SVX_CASEMAP_END, "enum overflow!" );
return EE_RESSTR( RID_SVXITEMS_CASEMAP_BEGIN + nPos );
}
-bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvxCaseMapItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
sal_Int16 nRet = style::CaseMap::NONE;
switch( GetValue() )
@@ -2317,7 +2317,7 @@ bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
return true;
}
-bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SvxCaseMapItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
sal_uInt16 nVal = sal_uInt16();
if(!(rVal >>= nVal))
@@ -2337,7 +2337,7 @@ bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
// class SvxEscapementItem -----------------------------------------------
-SvxEscapementItem::SvxEscapementItem( const USHORT nId ) :
+SvxEscapementItem::SvxEscapementItem( const sal_uInt16 nId ) :
SfxEnumItemInterface( nId ),
nEsc ( 0 ),
@@ -2348,7 +2348,7 @@ SvxEscapementItem::SvxEscapementItem( const USHORT nId ) :
// -----------------------------------------------------------------------
SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape,
- const USHORT nId ) :
+ const sal_uInt16 nId ) :
SfxEnumItemInterface( nId ),
nProp( 100 )
{
@@ -2360,8 +2360,8 @@ SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape,
// -----------------------------------------------------------------------
SvxEscapementItem::SvxEscapementItem( const short _nEsc,
- const BYTE _nProp,
- const USHORT nId ) :
+ const sal_uInt8 _nProp,
+ const sal_uInt16 nId ) :
SfxEnumItemInterface( nId ),
nEsc ( _nEsc ),
nProp ( _nProp )
@@ -2387,7 +2387,7 @@ SfxPoolItem* SvxEscapementItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxEscapementItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
short _nEsc = GetEsc();
if( SOFFICE_FILEFORMAT_31 == rStrm.GetVersion() )
@@ -2397,16 +2397,16 @@ SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ )
else if( DFLT_ESC_AUTO_SUB == _nEsc )
_nEsc = DFLT_ESC_SUB;
}
- rStrm << (BYTE) GetProp()
+ rStrm << (sal_uInt8) GetProp()
<< (short) _nEsc;
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE _nProp;
+ sal_uInt8 _nProp;
short _nEsc;
rStrm >> _nProp >> _nEsc;
return new SvxEscapementItem( _nEsc, _nProp, Which() );
@@ -2414,7 +2414,7 @@ SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const
// -----------------------------------------------------------------------
-USHORT SvxEscapementItem::GetValueCount() const
+sal_uInt16 SvxEscapementItem::GetValueCount() const
{
return SVX_ESCAPEMENT_END; // SVX_ESCAPEMENT_SUBSCRIPT + 1
}
@@ -2455,15 +2455,15 @@ SfxItemPresentation SvxEscapementItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxEscapementItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxEscapementItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos < (USHORT)SVX_ESCAPEMENT_END, "enum overflow!" );
+ DBG_ASSERT( nPos < (sal_uInt16)SVX_ESCAPEMENT_END, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_BEGIN + nPos);
}
// -----------------------------------------------------------------------
-USHORT SvxEscapementItem::GetEnumValue() const
+sal_uInt16 SvxEscapementItem::GetEnumValue() const
{
if ( nEsc < 0 )
return SVX_ESCAPEMENT_SUBSCRIPT;
@@ -2474,12 +2474,12 @@ USHORT SvxEscapementItem::GetEnumValue() const
// -----------------------------------------------------------------------
-void SvxEscapementItem::SetEnumValue( USHORT nVal )
+void SvxEscapementItem::SetEnumValue( sal_uInt16 nVal )
{
SetEscapement( (const SvxEscapement)nVal );
}
-bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxEscapementItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -2497,7 +2497,7 @@ bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -2522,7 +2522,7 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
break;
case MID_AUTO_ESC:
{
- BOOL bVal = Any2Bool(rVal);
+ sal_Bool bVal = Any2Bool(rVal);
if(bVal)
{
if(nEsc < 0)
@@ -2543,14 +2543,14 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
// class SvxLanguageItem -------------------------------------------------
-SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const USHORT nId )
+SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const sal_uInt16 nId )
: SfxEnumItem( nId , eLang )
{
}
// -----------------------------------------------------------------------
-USHORT SvxLanguageItem::GetValueCount() const
+sal_uInt16 SvxLanguageItem::GetValueCount() const
{
// #i50205# got rid of class International
DBG_ERRORFILE("SvxLanguageItem::GetValueCount: supposed to return a count of what?");
@@ -2569,17 +2569,17 @@ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxLanguageItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (USHORT) GetValue();
+ rStrm << (sal_uInt16) GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, sal_uInt16) const
{
- USHORT nValue;
+ sal_uInt16 nValue;
rStrm >> nValue;
return new SvxLanguageItem( (LanguageType)nValue, Which() );
}
@@ -2611,7 +2611,7 @@ SfxItemPresentation SvxLanguageItem::GetPresentation
return SFX_ITEM_PRESENTATION_NONE;
}
-bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxLanguageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -2627,7 +2627,7 @@ bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -2658,7 +2658,7 @@ bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
}
// class SvxNoLinebreakItem ----------------------------------------------
-SvxNoLinebreakItem::SvxNoLinebreakItem( const BOOL bBreak, const USHORT nId ) :
+SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const sal_uInt16 nId ) :
SfxBoolItem( nId, bBreak )
{
}
@@ -2672,7 +2672,7 @@ SfxPoolItem* SvxNoLinebreakItem::Clone( SfxItemPool* ) const
// -----------------------------------------------------------------------
-SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm << (sal_Bool)GetValue();
return rStrm;
@@ -2680,7 +2680,7 @@ SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ )
// -----------------------------------------------------------------------
-SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Bool bValue;
rStrm >> bValue;
@@ -2703,7 +2703,7 @@ SfxItemPresentation SvxNoLinebreakItem::GetPresentation
// class SvxNoHyphenItem -------------------------------------------------
-SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const USHORT nId ) :
+SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const sal_uInt16 nId ) :
SfxBoolItem( nId , bHyphen )
{
}
@@ -2717,7 +2717,7 @@ SfxPoolItem* SvxNoHyphenItem::Clone( SfxItemPool* ) const
// -----------------------------------------------------------------------
-SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm << (sal_Bool) GetValue();
return rStrm;
@@ -2725,7 +2725,7 @@ SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) co
// -----------------------------------------------------------------------
-SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, USHORT ) const
+SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Bool bValue;
rStrm >> bValue;
@@ -2755,21 +2755,21 @@ SfxItemPresentation SvxNoHyphenItem::GetPresentation
// class SvxLineColorItem (== SvxColorItem)
// -----------------------------------------------------------------------
-SvxLineColorItem::SvxLineColorItem( const USHORT nId ) :
+SvxLineColorItem::SvxLineColorItem( const sal_uInt16 nId ) :
SvxColorItem( nId )
{
}
// -----------------------------------------------------------------------
-SvxLineColorItem::SvxLineColorItem( const Color& rCol, const USHORT nId ) :
+SvxLineColorItem::SvxLineColorItem( const Color& rCol, const sal_uInt16 nId ) :
SvxColorItem( rCol, nId )
{
}
// -----------------------------------------------------------------------
-SvxLineColorItem::SvxLineColorItem( SvStream &rStrm, const USHORT nId ) :
+SvxLineColorItem::SvxLineColorItem( SvStream &rStrm, const sal_uInt16 nId ) :
SvxColorItem( rStrm, nId )
{
}
@@ -2805,7 +2805,7 @@ SfxItemPresentation SvxLineColorItem::GetPresentation
// class SvxBlinkItem -------------------------------------------------
-SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const USHORT nId ) :
+SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const sal_uInt16 nId ) :
SfxBoolItem( nId, bBlink )
{
}
@@ -2819,17 +2819,17 @@ SfxPoolItem* SvxBlinkItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SvStream& SvxBlinkItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxBlinkItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm << (BYTE) GetValue();
+ rStrm << (sal_uInt8) GetValue();
return rStrm;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, sal_uInt16) const
{
- BYTE nState;
+ sal_uInt8 nState;
rStrm >> nState;
return new SvxBlinkItem( nState, Which() );
}
@@ -2852,7 +2852,7 @@ SfxItemPresentation SvxBlinkItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = RID_SVXITEMS_BLINK_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_BLINK_FALSE;
if ( GetValue() )
nId = RID_SVXITEMS_BLINK_TRUE;
@@ -2867,7 +2867,7 @@ SfxItemPresentation SvxBlinkItem::GetPresentation
// class SvxEmphaisMarkItem ---------------------------------------------------
SvxEmphasisMarkItem::SvxEmphasisMarkItem( const FontEmphasisMark nValue,
- const USHORT nId )
+ const sal_uInt16 nId )
: SfxUInt16Item( nId, nValue )
{
}
@@ -2882,7 +2882,7 @@ SfxPoolItem* SvxEmphasisMarkItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm,
- USHORT /*nItemVersion*/ ) const
+ sal_uInt16 /*nItemVersion*/ ) const
{
rStrm << (sal_uInt16)GetValue();
return rStrm;
@@ -2890,7 +2890,7 @@ SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm,
// -----------------------------------------------------------------------
-SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, USHORT ) const
+SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nValue;
rStrm >> nValue;
@@ -2919,7 +2919,7 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation
sal_uInt16 nVal = GetValue();
rText = EE_RESSTR( RID_SVXITEMS_EMPHASIS_BEGIN_STYLE +
( EMPHASISMARK_STYLE & nVal ));
- USHORT nId = ( EMPHASISMARK_POS_ABOVE & nVal )
+ sal_uInt16 nId = ( EMPHASISMARK_POS_ABOVE & nVal )
? RID_SVXITEMS_EMPHASIS_ABOVE_POS
: ( EMPHASISMARK_POS_BELOW & nVal )
? RID_SVXITEMS_EMPHASIS_BELOW_POS
@@ -2935,7 +2935,7 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation
// -----------------------------------------------------------------------
-bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
@@ -2961,7 +2961,7 @@ bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = true;
@@ -2991,7 +2991,7 @@ bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
return bRet;
}
-USHORT SvxEmphasisMarkItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxEmphasisMarkItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
@@ -3039,7 +3039,7 @@ SfxPoolItem* SvxTwoLinesItem::Clone( SfxItemPool* ) const
}
bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const
+ sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = true;
@@ -3072,7 +3072,7 @@ bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal,
}
bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+ sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_False;
@@ -3131,7 +3131,7 @@ SfxItemPresentation SvxTwoLinesItem::GetPresentation( SfxItemPresentation ePres,
}
-SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, USHORT /*nVer*/) const
+SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/) const
{
sal_Bool _bOn;
sal_Unicode cStart, cEnd;
@@ -3139,13 +3139,13 @@ SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, USHORT /*nVer*/) const
return new SvxTwoLinesItem( _bOn, cStart, cEnd, Which() );
}
-SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, USHORT /*nIVer*/) const
+SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const
{
rStrm << GetValue() << GetStartBracket() << GetEndBracket();
return rStrm;
}
-USHORT SvxTwoLinesItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxTwoLinesItem::GetVersion( sal_uInt16 nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
@@ -3172,7 +3172,7 @@ SfxPoolItem* SvxCharRotateItem::Clone( SfxItemPool* ) const
return new SvxCharRotateItem( GetValue(), IsFitToLine(), Which() );
}
-SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, USHORT ) const
+SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nVal;
sal_Bool b;
@@ -3180,14 +3180,14 @@ SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, USHORT ) const
return new SvxCharRotateItem( nVal, b, Which() );
}
-SvStream& SvxCharRotateItem::Store( SvStream & rStrm, USHORT ) const
+SvStream& SvxCharRotateItem::Store( SvStream & rStrm, sal_uInt16 ) const
{
sal_Bool bFlag = IsFitToLine();
rStrm << GetValue() << bFlag;
return rStrm;
}
-USHORT SvxCharRotateItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxCharRotateItem::GetVersion( sal_uInt16 nFFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
}
@@ -3223,7 +3223,7 @@ SfxItemPresentation SvxCharRotateItem::GetPresentation(
}
bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const
+ sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
@@ -3243,7 +3243,7 @@ bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal,
}
bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+ sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
@@ -3253,7 +3253,7 @@ bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal,
{
sal_Int16 nVal = 0;
if((rVal >>= nVal) && (0 == nVal || 900 == nVal || 2700 == nVal))
- SetValue( (USHORT)nVal );
+ SetValue( (sal_uInt16)nVal );
else
bRet = sal_False;
break;
@@ -3291,7 +3291,7 @@ SfxPoolItem* SvxCharScaleWidthItem::Clone( SfxItemPool* ) const
return new SvxCharScaleWidthItem( GetValue(), Which() );
}
-SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const
+SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nVal;
rStrm >> nVal;
@@ -3303,7 +3303,7 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const
// USHORT nFixWidth, USHORT nPropWidth.
// nFixWidth has never been used...
rStrm >> nVal;
- USHORT nTest;
+ sal_uInt16 nTest;
rStrm >> nTest;
if ( nTest == 0x1234 )
pItem->SetValue( nVal );
@@ -3314,23 +3314,23 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const
return pItem;
}
-SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, USHORT nVer ) const
+SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, sal_uInt16 nVer ) const
{
SvStream& rRet = SfxUInt16Item::Store( rStream, nVer );
if ( Which() == EE_CHAR_FONTWIDTH )
{
// see comment in Create()....
- rRet.SeekRel( -1*(long)sizeof(USHORT) );
- rRet << (USHORT)0;
+ rRet.SeekRel( -1*(long)sizeof(sal_uInt16) );
+ rRet << (sal_uInt16)0;
rRet << GetValue();
// Really ugly, but not a problem for reading the doc in 5.2
- rRet << (USHORT)0x1234;
+ rRet << (sal_uInt16)0x1234;
}
return rRet;
}
-USHORT SvxCharScaleWidthItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxCharScaleWidthItem::GetVersion( sal_uInt16 nFFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
}
@@ -3363,22 +3363,22 @@ SfxItemPresentation SvxCharScaleWidthItem::GetPresentation(
return SFX_ITEM_PRESENTATION_NONE;
}
-bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
sal_Int16 nValue = sal_Int16();
if (rVal >>= nValue)
{
- SetValue( (UINT16) nValue );
+ SetValue( (sal_uInt16) nValue );
return true;
}
- OSL_FAIL( "SvxCharScaleWidthItem::PutValue - Wrong type!" );
+ OSL_TRACE( "SvxCharScaleWidthItem::PutValue - Wrong type!" );
return false;
}
-bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
@@ -3392,7 +3392,7 @@ bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) con
SvxCharReliefItem::SvxCharReliefItem( FontRelief eValue,
const sal_uInt16 nId )
- : SfxEnumItem( nId, (USHORT)eValue )
+ : SfxEnumItem( nId, (sal_uInt16)eValue )
{
}
@@ -3401,33 +3401,33 @@ SfxPoolItem* SvxCharReliefItem::Clone( SfxItemPool * ) const
return new SvxCharReliefItem( *this );
}
-SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, USHORT) const
+SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_uInt16 nVal;
rStrm >> nVal;
return new SvxCharReliefItem( (FontRelief)nVal, Which() );
}
-SvStream& SvxCharReliefItem::Store(SvStream & rStrm, USHORT /*nIVer*/) const
+SvStream& SvxCharReliefItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const
{
sal_uInt16 nVal = GetValue();
rStrm << nVal;
return rStrm;
}
-USHORT SvxCharReliefItem::GetVersion( USHORT nFFVer ) const
+sal_uInt16 SvxCharReliefItem::GetVersion( sal_uInt16 nFFVer ) const
{
return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
}
-String SvxCharReliefItem::GetValueTextByPos( USHORT nPos ) const
+String SvxCharReliefItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
DBG_ASSERT( RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE,
"enum overflow" );
return String( EditResId( RID_SVXITEMS_RELIEF_BEGIN + nPos ));
}
-USHORT SvxCharReliefItem::GetValueCount() const
+sal_uInt16 SvxCharReliefItem::GetValueCount() const
{
return RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE;
}
@@ -3459,7 +3459,7 @@ SfxItemPresentation SvxCharReliefItem::GetPresentation
}
bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+ sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
@@ -3470,7 +3470,7 @@ bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal,
sal_Int16 nVal = -1;
rVal >>= nVal;
if(nVal >= 0 && nVal <= RELIEF_ENGRAVED)
- SetValue( (USHORT)nVal );
+ SetValue( (sal_uInt16)nVal );
else
bRet = false;
}
@@ -3483,7 +3483,7 @@ bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal,
}
bool SvxCharReliefItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const
+ sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
@@ -3516,14 +3516,14 @@ SfxPoolItem* SvxScriptTypeItem::Clone( SfxItemPool * ) const
|* class SvxScriptSetItem
*************************************************************************/
-SvxScriptSetItem::SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool )
+SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool )
: SfxSetItem( nSlotId, new SfxItemSet( rPool,
SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT ))
{
- USHORT nLatin, nAsian, nComplex;
+ sal_uInt16 nLatin, nAsian, nComplex;
GetWhichIds( nLatin, nAsian, nComplex );
- USHORT aIds[ 9 ] = { 0 };
+ sal_uInt16 aIds[ 9 ] = { 0 };
aIds[ 0 ] = aIds[ 1 ] = nLatin;
aIds[ 2 ] = aIds[ 3 ] = nAsian;
aIds[ 4 ] = aIds[ 5 ] = nComplex;
@@ -3536,28 +3536,28 @@ SvxScriptSetItem::SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool )
SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool * ) const
{
SvxScriptSetItem* p = new SvxScriptSetItem( Which(), *GetItemSet().GetPool() );
- p->GetItemSet().Put( GetItemSet(), FALSE );
+ p->GetItemSet().Put( GetItemSet(), sal_False );
return p;
}
-SfxPoolItem* SvxScriptSetItem::Create( SvStream &, USHORT ) const
+SfxPoolItem* SvxScriptSetItem::Create( SvStream &, sal_uInt16 ) const
{
return 0;
}
const SfxPoolItem* SvxScriptSetItem::GetItemOfScriptSet(
- const SfxItemSet& rSet, USHORT nId )
+ const SfxItemSet& rSet, sal_uInt16 nId )
{
const SfxPoolItem* pI;
- SfxItemState eSt = rSet.GetItemState( nId, FALSE, &pI );
+ SfxItemState eSt = rSet.GetItemState( nId, sal_False, &pI );
if( SFX_ITEM_SET != eSt )
pI = SFX_ITEM_DEFAULT == eSt ? &rSet.Get( nId ) : 0;
return pI;
}
-const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript )
+const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript )
{
- USHORT nLatin, nAsian, nComplex;
+ sal_uInt16 nLatin, nAsian, nComplex;
GetWhichIds( nSlotId, rSet, nLatin, nAsian, nComplex );
const SfxPoolItem *pRet, *pAsn, *pCmplx;
@@ -3606,15 +3606,15 @@ const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nSlotId, const SfxI
return pRet;
}
-const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nScript ) const
+const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( sal_uInt16 nScript ) const
{
return GetItemOfScript( Which(), GetItemSet(), nScript );
}
-void SvxScriptSetItem::PutItemForScriptType( USHORT nScriptType,
+void SvxScriptSetItem::PutItemForScriptType( sal_uInt16 nScriptType,
const SfxPoolItem& rItem )
{
- USHORT nLatin, nAsian, nComplex;
+ sal_uInt16 nLatin, nAsian, nComplex;
GetWhichIds( nLatin, nAsian, nComplex );
SfxPoolItem* pCpy = rItem.Clone();
@@ -3636,7 +3636,7 @@ void SvxScriptSetItem::PutItemForScriptType( USHORT nScriptType,
delete pCpy;
}
-void SvxScriptSetItem::GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex )
+void SvxScriptSetItem::GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex )
{
const SfxItemPool& rPool = *rSet.GetPool();
GetSlotIds( nSlotId, rLatin, rAsian, rComplex );
@@ -3645,19 +3645,19 @@ void SvxScriptSetItem::GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHO
rComplex = rPool.GetWhich( rComplex );
}
-void SvxScriptSetItem::GetWhichIds( USHORT& rLatin, USHORT& rAsian,
- USHORT& rComplex ) const
+void SvxScriptSetItem::GetWhichIds( sal_uInt16& rLatin, sal_uInt16& rAsian,
+ sal_uInt16& rComplex ) const
{
GetWhichIds( Which(), GetItemSet(), rLatin, rAsian, rComplex );
}
-void SvxScriptSetItem::GetSlotIds( USHORT nSlotId, USHORT& rLatin,
- USHORT& rAsian, USHORT& rComplex )
+void SvxScriptSetItem::GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin,
+ sal_uInt16& rAsian, sal_uInt16& rComplex )
{
switch( nSlotId )
{
default:
- DBG_ASSERT( FALSE, "wrong SlotId for class SvxScriptSetItem" );
+ DBG_ASSERT( sal_False, "wrong SlotId for class SvxScriptSetItem" );
// no break - default to font - Id Range !!
case SID_ATTR_CHAR_FONT:
@@ -3690,12 +3690,12 @@ void SvxScriptSetItem::GetSlotIds( USHORT nSlotId, USHORT& rLatin,
void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rComplex )
{
- const USHORT nItemCnt = 3;
+ const sal_uInt16 nItemCnt = 3;
static struct
{
- USHORT nFontType;
- USHORT nLanguage;
+ sal_uInt16 nFontType;
+ sal_uInt16 nLanguage;
}
aOutTypeArr[ nItemCnt ] =
{
@@ -3706,7 +3706,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
SvxFontItem* aItemArr[ nItemCnt ] = { &rLatin, &rAsian, &rComplex };
- for ( USHORT n = 0; n < nItemCnt; ++n )
+ for ( sal_uInt16 n = 0; n < nItemCnt; ++n )
{
Font aFont( OutputDevice::GetDefaultFont( aOutTypeArr[ n ].nFontType,
aOutTypeArr[ n ].nLanguage,
@@ -3721,12 +3721,12 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
}
-USHORT GetI18NScriptTypeOfLanguage( USHORT nLang )
+sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang )
{
return GetI18NScriptType( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) );
}
-USHORT GetItemScriptType( short nI18NType )
+sal_uInt16 GetItemScriptType( short nI18NType )
{
switch ( nI18NType )
{
@@ -3737,7 +3737,7 @@ USHORT GetItemScriptType( short nI18NType )
return 0;
}
-short GetI18NScriptType( USHORT nItemType )
+short GetI18NScriptType( sal_uInt16 nItemType )
{
switch ( nItemType )
{
diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx
index 0d5c6fe73b..549d1213e3 100644
--- a/editeng/source/items/writingmodeitem.cxx
+++ b/editeng/source/items/writingmodeitem.cxx
@@ -42,7 +42,7 @@ using namespace ::com::sun::star::text;
TYPEINIT1_FACTORY(SvxWritingModeItem, SfxUInt16Item, new SvxWritingModeItem(com::sun::star::text::WritingMode_LR_TB, 0));
-SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, USHORT _nWhich )
+SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, sal_uInt16 _nWhich )
: SfxUInt16Item( _nWhich, (sal_uInt16)eValue )
{
}
@@ -63,19 +63,19 @@ SfxPoolItem* SvxWritingModeItem::Clone( SfxItemPool * ) const
return new SvxWritingModeItem( *this );
}
-SfxPoolItem* SvxWritingModeItem::Create( SvStream & , USHORT ) const
+SfxPoolItem* SvxWritingModeItem::Create( SvStream & , sal_uInt16 ) const
{
OSL_FAIL("SvxWritingModeItem should not be streamed!");
return NULL;
}
-SvStream& SvxWritingModeItem::Store( SvStream & rStrm, USHORT ) const
+SvStream& SvxWritingModeItem::Store( SvStream & rStrm, sal_uInt16 ) const
{
OSL_FAIL("SvxWritingModeItem should not be streamed!");
return rStrm;
}
-USHORT SvxWritingModeItem::GetVersion( USHORT /*nFVer*/ ) const
+sal_uInt16 SvxWritingModeItem::GetVersion( sal_uInt16 /*nFVer*/ ) const
{
return USHRT_MAX;
}
@@ -104,7 +104,7 @@ SfxItemPresentation SvxWritingModeItem::GetPresentation( SfxItemPresentation ePr
return eRet;
}
-bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
sal_Int32 nVal = 0;
bool bRet = ( rVal >>= nVal );
@@ -140,7 +140,7 @@ bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
}
bool SvxWritingModeItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE ) const
+ sal_uInt8 ) const
{
rVal <<= (WritingMode)GetValue();
return true;
diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx
index 06f1a9e462..27aa04a063 100644
--- a/editeng/source/items/xmlcnitm.cxx
+++ b/editeng/source/items/xmlcnitm.cxx
@@ -42,7 +42,7 @@ using namespace ::com::sun::star::xml;
TYPEINIT1(SvXMLAttrContainerItem, SfxPoolItem);
-SvXMLAttrContainerItem::SvXMLAttrContainerItem( USHORT _nWhich ) :
+SvXMLAttrContainerItem::SvXMLAttrContainerItem( sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich )
{
pImpl = new SvXMLAttrContainerData;
@@ -84,13 +84,13 @@ SfxItemPresentation SvXMLAttrContainerItem::GetPresentation(
return SFX_ITEM_PRESENTATION_NONE;
}
-USHORT SvXMLAttrContainerItem::GetVersion( USHORT /*nFileFormatVersion*/ ) const
+sal_uInt16 SvXMLAttrContainerItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/ ) const
{
// This item should never be stored
return USHRT_MAX;
}
-bool SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
Reference<XNameContainer> xContainer =
new SvUnoAttributeContainer( new SvXMLAttrContainerData( *pImpl ) );
@@ -99,7 +99,7 @@ bool SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /
return true;
}
-bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
Reference<XInterface> xRef;
SvUnoAttributeContainer* pContainer = NULL;
@@ -109,7 +109,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT
xRef = *(Reference<XInterface>*)rVal.getValue();
Reference<XUnoTunnel> xTunnel(xRef, UNO_QUERY);
if( xTunnel.is() )
- pContainer = (SvUnoAttributeContainer*)(ULONG)xTunnel->getSomething(SvUnoAttributeContainer::getUnoTunnelId());
+ pContainer = (SvUnoAttributeContainer*)(sal_uLong)xTunnel->getSomething(SvUnoAttributeContainer::getUnoTunnelId());
}
if( pContainer )
@@ -125,14 +125,14 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT
{
Reference<XNameContainer> xContainer( xRef, UNO_QUERY );
if( !xContainer.is() )
- return FALSE;
+ return sal_False;
const Sequence< ::rtl::OUString > aNameSequence( xContainer->getElementNames() );
const ::rtl::OUString* pNames = aNameSequence.getConstArray();
- const INT32 nCount = aNameSequence.getLength();
+ const sal_Int32 nCount = aNameSequence.getLength();
Any aAny;
AttributeData* pData;
- INT32 nAttr;
+ sal_Int32 nAttr;
for( nAttr = 0; nAttr < nCount; nAttr++ )
{
@@ -140,7 +140,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT
aAny = xContainer->getByName( aName );
if( aAny.getValue() == NULL || aAny.getValueType() != ::getCppuType((AttributeData*)0) )
- return FALSE;
+ return sal_False;
pData = (AttributeData*)aAny.getValue();
sal_Int32 pos = aName.indexOf( sal_Unicode(':') );
@@ -188,61 +188,61 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT
}
-BOOL SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rLName,
+sal_Bool SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rLName,
const ::rtl::OUString& rValue )
{
return pImpl->AddAttr( rLName, rValue );
}
-BOOL SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rPrefix,
+sal_Bool SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rPrefix,
const ::rtl::OUString& rNamespace, const ::rtl::OUString& rLName,
const ::rtl::OUString& rValue )
{
return pImpl->AddAttr( rPrefix, rNamespace, rLName, rValue );
}
-USHORT SvXMLAttrContainerItem::GetAttrCount() const
+sal_uInt16 SvXMLAttrContainerItem::GetAttrCount() const
{
- return (USHORT)pImpl->GetAttrCount();
+ return (sal_uInt16)pImpl->GetAttrCount();
}
-::rtl::OUString SvXMLAttrContainerItem::GetAttrNamespace( USHORT i ) const
+::rtl::OUString SvXMLAttrContainerItem::GetAttrNamespace( sal_uInt16 i ) const
{
return pImpl->GetAttrNamespace( i );
}
-::rtl::OUString SvXMLAttrContainerItem::GetAttrPrefix( USHORT i ) const
+::rtl::OUString SvXMLAttrContainerItem::GetAttrPrefix( sal_uInt16 i ) const
{
return pImpl->GetAttrPrefix( i );
}
-const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrLName( USHORT i ) const
+const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrLName( sal_uInt16 i ) const
{
return pImpl->GetAttrLName( i );
}
-const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrValue( USHORT i ) const
+const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrValue( sal_uInt16 i ) const
{
return pImpl->GetAttrValue( i );
}
-USHORT SvXMLAttrContainerItem::GetFirstNamespaceIndex() const
+sal_uInt16 SvXMLAttrContainerItem::GetFirstNamespaceIndex() const
{
return pImpl->GetFirstNamespaceIndex();
}
-USHORT SvXMLAttrContainerItem::GetNextNamespaceIndex( USHORT nIdx ) const
+sal_uInt16 SvXMLAttrContainerItem::GetNextNamespaceIndex( sal_uInt16 nIdx ) const
{
return pImpl->GetNextNamespaceIndex( nIdx );
}
-const ::rtl::OUString& SvXMLAttrContainerItem::GetNamespace( USHORT i ) const
+const ::rtl::OUString& SvXMLAttrContainerItem::GetNamespace( sal_uInt16 i ) const
{
return pImpl->GetNamespace( i );
}
-const ::rtl::OUString& SvXMLAttrContainerItem::GetPrefix( USHORT i ) const
+const ::rtl::OUString& SvXMLAttrContainerItem::GetPrefix( sal_uInt16 i ) const
{
return pImpl->GetPrefix( i );
}
diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.cxx b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
index 0c5bd94f16..0c5bd94f16 100644..100755
--- a/editeng/source/misc/SvXMLAutoCorrectExport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.hxx b/editeng/source/misc/SvXMLAutoCorrectExport.hxx
index 68e7ce41f2..68e7ce41f2 100644..100755
--- a/editeng/source/misc/SvXMLAutoCorrectExport.hxx
+++ b/editeng/source/misc/SvXMLAutoCorrectExport.hxx
diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
index d5b5fd045b..c70bb3ce53 100644
--- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
@@ -140,7 +140,7 @@ SvXMLWordContext::SvXMLWordContext(
if (!sWrong.Len() || !sRight.Len() )
return;
- BOOL bOnlyTxt = sRight != sWrong;
+ sal_Bool bOnlyTxt = sRight != sWrong;
if( !bOnlyTxt )
{
String sLongSave( sRight );
@@ -148,7 +148,7 @@ SvXMLWordContext::SvXMLWordContext(
sLongSave.Len() )
{
sRight = sLongSave;
- bOnlyTxt = TRUE;
+ bOnlyTxt = sal_True;
}
}
SvxAutocorrWordPtr pNew = new SvxAutocorrWord( sWrong, sRight, bOnlyTxt );
diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.hxx b/editeng/source/misc/SvXMLAutoCorrectImport.hxx
index 67cd30f036..67cd30f036 100644..100755
--- a/editeng/source/misc/SvXMLAutoCorrectImport.hxx
+++ b/editeng/source/misc/SvXMLAutoCorrectImport.hxx
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index d1feda9fd0..f16dbdba1b 100644..100755
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -51,18 +51,18 @@ static SvxAutoCorrCfg* pAutoCorrCfg = 0;
SvxAutoCorrCfg::SvxAutoCorrCfg() :
aBaseConfig(*this),
aSwConfig(*this),
- bFileRel(TRUE),
- bNetRel(TRUE),
- bAutoTextTip(TRUE),
- bAutoTextPreview(FALSE),
- bAutoFmtByInput(TRUE),
- bSearchInAllCategories(FALSE)
+ bFileRel(sal_True),
+ bNetRel(sal_True),
+ bAutoTextTip(sal_True),
+ bAutoTextPreview(sal_False),
+ bAutoFmtByInput(sal_True),
+ bSearchInAllCategories(sal_False)
{
SvtPathOptions aPathOpt;
String sSharePath, sUserPath, sAutoPath( aPathOpt.GetAutoCorrectPath() );
String* pS = &sSharePath;
- for( USHORT n = 0; n < 2; ++n, pS = &sUserPath )
+ for( sal_uInt16 n = 0; n < 2; ++n, pS = &sUserPath )
{
*pS = sAutoPath.GetToken( n, ';' );
INetURLObject aPath( *pS );
@@ -223,8 +223,8 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit)
}
}
if( nFlags )
- rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, TRUE );
- rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), FALSE );
+ rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, sal_True );
+ rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), sal_False );
}
}
@@ -247,7 +247,7 @@ void SvxBaseAutoCorrCfg::Commit()
Any* pValues = aValues.getArray();
const Type& rType = ::getBooleanCppuType();
- BOOL bVal;
+ sal_Bool bVal;
const long nFlags = rParent.pAutoCorrect->GetFlags();
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
@@ -461,7 +461,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit)
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nRightMargin =
- sal::static_int_cast< BYTE >(nVal);
+ sal::static_int_cast< sal_uInt8 >(nVal);
}
break; // "Format/Option/CombineValue",
case 23: rSwFlags.bAFmtDelSpacesAtSttEnd = *(sal_Bool*)pValues[nProp].getValue(); break; // "Format/Option/DelSpacesAtStartEnd",
@@ -479,14 +479,14 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit)
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nAutoCmpltWordLen =
- sal::static_int_cast< USHORT >(nVal);
+ sal::static_int_cast< sal_uInt16 >(nVal);
}
break; // "Completion/MinWordLen",
case 35:
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nAutoCmpltListLen =
- sal::static_int_cast< USHORT >(nVal);
+ sal::static_int_cast< sal_uInt16 >(nVal);
}
break; // "Completion/MaxListLen",
case 36: rSwFlags.bAutoCmpltCollectWords = *(sal_Bool*)pValues[nProp].getValue(); break; // "Completion/CollectWords",
@@ -497,7 +497,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit)
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nAutoCmpltExpandKey =
- sal::static_int_cast< USHORT >(nVal);
+ sal::static_int_cast< sal_uInt16 >(nVal);
}
break; // "Completion/AcceptKey"
case 41 :rSwFlags.bAutoCmpltKeepList = *(sal_Bool*)pValues[nProp].getValue(); break;//"Completion/KeepList"
@@ -556,7 +556,7 @@ void SvxSwAutoCorrCfg::Commit()
Any* pValues = aValues.getArray();
const Type& rType = ::getBooleanCppuType();
- BOOL bVal;
+ sal_Bool bVal;
SvxSwAutoFmtFlags& rSwFlags = rParent.pAutoCorrect->GetSwFlags();
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
diff --git a/editeng/source/misc/edtdlg.cxx b/editeng/source/misc/edtdlg.cxx
index 5ac52a556a..5ac52a556a 100644..100755
--- a/editeng/source/misc/edtdlg.cxx
+++ b/editeng/source/misc/edtdlg.cxx
diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx
index 6a57ef606a..74d3f7a7a5 100644..100755
--- a/editeng/source/misc/forbiddencharacterstable.cxx
+++ b/editeng/source/misc/forbiddencharacterstable.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize, USHORT nGrow )
+SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize, sal_uInt16 nGrow )
: SvxForbiddenCharactersTableImpl( nISize, nGrow )
{
mxMSF = xMSF;
@@ -45,13 +45,13 @@ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno:
SvxForbiddenCharactersTable::~SvxForbiddenCharactersTable()
{
- for ( ULONG n = Count(); n; )
+ for ( sal_uLong n = Count(); n; )
delete GetObject( --n );
}
-const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( USHORT nLanguage, BOOL bGetDefault ) const
+const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) const
{
ForbiddenCharactersInfo* pInf = Get( nLanguage );
if ( !pInf && bGetDefault && mxMSF.is() )
@@ -61,7 +61,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge
pInf = new ForbiddenCharactersInfo;
pImpl->Insert( nLanguage, pInf );
- pInf->bTemporary = TRUE;
+ pInf->bTemporary = sal_True;
LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) );
pInf->aForbiddenChars = aWrapper.getForbiddenCharacters();
}
@@ -70,7 +70,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge
-void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars )
+void SvxForbiddenCharactersTable::SetForbiddenCharacters( sal_uInt16 nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars )
{
ForbiddenCharactersInfo* pInf = Get( nLanguage );
if ( !pInf )
@@ -78,11 +78,11 @@ void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, cons
pInf = new ForbiddenCharactersInfo;
Insert( nLanguage, pInf );
}
- pInf->bTemporary = FALSE;
+ pInf->bTemporary = sal_False;
pInf->aForbiddenChars = rForbiddenChars;
}
-void SvxForbiddenCharactersTable::ClearForbiddenCharacters( USHORT nLanguage )
+void SvxForbiddenCharactersTable::ClearForbiddenCharacters( sal_uInt16 nLanguage )
{
ForbiddenCharactersInfo* pInf = Get( nLanguage );
if ( pInf )
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 605979d25f..ba94e00ce6 100644..100755
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -633,7 +633,7 @@ namespace editeng
// determine if it's Hangul
CharClass aCharClassificaton( m_xORB, m_aSourceLocale );
- sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< USHORT >(nNextAsianScript) );
+ sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< sal_uInt16 >(nNextAsianScript) );
if ( ( UnicodeScript_kHangulJamo == nScript )
|| ( UnicodeScript_kHangulCompatibilityJamo == nScript )
|| ( UnicodeScript_kHangulSyllable == nScript )
diff --git a/editeng/source/misc/lingu.src b/editeng/source/misc/lingu.src
index ad65e169e4..ad65e169e4 100644..100755
--- a/editeng/source/misc/lingu.src
+++ b/editeng/source/misc/lingu.src
diff --git a/editeng/source/misc/makefile.mk b/editeng/source/misc/makefile.mk
deleted file mode 100644
index 0b4dbbecf2..0000000000
--- a/editeng/source/misc/makefile.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# 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=editeng
-TARGET=misc
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- General ----------------------------------------------------------
-
-.IF "$(editdebug)" != "" || "$(EDITDEBUG)" != ""
-CDEFS+=-DEDITDEBUG
-.ENDIF
-
-SLOFILES = \
- $(SLO)$/edtdlg.obj \
- $(SLO)$/unolingu.obj \
- $(SLO)$/acorrcfg.obj \
- $(SLO)$/forbiddencharacterstable.obj \
- $(SLO)$/hangulhanja.obj \
- $(SLO)$/splwrap.obj \
- $(SLO)$/svxacorr.obj \
- $(SLO)$/SvXMLAutoCorrectExport.obj \
- $(SLO)$/SvXMLAutoCorrectImport.obj \
- $(SLO)$/swafopt.obj \
- $(SLO)$/txtrange.obj
-
-SRS1NAME=misc
-SRC1FILES = \
- lingu.src
-
-.INCLUDE : target.mk
-
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index f568b2096d..3e5a4db514 100644..100755
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -104,7 +104,7 @@ struct lt_LanguageType
}
};
-typedef std::map< LanguageType, USHORT, lt_LanguageType > LangCheckState_map_t;
+typedef std::map< LanguageType, sal_uInt16, lt_LanguageType > LangCheckState_map_t;
static LangCheckState_map_t & GetLangCheckState()
{
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index b0c8e0fc7d..a73452059b 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -141,7 +141,7 @@ inline int IsUpperLetter( sal_Int32 nCharType )
0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType);
}
-BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
+sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
xub_StrLen nStt, xub_StrLen nEnd )
{
for( ; nStt < nEnd; ++nStt )
@@ -154,19 +154,19 @@ BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
#endif
if( ::com::sun::star::i18n::UnicodeType::PRIVATE_USE ==
rCC.getType( rTxt, nStt ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-static BOOL lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c )
+static sal_Bool lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( ; *pArr; ++pArr )
if( *pArr == c )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
@@ -180,12 +180,12 @@ SvxAutoCorrDoc::~SvxAutoCorrDoc()
// - FnCptlSttSntnc
// after the exchange of characters. then the words can maybe be inserted
// into the exception list.
-void SvxAutoCorrDoc::SaveCpltSttWord( ULONG, xub_StrLen, const String&,
+void SvxAutoCorrDoc::SaveCpltSttWord( sal_uLong, xub_StrLen, const String&,
sal_Unicode )
{
}
-LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , BOOL ) const
+LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , sal_Bool ) const
{
return LANGUAGE_SYSTEM;
}
@@ -199,11 +199,11 @@ static ::com::sun::star::uno::Reference<
return xMSF;
}
-static USHORT GetAppLang()
+static sal_uInt16 GetAppLang()
{
return Application::GetSettings().GetLanguage();
}
-static LocaleDataWrapper& GetLocaleDataWrapper( USHORT nLang )
+static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang )
{
static LocaleDataWrapper aLclDtWrp( GetProcessFact(),
SvxCreateLocale( GetAppLang() ) );
@@ -241,21 +241,21 @@ static CollatorWrapper& GetCollatorWrapper()
}
-void SvxAutocorrWordList::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvxAutocorrWordList::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((SvxAutocorrWordPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) const
+sal_Bool SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvxAutocorrWordList_SAR::Count(),
+ register sal_uInt16 nO = SvxAutocorrWordList_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -270,21 +270,21 @@ BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP )
if( 0 == nCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( 0 < nCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
void lcl_ClearTable(SvxAutoCorrLanguageTable_Impl& rLangTable)
@@ -395,7 +395,7 @@ void SvxAutoCorrect::_GetCharClass( LanguageType eLang )
eCharClassLang = eLang;
}
-void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn )
+void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, sal_Bool bOn )
{
long nOld = nFlags;
nFlags = bOn ? nFlags | nFlag
@@ -414,11 +414,11 @@ void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn )
// Two capital letters at the beginning of word?
-BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
CharClass& rCC = GetCharClass( eLang );
// Delete all non alphanumeric. Test the characters at the beginning/end of
@@ -459,7 +459,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
{
if( SaveWordWrdSttLst & nFlags )
rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -468,7 +468,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
}
-BOOL SvxAutoCorrect::FnChgOrdinalNumber(
+sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
@@ -477,7 +477,7 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber(
// 201th or 201st
// 12th or 12nd
CharClass& rCC = GetCharClass( eLang );
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
for( ; nSttPos < nEndPos; ++nSttPos )
if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nSttPos ) ))
@@ -536,12 +536,12 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber(
}
-BOOL SvxAutoCorrect::FnChgToEnEmDash(
+sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
CharClass& rCC = GetCharClass( eLang );
if (eLang == LANGUAGE_SYSTEM)
eLang = GetAppLang();
@@ -574,7 +574,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash(
{
rDoc.Delete( nSttPos, nSttPos + 2 );
rDoc.Insert( nSttPos, bAlwaysUseEmDash ? cEmDash : cEnDash );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -609,7 +609,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash(
{
rDoc.Delete( nTmpPos, nTmpPos + nLen );
rDoc.Insert( nTmpPos, bAlwaysUseEmDash ? cEmDash : cEnDash );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -633,13 +633,13 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash(
nSttPos = nSttPos + nFndPos;
rDoc.Delete( nSttPos, nSttPos + 2 );
rDoc.Insert( nSttPos, (bEnDash ? cEnDash : cEmDash) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SvxAutoCorrect::FnAddNonBrkSpace(
+sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen, xub_StrLen nEndPos,
LanguageType eLang )
@@ -669,7 +669,7 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace(
;
if(INetURLObject::CompareProtocolScheme(rTxt.Copy(nSttWdPos + (bWasWordDelim ? 1 : 0), nEndPos - nSttWdPos + 1)) != INET_PROT_NOT_VALID) {
- return FALSE;
+ return sal_False;
}
@@ -720,20 +720,20 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace(
return bRet;
}
-BOOL SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
String sURL( URIHelper::FindFirstURLInText( rTxt, nSttPos, nEndPos,
GetCharClass( eLang ) ));
- BOOL bRet = 0 != sURL.Len();
+ sal_Bool bRet = 0 != sURL.Len();
if( bRet ) // also Attribut setzen:
rDoc.SetINetAttr( nSttPos, nEndPos, sURL );
return bRet;
}
-BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -744,11 +744,11 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt
sal_Unicode c, cInsChar = rTxt.GetChar( nEndPos ); // underline or bold
if( ++nEndPos != rTxt.Len() &&
!IsWordDelim( rTxt.GetChar( nEndPos ) ) )
- return FALSE;
+ return sal_False;
--nEndPos;
- BOOL bAlphaNum = FALSE;
+ sal_Bool bAlphaNum = sal_False;
xub_StrLen nPos = nEndPos, nFndPos = STRING_NOTFOUND;
CharClass& rCC = GetCharClass( eLang );
@@ -802,14 +802,14 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt
}
-BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
- const String& rTxt, BOOL bNormalPos,
+sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
+ const String& rTxt, sal_Bool bNormalPos,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
if( !rTxt.Len() || nEndPos <= nSttPos )
- return FALSE;
+ return sal_False;
CharClass& rCC = GetCharClass( eLang );
String aText( rTxt );
@@ -818,7 +818,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
*pWordStt = 0,
*pDelim = 0;
- BOOL bAtStart = FALSE;
+ sal_Bool bAtStart = sal_False;
do {
--pStr;
if( rCC.isLetter(
@@ -855,11 +855,11 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
sal::static_int_cast< xub_StrLen >( pWordStt - pStart ) ) ) ||
INetURLObject::CompareProtocolScheme(rTxt.Copy(pWordStt - pStart, pDelim - pWordStt + 1)) != INET_PROT_NOT_VALID ||
0x1 == *pWordStt || 0x2 == *pWordStt )
- return FALSE; // no character to be replaced, or already ok
+ return sal_False; // no character to be replaced, or already ok
if( *pDelim && 2 >= pDelim - pWordStt &&
lcl_IsInAsciiArr( ".-)>", *pDelim ) )
- return FALSE;
+ return sal_False;
if( !bAtStart ) // Still no beginning of a paragraph?
{
@@ -872,7 +872,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
// and full width question marks are treated as word delimiters
else if ( 0x3002 != *pStr && 0xFF0E != *pStr && 0xFF01 != *pStr &&
0xFF1F != *pStr )
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
}
if( bAtStart ) // at the beginning of a paragraph?
@@ -890,7 +890,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
aText = *pPrevPara;
- bAtStart = FALSE;
+ bAtStart = sal_False;
pStart = aText.GetBuffer();
pStr = pStart + aText.Len();
@@ -901,7 +901,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
} while( 0 == ( bAtStart = (pStart == pStr)) );
if( bAtStart )
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
}
// Found [ \t]+[A-Z0-9]+ until here. Test now on the paragraph separator.
@@ -909,7 +909,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
const sal_Unicode* pExceptStt = 0;
if( !bAtStart )
{
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
int nFlag = C_NONE;
do {
switch( *pStr )
@@ -920,7 +920,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
case 0xFF0E :
{
if( nFlag & C_FULL_STOP )
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
nFlag |= C_FULL_STOP;
pExceptStt = pStr;
}
@@ -929,7 +929,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
case 0xFF01 :
{
if( nFlag & C_EXCLAMATION_MARK )
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
nFlag |= C_EXCLAMATION_MARK;
}
break;
@@ -937,21 +937,21 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
case 0xFF1F :
{
if( nFlag & C_QUESTION_MARK)
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
nFlag |= C_QUESTION_MARK;
}
break;
default:
if( !nFlag )
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter && pStr-- == pStart )
{
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
}
} while( bWeiter );
if( C_FULL_STOP != nFlag )
@@ -959,12 +959,12 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
if( 2 > ( pStr - pStart ) )
- return FALSE;
+ return sal_False;
if( !rCC.isLetterNumeric(
aText, sal::static_int_cast< xub_StrLen >( pStr-- - pStart ) ) )
{
- BOOL bValid = FALSE, bAlphaFnd = FALSE;
+ sal_Bool bValid = sal_False, bAlphaFnd = sal_False;
const sal_Unicode* pTmpStr = pStr;
while( !bValid )
{
@@ -972,7 +972,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
aText,
sal::static_int_cast< xub_StrLen >( pTmpStr - pStart ) ) )
{
- bValid = TRUE;
+ bValid = sal_True;
pStr = pTmpStr - 1;
}
else if( rCC.isLetter(
@@ -982,11 +982,11 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
{
if( bAlphaFnd )
{
- bValid = TRUE;
+ bValid = sal_True;
pStr = pTmpStr;
}
else
- bAlphaFnd = TRUE;
+ bAlphaFnd = sal_True;
}
else if( bAlphaFnd || IsWordDelim( *pTmpStr ) )
break;
@@ -998,10 +998,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
if( !bValid )
- return FALSE; // no valid separator -> no replacement
+ return sal_False; // no valid separator -> no replacement
}
- BOOL bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
+ sal_Bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
// Search for the beginning of the word
while( !IsWordDelim( *pStr ))
@@ -1009,7 +1009,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
if( bNumericOnly &&
rCC.isLetter(
aText, sal::static_int_cast< xub_StrLen >( pStr - pStart ) ) )
- bNumericOnly = FALSE;
+ bNumericOnly = sal_False;
if( pStart == pStr )
break;
@@ -1018,7 +1018,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
if( bNumericOnly ) // consists of only numbers, then not
- return FALSE;
+ return sal_False;
if( IsWordDelim( *pStr ))
++pStr;
@@ -1031,7 +1031,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
sWord = String(
pStr, sal::static_int_cast< xub_StrLen >( pExceptStt - pStr + 1 ) );
if( FindInCplSttExceptList(eLang, sWord) )
- return FALSE;
+ return sal_False;
// Delete all non alphanumeric. Test the characters at the
// beginning/end of the word ( recognizes: "(min.", "/min.", and so on.)
@@ -1050,10 +1050,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
if( sTmp.Len() && sTmp.Len() != sWord.Len() &&
FindInCplSttExceptList(eLang, sTmp))
- return FALSE;
+ return sal_False;
- if(FindInCplSttExceptList(eLang, sWord, TRUE))
- return FALSE;
+ if(FindInCplSttExceptList(eLang, sWord, sal_True))
+ return sal_False;
}
// Ok, then replace
@@ -1061,7 +1061,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() );
String sChar( cSave );
rCC.toUpper( sChar );
- BOOL bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar );
+ sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar );
// Parahaps someone wants to have the word
if( bRet && SaveWordCplSttLst & nFlags )
@@ -1113,7 +1113,7 @@ bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const String& rTxt
}
-sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote,
+sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote,
LanguageType eLang ) const
{
sal_Unicode cRet = bSttQuote ? ( '\"' == cInsChar
@@ -1144,10 +1144,10 @@ sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote,
}
void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
- sal_Unicode cInsChar, BOOL bSttQuote,
- BOOL bIns )
+ sal_Unicode cInsChar, sal_Bool bSttQuote,
+ sal_Bool bIns )
{
- LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False );
sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang );
String sChg( cInsChar );
@@ -1186,9 +1186,9 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
}
String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
- sal_Unicode cInsChar, BOOL bSttQuote )
+ sal_Unicode cInsChar, sal_Bool bSttQuote )
{
- LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False );
sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang );
String sRet( cRet );
@@ -1214,11 +1214,11 @@ String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
return sRet;
}
-ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nInsPos, sal_Unicode cChar,
- BOOL bInsert, Window* pFrameWin )
+ sal_Bool bInsert, Window* pFrameWin )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
bool bIsNextRun = bRunNext;
bRunNext = false; // if it was set, then it has to be turned off
@@ -1234,14 +1234,14 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
break;
}
- BOOL bSingle = '\'' == cChar;
- BOOL bIsReplaceQuote =
+ sal_Bool bSingle = '\'' == cChar;
+ sal_Bool bIsReplaceQuote =
(IsAutoCorrFlag( ChgQuotes ) && ('\"' == cChar )) ||
(IsAutoCorrFlag( ChgSglQuotes ) && bSingle );
if( bIsReplaceQuote )
{
sal_Unicode cPrev;
- BOOL bSttQuote = !nInsPos ||
+ sal_Bool bSttQuote = !nInsPos ||
IsWordDelim( ( cPrev = rTxt.GetChar( nInsPos-1 ))) ||
lcl_IsInAsciiArr( "([{", cPrev ) ||
( cEmDash && cEmDash == cPrev ) ||
@@ -1261,7 +1261,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
if ( IsAutoCorrFlag( AddNonBrkSpace ) )
{
if ( NeedsHardspaceAutocorr( cChar ) &&
- FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, FALSE ) ) )
+ FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, sal_False ) ) )
{
nRet = AddNonBrkSpace;
}
@@ -1318,7 +1318,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
if( !nPos && !IsWordDelim( rTxt.GetChar( 0 )))
--nCapLttrPos; // Absatz Anfang und kein Blank !
- LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False );
if( LANGUAGE_SYSTEM == eLang )
eLang = MsLangId::getSystemLanguage();
CharClass& rCC = GetCharClass( eLang );
@@ -1331,7 +1331,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
const String* pPara = 0;
const String** ppPara = IsAutoCorrFlag(CptlSttSntnc) ? &pPara : 0;
- BOOL bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
+ sal_Bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
*this, ppPara );
if( !bChgWord )
{
@@ -1349,7 +1349,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
nCapLttrPos1 < nInsPos1 &&
rDoc.ChgAutoCorrWord( nCapLttrPos1, nInsPos1, *this, ppPara ))
{
- bChgWord = TRUE;
+ bChgWord = sal_True;
nCapLttrPos = nCapLttrPos1;
}
}
@@ -1366,7 +1366,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
// Capital letter at beginning of paragraph?
if( IsAutoCorrFlag( CptlSttSntnc ) &&
- FnCptlSttSntnc( rDoc, *pPara, FALSE,
+ FnCptlSttSntnc( rDoc, *pPara, sal_False,
nCapLttrPos, nEnd, eLang ) )
nRet |= CptlSttSntnc;
@@ -1401,7 +1401,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
// Capital letter at beginning of paragraph ?
if( IsAutoCorrFlag( CptlSttSntnc ) &&
- FnCptlSttSntnc( rDoc, rTxt, TRUE, nCapLttrPos, nInsPos, eLang ) )
+ FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttSntnc;
// Two capital letters at beginning of word ??
@@ -1414,11 +1414,37 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
nRet |= ChgToEnEmDash;
}
- } while( FALSE );
+ } while( sal_False );
if( nRet )
{
- ULONG nHelpId = 0;
+ const char* aHelpIds[] =
+ {
+ HID_AUTOCORR_HELP_WORD,
+ HID_AUTOCORR_HELP_SENT,
+ HID_AUTOCORR_HELP_SENTWORD,
+ HID_AUTOCORR_HELP_ACORWORD,
+ "",
+ HID_AUTOCORR_HELP_ACORSENTWORD,
+ "",
+ HID_AUTOCORR_HELP_CHGTOENEMDASH,
+ HID_AUTOCORR_HELP_WORDENEMDASH,
+ HID_AUTOCORR_HELP_SENTENEMDASH,
+ HID_AUTOCORR_HELP_SENTWORDENEMDASH,
+ HID_AUTOCORR_HELP_ACORWORDENEMDASH,
+ "",
+ HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH,
+ "",
+ HID_AUTOCORR_HELP_CHGQUOTES,
+ HID_AUTOCORR_HELP_CHGSGLQUOTES,
+ HID_AUTOCORR_HELP_SETINETATTR,
+ HID_AUTOCORR_HELP_INGNOREDOUBLESPACE,
+ HID_AUTOCORR_HELP_CHGWEIGHTUNDERL,
+ HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL,
+ HID_AUTOCORR_HELP_CHGORDINALNUMBER
+ };
+
+ sal_uLong nHelpId = 0;
if( nRet & ( Autocorrect|CptlSttSntnc|CptlSttWrd|ChgToEnEmDash ) )
{
// from 0 - 15
@@ -1444,8 +1470,8 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
if( nHelpId )
{
- nHelpId += HID_AUTOCORR_HELP_START - 1;
- Application::GetHelp()->OpenHelpAgent( nHelpId );
+ nHelpId -= 1;
+ Application::GetHelp()->OpenHelpAgent( aHelpIds[nHelpId] );
}
}
@@ -1456,16 +1482,16 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList(
LanguageType eLang )
{
- if( !pLangTable->IsKeyValid( ULONG( eLang )))
- CreateLanguageFile( eLang, TRUE);
- return *pLangTable->Seek( ULONG( eLang ) );
+ if( !pLangTable->IsKeyValid( sal_uLong( eLang )))
+ CreateLanguageFile( eLang, sal_True);
+ return *pLangTable->Seek( sal_uLong( eLang ) );
}
void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang )
{
- if( pLangTable->IsKeyValid( ULONG( eLang )))
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )))
{
- SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang));
if( pLists )
pLists->SaveCplSttExceptList();
}
@@ -1479,9 +1505,9 @@ void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang )
void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang)
{
- if(pLangTable->IsKeyValid(ULONG(eLang)))
+ if(pLangTable->IsKeyValid(sal_uLong(eLang)))
{
- SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang));
if(pLists)
pLists->SaveWrdSttExceptList();
}
@@ -1494,17 +1520,17 @@ void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang)
}
// Adds a single word. The list will immediately be written to the file!
-BOOL SvxAutoCorrect::AddCplSttException( const String& rNew,
+sal_Bool SvxAutoCorrect::AddCplSttException( const String& rNew,
LanguageType eLang )
{
SvxAutoCorrectLanguageListsPtr pLists = 0;
// either the right language is present or it will be this in the general list
- if( pLangTable->IsKeyValid(ULONG(eLang)))
- pLists = pLangTable->Seek(ULONG(eLang));
- else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))||
- CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE))
+ if( pLangTable->IsKeyValid(sal_uLong(eLang)))
+ pLists = pLangTable->Seek(sal_uLong(eLang));
+ else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))||
+ CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True))
{
- pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
+ pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
}
DBG_ASSERT(pLists, "No auto correction data");
return pLists->AddToCplSttExceptList(rNew);
@@ -1512,17 +1538,17 @@ BOOL SvxAutoCorrect::AddCplSttException( const String& rNew,
// Adds a single word. The list will immediately be written to the file!
-BOOL SvxAutoCorrect::AddWrtSttException( const String& rNew,
+sal_Bool SvxAutoCorrect::AddWrtSttException( const String& rNew,
LanguageType eLang )
{
SvxAutoCorrectLanguageListsPtr pLists = 0;
//either the right language is present or it is set in the general list
- if(pLangTable->IsKeyValid(ULONG(eLang)))
- pLists = pLangTable->Seek(ULONG(eLang));
- else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))||
- CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE))
- pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
- DBG_ASSERT(pLists, "No auto correction data");
+ if(pLangTable->IsKeyValid(sal_uLong(eLang)))
+ pLists = pLangTable->Seek(sal_uLong(eLang));
+ else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))||
+ CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True))
+ pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
+ DBG_ASSERT(pLists, "keine Autokorrekturdatei");
return pLists->AddToWrdSttExceptList(rNew);
}
@@ -1554,12 +1580,12 @@ void SvxAutoCorrect::SetShareAutoCorrFileName( const String& rNew )
}
-BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
+sal_Bool SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
const String& rTxt, xub_StrLen nPos,
String& rWord ) const
{
if( !nPos )
- return FALSE;
+ return sal_False;
xub_StrLen nEnde = nPos;
@@ -1567,7 +1593,7 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
if( ( nPos < rTxt.Len() &&
!IsWordDelim( rTxt.GetChar( nPos ))) ||
IsWordDelim( rTxt.GetChar( --nPos )))
- return FALSE;
+ return sal_False;
while( nPos && !IsWordDelim( rTxt.GetChar( --nPos )))
;
@@ -1580,12 +1606,12 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
while( lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nCapLttrPos )) )
if( ++nCapLttrPos >= nEnde )
- return FALSE;
+ return sal_False;
if( 3 > nEnde - nCapLttrPos )
- return FALSE;
+ return sal_False;
- LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False );
if( LANGUAGE_SYSTEM == eLang )
eLang = MsLangId::getSystemLanguage();
@@ -1593,24 +1619,24 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
CharClass& rCC = pThis->GetCharClass( eLang );
if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nEnde ))
- return FALSE;
+ return sal_False;
rWord = rTxt.Copy( nCapLttrPos, nEnde - nCapLttrPos );
- return TRUE;
+ return sal_True;
}
-BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile )
+sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFile )
{
- DBG_ASSERT(!pLangTable->IsKeyValid(ULONG(eLang)), "Language already exists ");
+ DBG_ASSERT(!pLangTable->IsKeyValid(sal_uLong(eLang)), "Language already exists ");
- String sUserDirFile( GetAutoCorrFileName( eLang, TRUE, FALSE )),
+ String sUserDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False )),
sShareDirFile( sUserDirFile );
SvxAutoCorrectLanguageListsPtr pLists = 0;
Time nMinTime( 0, 2 ), nAktTime, nLastCheckTime;
- ULONG nFndPos;
+ sal_uLong nFndPos;
if( TABLE_ENTRY_NOTFOUND !=
- pLastFileTable->SearchKey( ULONG( eLang ), &nFndPos ) &&
+ pLastFileTable->SearchKey( sal_uLong( eLang ), &nFndPos ) &&
( nLastCheckTime.SetTime( pLastFileTable->GetObject( nFndPos )),
nLastCheckTime < nAktTime ) &&
( nAktTime - nLastCheckTime ) < nMinTime )
@@ -1622,60 +1648,60 @@ BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile )
sShareDirFile = sUserDirFile;
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile,
sUserDirFile, eLang );
- pLangTable->Insert( ULONG(eLang), pLists );
- pLastFileTable->Remove( ULONG( eLang ) );
+ pLangTable->Insert( sal_uLong(eLang), pLists );
+ pLastFileTable->Remove( sal_uLong( eLang ) );
}
}
else if( ( FStatHelper::IsDocument( sUserDirFile ) ||
FStatHelper::IsDocument( sShareDirFile =
- GetAutoCorrFileName( eLang, FALSE, FALSE ) ) ) ||
+ GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) ||
( sShareDirFile = sUserDirFile, bNewFile ))
{
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile,
sUserDirFile, eLang );
- pLangTable->Insert( ULONG(eLang), pLists );
- pLastFileTable->Remove( ULONG( eLang ) );
+ pLangTable->Insert( sal_uLong(eLang), pLists );
+ pLastFileTable->Remove( sal_uLong( eLang ) );
}
else if( !bNewFile )
{
- if( !pLastFileTable->Insert( ULONG( eLang ), nAktTime.GetTime() ))
- pLastFileTable->Replace( ULONG( eLang ), nAktTime.GetTime() );
+ if( !pLastFileTable->Insert( sal_uLong( eLang ), nAktTime.GetTime() ))
+ pLastFileTable->Replace( sal_uLong( eLang ), nAktTime.GetTime() );
}
return pLists != 0;
}
-BOOL SvxAutoCorrect::PutText( const String& rShort, const String& rLong,
+sal_Bool SvxAutoCorrect::PutText( const String& rShort, const String& rLong,
LanguageType eLang )
{
- BOOL bRet = FALSE;
- if( pLangTable->IsKeyValid( ULONG(eLang)) || CreateLanguageFile(eLang) )
- bRet = pLangTable->Seek( ULONG(eLang) )->PutText(rShort, rLong);
+ sal_Bool bRet = sal_False;
+ if( pLangTable->IsKeyValid( sal_uLong(eLang)) || CreateLanguageFile(eLang) )
+ bRet = pLangTable->Seek( sal_uLong(eLang) )->PutText(rShort, rLong);
return bRet;
}
// - Delete an entry
-BOOL SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang )
+sal_Bool SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang )
{
- BOOL bRet = FALSE;
- if( pLangTable->IsKeyValid( ULONG( eLang )) )
- bRet = pLangTable->Seek( ULONG( eLang ))->DeleteText( rShort );
+ sal_Bool bRet = sal_False;
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )) )
+ bRet = pLangTable->Seek( sal_uLong( eLang ))->DeleteText( rShort );
return bRet;
}
// - return the replacement text (only for SWG-Format, all other
// can be taken from the word list!)
-BOOL SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& )
+sal_Bool SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& )
{
- return FALSE;
+ return sal_False;
}
// Text with attribution (only the SWG - SWG format!)
-BOOL SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&,
+sal_Bool SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&,
String& )
{
- return FALSE;
+ return sal_False;
}
void EncryptBlockName_Imp( String& rName )
@@ -1766,11 +1792,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
// First search for eLang, then US-English -> English
// and last in LANGUAGE_DONTKNOW
- if( pLangTable->IsKeyValid( ULONG( eLang ) ) ||
- CreateLanguageFile( eLang, FALSE ))
+ if( pLangTable->IsKeyValid( sal_uLong( eLang ) ) ||
+ CreateLanguageFile( eLang, sal_False ))
{
//the language is available - so bring it on
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang));
pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc );
if( pRet )
{
@@ -1781,16 +1807,16 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
// If it still could not be found here, then keep on searching
- ULONG nTmpKey1 = eLang & 0x7ff, // the main language in many cases DE
+ sal_uLong nTmpKey1 = eLang & 0x7ff, // the main language in many cases DE
nTmpKey2 = eLang & 0x3ff, // otherwise for example EN
nTmp;
- if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ if( ((nTmp = nTmpKey1) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey1 ) ||
- CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
- (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) ||
+ (( nTmp = nTmpKey2) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey2 ) ||
- CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) )
{
//the language is available - so bring it on
SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek( nTmp );
@@ -1801,11 +1827,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
return pRet;
}
}
- if( pLangTable->IsKeyValid( ULONG( LANGUAGE_DONTKNOW ) ) ||
- CreateLanguageFile( LANGUAGE_DONTKNOW, FALSE ) )
+ if( pLangTable->IsKeyValid( sal_uLong( LANGUAGE_DONTKNOW ) ) ||
+ CreateLanguageFile( LANGUAGE_DONTKNOW, sal_False ) )
{
//the language is available - so bring it on
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc);
if( pRet )
{
@@ -1816,58 +1842,58 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
return 0;
}
-BOOL SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
+sal_Bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
const String& sWord )
{
// First search for eLang, then US-English -> English
// and last in LANGUAGE_DONTKNOW
- ULONG nTmpKey1 = eLang & 0x7ff; // the main language in many cases DE
- ULONG nTmpKey2 = eLang & 0x3ff; // otherwise for example EN
+ sal_uLong nTmpKey1 = eLang & 0x7ff; // the main language in many cases DE
+ sal_uLong nTmpKey2 = eLang & 0x3ff; // otherwise for example EN
String sTemp(sWord);
- if( pLangTable->IsKeyValid( ULONG( eLang )) ||
- CreateLanguageFile( eLang, FALSE ) )
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )) ||
+ CreateLanguageFile( eLang, sal_False ) )
{
//the language is available - so bring it on
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang));
String _sTemp(sWord);
if(pList->GetWrdSttExceptList()->Seek_Entry(&_sTemp))
- return TRUE;
+ return sal_True;
}
// If it still could not be found here, then keep on searching
- ULONG nTmp;
- if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ sal_uLong nTmp;
+ if( ((nTmp = nTmpKey1) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey1 ) ||
- CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
- (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) ||
+ (( nTmp = nTmpKey2) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey2 ) ||
- CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) )
{
//the language is available - so bring it on
SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(nTmp);
if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp))
- return TRUE;
+ return sal_True;
}
- if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE))
+ if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False))
{
//the language is available - so bring it on
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
+sal_Bool lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
{
String sAbk( '~' );
- USHORT nPos;
+ sal_uInt16 nPos;
pList->Seek_Entry( &sAbk, &nPos );
if( nPos < pList->Count() )
{
String sLowerWord( sWord ); sLowerWord.ToLowerAscii();
const String* pAbk;
- for( USHORT n = nPos;
+ for( sal_uInt16 n = nPos;
n < pList->Count() &&
'~' == ( pAbk = (*pList)[ n ])->GetChar( 0 );
++n )
@@ -1879,7 +1905,7 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
for( xub_StrLen i = sLowerAbk.Len(), ii = sLowerWord.Len(); i; )
{
if( !--i ) // agrees
- return TRUE;
+ return sal_True;
if( sLowerAbk.GetChar( i ) != sLowerWord.GetChar( --ii ))
break;
@@ -1889,59 +1915,59 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
}
DBG_ASSERT( !(nPos && '~' == (*pList)[ --nPos ]->GetChar( 0 ) ),
"Wrongly sorted exception list?" );
- return FALSE;
+ return sal_False;
}
-BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
- const String& sWord, BOOL bAbbreviation)
+sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
+ const String& sWord, sal_Bool bAbbreviation)
{
// First search for eLang, then US-English -> English
// and last in LANGUAGE_DONTKNOW
- ULONG nTmpKey1 = eLang & 0x7ff; // the main language in many cases DE
- ULONG nTmpKey2 = eLang & 0x3ff; // otherwise for example EN
+ sal_uLong nTmpKey1 = eLang & 0x7ff; // the main language in many cases DE
+ sal_uLong nTmpKey2 = eLang & 0x3ff; // otherwise for example EN
String sTemp( sWord );
- if( pLangTable->IsKeyValid( ULONG( eLang )) ||
- CreateLanguageFile( eLang, FALSE ))
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )) ||
+ CreateLanguageFile( eLang, sal_False ))
{
//the language is available - so bring it on
- SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang));
const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
: pList->Seek_Entry( &sTemp ) )
- return TRUE;
+ return sal_True;
}
// If it still could not be found here, then keep on searching
- ULONG nTmp;
+ sal_uLong nTmp;
- if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ if( ((nTmp = nTmpKey1) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey1 ) ||
- CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
- (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) ||
+ (( nTmp = nTmpKey2) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey2 ) ||
- CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) )
{
//the language is available - so bring it on
SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(nTmp);
const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
: pList->Seek_Entry( &sTemp ) )
- return TRUE;
+ return sal_True;
}
- if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE))
+ if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False))
{
//the language is available - so bring it on
SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(LANGUAGE_DONTKNOW);
const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
: pList->Seek_Entry( &sTemp ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang,
- BOOL bNewFile, BOOL bTst ) const
+ sal_Bool bNewFile, sal_Bool bTst ) const
{
String sRet, sExt( MsLangId::convertLanguageToIsoString( eLang ) );
sExt.Insert('_', 0);
@@ -1983,10 +2009,10 @@ SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists()
delete pAutocorr_List;
}
-BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
+sal_Bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
{
// Access the file system only every 2 minutes to check the date stamp
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Time nMinTime( 0, 2 );
Time nAktTime;
@@ -1998,7 +2024,7 @@ BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
&aTstDate, &aTstTime ) &&
( aModifiedDate != aTstDate || aModifiedTime != aTstTime ))
{
- bRet = TRUE;
+ bRet = sal_True;
// then remove all the lists fast!
if( CplSttLstLoad & nFlags && pCplStt_ExcptLst )
delete pCplStt_ExcptLst, pCplStt_ExcptLst = 0;
@@ -2104,7 +2130,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
const SvStringsISortDtor& rLst,
const sal_Char* pStrmName,
SotStorageRef &rStg,
- BOOL bConvert )
+ sal_Bool bConvert )
{
if( rStg.Is() )
{
@@ -2243,13 +2269,13 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetCplSttExceptList()
return pCplStt_ExcptLst;
}
-BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
+sal_Bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
{
String* pNew = new String( rNew );
if( rNew.Len() && GetCplSttExceptList()->Insert( pNew ) )
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2264,14 +2290,14 @@ BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
return 0 != pNew;
}
-BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
+sal_Bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
{
String* pNew = new String( rNew );
SvStringsISortDtor* pExceptList = LoadWrdSttExceptList();
if( rNew.Len() && pExceptList && pExceptList->Insert( pNew ) )
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2288,7 +2314,7 @@ BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE );
+ SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplCplStt_ExcptLstStr ) );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2299,7 +2325,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
void SvxAutoCorrectLanguageLists::SaveCplSttExceptList()
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2327,7 +2353,7 @@ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList
SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE );
+ SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplWrdStt_ExcptLstStr ) );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2337,7 +2363,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList()
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2372,7 +2398,7 @@ void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const String& rName )
{
if( sShareAutoCorrFile != sUserAutoCorrFile )
{
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
if( xStg.Is() && SVSTREAM_OK == xStg->GetError() &&
xStg->IsStream( rName ) )
{
@@ -2426,7 +2452,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
aInfo.NameClash = NameClash::OVERWRITE;
aInfo.NewTitle = aDest.GetName();
aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DECODE_TO_IURI );
- aInfo.MoveData = FALSE;
+ aInfo.MoveData = sal_False;
aAny <<= aInfo;
aNewContent.executeCommand( OUString ( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), aAny);
}
@@ -2437,8 +2463,8 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
}
if (bConvert && !bError)
{
- SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, TRUE );
- SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, TRUE );
+ SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, sal_True );
+ SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, sal_True );
if( xSrcStg.Is() && xDstStg.Is() )
{
@@ -2453,7 +2479,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
if (pTmpWordList)
{
- SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, TRUE );
+ SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, sal_True );
pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() );
pTmpWordList = NULL;
}
@@ -2464,7 +2490,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
if (pTmpWordList)
{
- SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, TRUE );
+ SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, sal_True );
pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() );
}
@@ -2486,10 +2512,10 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
sShareAutoCorrFile = sUserAutoCorrFile;
}
-BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
+sal_Bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
{
String sStrmName( pXMLImplAutocorr_ListStr, RTL_TEXTENCODING_MS_1252 );
- BOOL bRet = TRUE, bRemove = !pAutocorr_List || !pAutocorr_List->Count();
+ sal_Bool bRet = sal_True, bRemove = !pAutocorr_List || !pAutocorr_List->Count();
if( !bRemove )
{
SvStorageStreamRef refList = rStg.OpenSotStream( sStrmName,
@@ -2534,14 +2560,13 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
rStg.Commit();
if( SVSTREAM_OK != rStg.GetError() )
{
- bRemove = TRUE;
- bRet = FALSE;
+ bRemove = sal_True;
+ bRet = sal_False;
}
}
-
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRemove )
@@ -2553,22 +2578,22 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
return bRet;
}
-BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
+sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort,
const String& rLong )
{
// First get the current list!
GetAutocorrWordList();
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
- BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
+ sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
// Update the word list
if( bRet )
{
- USHORT nPos;
- SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, TRUE );
+ sal_uInt16 nPos;
+ SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, sal_True );
if( pAutocorr_List->Seek_Entry( pNew, &nPos ) )
{
if( !(*pAutocorr_List)[ nPos ]->IsTextOnly() )
@@ -2594,14 +2619,13 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
else
{
delete pNew;
- bRet = FALSE;
+ bRet = sal_False;
}
}
return bRet;
}
-// Text with attribution (only the SWG - SWG format!)
-BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
+sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort,
SfxObjectShell& rShell )
{
// First get the current list!
@@ -2609,7 +2633,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
MakeUserStorage_Impl();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sLong;
try
{
@@ -2620,10 +2644,10 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
// Update the word list
if( bRet )
{
- SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, FALSE );
+ SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, sal_False );
if( pAutocorr_List->Insert( pNew ) )
{
- SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
MakeBlocklist_Imp( *xStor );
}
else
@@ -2638,18 +2662,18 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
}
// Delete an entry
-BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
+sal_Bool SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
{
// First get the current list!
GetAutocorrWordList();
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
- BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
+ sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
if( bRet )
{
- USHORT nPos;
+ sal_uInt16 nPos;
SvxAutocorrWord aTmp( rShort, rShort );
if( pAutocorr_List->Seek_Entry( &aTmp, &nPos ) )
{
@@ -2674,7 +2698,7 @@ BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
xStg = 0;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx
index b798ace08c..0aca4533ab 100644..100755
--- a/editeng/source/misc/swafopt.cxx
+++ b/editeng/source/misc/swafopt.cxx
@@ -53,14 +53,14 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
bAFmtDelSpacesBetweenLines =
bAFmtByInpDelSpacesAtSttEnd =
bAFmtByInpDelSpacesBetweenLines =
- bDummy = TRUE;
+ bDummy = sal_True;
bReplaceStyles =
bDelEmptyNode =
bWithRedlining =
bAutoCmpltEndless =
bAutoCmpltAppendBlanc =
- bAutoCmpltShowAsTip = FALSE;
+ bAutoCmpltShowAsTip = sal_False;
bSetBorder =
bCreateTable =
@@ -69,10 +69,10 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
bRightMargin =
bAutoCompleteWords =
bAutoCmpltCollectWords =
- bAutoCmpltKeepList = TRUE;
+ bAutoCmpltKeepList = sal_True;
bDummy6 = bDummy7 = bDummy8 =
- FALSE;
+ sal_False;
nRightMargin = 50; // dflt. 50 %
nAutoCmpltExpandKey = KEY_RETURN;
@@ -81,7 +81,7 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
aBulletFont.SetFamily( FAMILY_DONTKNOW );
aBulletFont.SetPitch( PITCH_DONTKNOW );
aBulletFont.SetWeight( WEIGHT_DONTKNOW );
- aBulletFont.SetTransparent( TRUE );
+ aBulletFont.SetTransparent( sal_True );
cBullet = 0x2022;
cByInputBullet = cBullet;
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index 4abb4e6d84..44257ff5b6 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -38,14 +38,10 @@
#include <vector>
-#ifdef WIN
-#pragma optimize ( "", off )
-#endif
-
TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
const basegfx::B2DPolyPolygon* pLinePolyPolygon,
- USHORT nCacheSz, USHORT nLft, USHORT nRght,
- BOOL bSimpl, BOOL bInnr, BOOL bVert ) :
+ sal_uInt16 nCacheSz, sal_uInt16 nLft, sal_uInt16 nRght,
+ sal_Bool bSimpl, sal_Bool bInnr, sal_Bool bVert ) :
pBound( NULL ),
nCacheSize( nCacheSz ),
nRight( nRght ),
@@ -58,7 +54,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
bVertical( bVert )
{
#ifdef DBG_UTIL
- bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = FALSE;
+ bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = sal_False;
#endif
sal_uInt32 nCount(rPolyPolygon.count());
mpPolyPolygon = new PolyPolygon( (sal_uInt16)nCount );
@@ -86,9 +82,6 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
mpLinePolyPolygon = NULL;
}
-#ifdef WIN
-#pragma optimize ( "", on )
-#endif
TextRanger::~TextRanger()
{
@@ -101,7 +94,7 @@ TextRanger::~TextRanger()
If there's is a change in the writing direction,
the cache has to be cleared.
*/
-void TextRanger::SetVertical( BOOL bNew )
+void TextRanger::SetVertical( sal_Bool bNew )
{
if( IsVertical() != bNew )
{
@@ -127,17 +120,17 @@ class SvxBoundArgs
long nLower;
long nStart;
long nEnd;
- USHORT nCut;
- USHORT nLast;
- USHORT nNext;
- BYTE nAct;
- BYTE nFirst;
- BOOL bClosed : 1;
- BOOL bInner : 1;
- BOOL bMultiple : 1;
- BOOL bConcat : 1;
- BOOL bRotate : 1;
- void NoteRange( BOOL bToggle );
+ sal_uInt16 nCut;
+ sal_uInt16 nLast;
+ sal_uInt16 nNext;
+ sal_uInt8 nAct;
+ sal_uInt8 nFirst;
+ sal_Bool bClosed : 1;
+ sal_Bool bInner : 1;
+ sal_Bool bMultiple : 1;
+ sal_Bool bConcat : 1;
+ sal_Bool bRotate : 1;
+ void NoteRange( sal_Bool bToggle );
long Cut( long nY, const Point& rPt1, const Point& rPt2 );
void Add();
void _NoteFarPoint( long nPx, long nPyDiff, long nDiff );
@@ -152,17 +145,17 @@ public:
void NotePoint( const long nA ) { NoteMargin( nA - nStart, nA + nEnd ); }
void NoteMargin( const long nL, const long nR )
{ if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; }
- USHORT Area( const Point& rPt );
- void NoteUpLow( long nA, const BYTE nArea );
+ sal_uInt16 Area( const Point& rPt );
+ void NoteUpLow( long nA, const sal_uInt8 nArea );
void Calc( const PolyPolygon& rPoly );
void Concat( const PolyPolygon* pPoly );
// inlines
void NoteLast() { if( bMultiple ) NoteRange( nAct == nFirst ); }
- void SetClosed( const BOOL bNew ){ bClosed = bNew; }
- BOOL IsClosed() const { return bClosed; }
- void SetConcat( const BOOL bNew ){ bConcat = bNew; }
- BOOL IsConcat() const { return bConcat; }
- BYTE GetAct() const { return nAct; }
+ void SetClosed( const sal_Bool bNew ){ bClosed = bNew; }
+ sal_Bool IsClosed() const { return bClosed; }
+ void SetConcat( const sal_Bool bNew ){ bConcat = bNew; }
+ sal_Bool IsConcat() const { return bConcat; }
+ sal_uInt8 GetAct() const { return nAct; }
};
SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, LongDqPtr pLong,
@@ -170,7 +163,7 @@ SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, LongDqPtr pLong,
: pLongArr( pLong ), pTextRanger( pRanger ),
nTop( rRange.Min() ), nBottom( rRange.Max() ),
bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ),
- bConcat( FALSE ), bRotate( pRanger->IsVertical() )
+ bConcat( sal_False ), bRotate( pRanger->IsVertical() )
{
if( bRotate )
{
@@ -207,7 +200,7 @@ long SvxBoundArgs::CalcMax( const Point& rPt1, const Point& rPt2,
nB += nDa * nDa;
nB = nRange + nDa * ( nFarRange - nRange ) / sqrt( nB );
- BOOL bNote;
+ sal_Bool bNote;
if( nB < B(rPt2) )
bNote = nB > B(rPt1);
else
@@ -253,19 +246,19 @@ void SvxBoundArgs::_NoteFarPoint( long nPa, long nPbDiff, long nDiff )
NoteMargin( nTmpA, nPbDiff );
}
-void SvxBoundArgs::NoteRange( BOOL bToggle )
+void SvxBoundArgs::NoteRange( sal_Bool bToggle )
{
DBG_ASSERT( nMax >= nMin || bInner, "NoteRange: Min > Max?");
if( nMax < nMin )
return;
if( !bClosed )
- bToggle = FALSE;
- USHORT nIdx = 0;
- USHORT nCount = pLongArr->size();
+ bToggle = sal_False;
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 nCount = pLongArr->size();
DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" );
while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin )
++nIdx;
- BOOL bOdd = nIdx % 2 ? TRUE : FALSE;
+ sal_Bool bOdd = nIdx % 2 ? sal_True : sal_False;
// No overlap with existing intervals?
if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) )
{ // Then a new one is inserted ...
@@ -275,7 +268,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
}
else
{ // expand an existing interval ...
- USHORT nMaxIdx = nIdx;
+ sal_uInt16 nMaxIdx = nIdx;
// If we end up on a left interval boundary, it must be reduced to nMin.
if( bOdd )
--nIdx;
@@ -292,16 +285,16 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
if( nMaxIdx % 2 )
(*pLongArr)[ nMaxIdx-- ] = nMax;
// Possible merge of intervals.
- USHORT nDiff = nMaxIdx - nIdx;
+ sal_uInt16 nDiff = nMaxIdx - nIdx;
nMaxIdx = nIdx / 2; // From here on is nMaxIdx the Index in BoolArray.
if( nDiff )
{
pLongArr->erase( pLongArr->begin() + nIdx + 1, pLongArr->begin() + nIdx + 1 + nDiff );
nDiff /= 2;
- USHORT nStop = nMaxIdx + nDiff;
- for( USHORT i = nMaxIdx; i < nStop; ++i )
+ sal_uInt16 nStop = nMaxIdx + nDiff;
+ for( sal_uInt16 i = nMaxIdx; i < nStop; ++i )
bToggle ^= aBoolArr[ i ];
- aBoolArr.erase(aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + nMaxIdx + nDiff);
+ aBoolArr.erase( aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + (nMaxIdx + nDiff) );
}
DBG_ASSERT( nMaxIdx < aBoolArr.size(), "NoteRange: Too much deleted" );
aBoolArr[ nMaxIdx ] = aBoolArr[ nMaxIdx ] ^ bToggle;
@@ -310,9 +303,9 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
{
- USHORT nCount;
+ sal_uInt16 nCount;
nAct = 0;
- for( USHORT i = 0; i < rPoly.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rPoly.Count(); ++i )
{
const Polygon& rPol = rPoly[ i ];
nCount = rPol.GetSize();
@@ -358,8 +351,8 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
}
if( nCount > 1 )
{
- USHORT nIdx = 1;
- while( TRUE )
+ sal_uInt16 nIdx = 1;
+ while( sal_True )
{
const Point& rLast = rPol[ nIdx - 1 ];
if( nIdx == nCount )
@@ -367,7 +360,7 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
const Point& rNext = rPol[ nIdx ];
nNext = Area( rNext );
nCut = nNext ^ nLast;
- USHORT nOldAct = nAct;
+ sal_uInt16 nOldAct = nAct;
if( nAct )
CheckCut( rLast, rNext );
if( nCut & 4 )
@@ -447,18 +440,18 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
void SvxBoundArgs::Add()
{
- ULONG nLongIdx = 1;
- ULONG nCount = aBoolArr.size();
+ sal_uInt16 nLongIdx = 1;
+ size_t nCount = aBoolArr.size();
if( nCount && ( !bInner || !pTextRanger->IsSimple() ) )
{
- BOOL bDelete = aBoolArr[ 0 ];
+ sal_Bool bDelete = aBoolArr.front();
if( bInner )
bDelete = !bDelete;
- for( ULONG nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx )
+ for( size_t nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx )
{
if( bDelete )
{
- ULONG next = 2;
+ sal_uInt16 next = 2;
while( nBoolIdx < nCount && !aBoolArr[ nBoolIdx++ ] &&
(!bInner || nBoolIdx < nCount ) )
next += 2;
@@ -466,9 +459,9 @@ void SvxBoundArgs::Add()
next /= 2;
nBoolIdx = nBoolIdx - next;
nCount = nCount - next;
- aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + nBoolIdx + next );
+ aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) );
if( nBoolIdx )
- aBoolArr[ nBoolIdx - 1 ] = FALSE;
+ aBoolArr[ nBoolIdx - 1 ] = sal_False;
#if OSL_DEBUG_LEVEL > 1
else
++next;
@@ -501,20 +494,20 @@ void SvxBoundArgs::Add()
void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
{
- SetConcat( TRUE );
+ SetConcat( sal_True );
DBG_ASSERT( pPoly, "Nothing to do?" );
LongDqPtr pOld = pLongArr;
pLongArr = new std::deque<long>();
aBoolArr.clear();
- bInner = FALSE;
+ bInner = sal_False;
Calc( *pPoly ); // Note that this updates pLongArr, which is why we swapped it out earlier.
- USHORT nCount = pLongArr->size();
- USHORT nIdx = 0;
- USHORT i = 0;
- BOOL bSubtract = pTextRanger->IsInner();
+ sal_uInt16 nCount = pLongArr->size();
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 i = 0;
+ sal_Bool bSubtract = pTextRanger->IsInner();
while( i < nCount )
{
- ULONG nOldCount = pOld->size();
+ sal_uLong nOldCount = pOld->size();
if( nIdx == nOldCount )
{ // Reached the end of the old Array...
if( !bSubtract )
@@ -523,7 +516,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
}
long nLeft = (*pLongArr)[ i++ ];
long nRight = (*pLongArr)[ i++ ];
- USHORT nLeftPos = nIdx + 1;
+ sal_uInt16 nLeftPos = nIdx + 1;
while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] )
nLeftPos += 2;
if( nLeftPos >= nOldCount )
@@ -532,7 +525,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
pOld->insert( pOld->begin() + nOldCount, pLongArr->begin() + i - 2, pLongArr->end() );
break;
}
- USHORT nRightPos = nLeftPos - 1;
+ sal_uInt16 nRightPos = nLeftPos - 1;
while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] )
nRightPos += 2;
if( nRightPos < nLeftPos )
@@ -585,7 +578,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
*10 = above the lower edge
*************************************************************************/
-USHORT SvxBoundArgs::Area( const Point& rPt )
+sal_uInt16 SvxBoundArgs::Area( const Point& rPt )
{
long nB = B( rPt );
if( nB >= nBottom )
@@ -625,7 +618,7 @@ long SvxBoundArgs::Cut( long nB, const Point& rPt1, const Point& rPt2 )
return long( rPt1.X() + nQuot );
}
-void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea )
+void SvxBoundArgs::NoteUpLow( long nA, const sal_uInt8 nArea )
{
if( nAct )
{
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index 29216629c2..5b5abd6664 100644
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -93,12 +93,12 @@ static uno::Reference< XLinguServiceManager > GetLngSvcMgr_Impl()
return xRes;
}
-BOOL lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
+sal_Bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
{
- INT32 nRes = -1;
- INT32 nEntries = rCfgSvcs.getLength();
+ sal_Int32 nRes = -1;
+ sal_Int32 nEntries = rCfgSvcs.getLength();
const OUString *pEntry = rCfgSvcs.getConstArray();
- for (INT32 i = 0; i < nEntries && nRes == -1; ++i)
+ for (sal_Int32 i = 0; i < nEntries && nRes == -1; ++i)
{
if (rEntry == pEntry[i])
nRes = i;
@@ -113,11 +113,11 @@ Sequence< OUString > lcl_RemoveMissingEntries(
{
Sequence< OUString > aRes( rCfgSvcs.getLength() );
OUString *pRes = aRes.getArray();
- INT32 nCnt = 0;
+ sal_Int32 nCnt = 0;
- INT32 nEntries = rCfgSvcs.getLength();
+ sal_Int32 nEntries = rCfgSvcs.getLength();
const OUString *pEntry = rCfgSvcs.getConstArray();
- for (INT32 i = 0; i < nEntries; ++i)
+ for (sal_Int32 i = 0; i < nEntries; ++i)
{
if (pEntry[i].getLength() && lcl_FindEntry( pEntry[i], rAvailSvcs ))
pRes[ nCnt++ ] = pEntry[i];
@@ -139,7 +139,7 @@ Sequence< OUString > lcl_GetLastFoundSvcs(
SvxLocaleToLanguage( rAvailLocale ) ) );
Sequence< OUString > aNodeNames( rCfg.GetNodeNames(rLastFoundList) );
- BOOL bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
+ sal_Bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
if (bFound)
{
@@ -174,13 +174,13 @@ Sequence< OUString > lcl_GetNewEntries(
const Sequence< OUString > &rLastFoundSvcs,
const Sequence< OUString > &rAvailSvcs )
{
- INT32 nLen = rAvailSvcs.getLength();
+ sal_Int32 nLen = rAvailSvcs.getLength();
Sequence< OUString > aRes( nLen );
OUString *pRes = aRes.getArray();
- INT32 nCnt = 0;
+ sal_Int32 nCnt = 0;
const OUString *pEntry = rAvailSvcs.getConstArray();
- for (INT32 i = 0; i < nLen; ++i)
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], rLastFoundSvcs ))
pRes[ nCnt++ ] = pEntry[i];
@@ -197,17 +197,17 @@ Sequence< OUString > lcl_MergeSeq(
{
Sequence< OUString > aRes( rCfgSvcs.getLength() + rNewSvcs.getLength() );
OUString *pRes = aRes.getArray();
- INT32 nCnt = 0;
+ sal_Int32 nCnt = 0;
- for (INT32 k = 0; k < 2; ++k)
+ for (sal_Int32 k = 0; k < 2; ++k)
{
// add previously configuerd service first and append
// new found services at the end
const Sequence< OUString > &rSeq = k == 0 ? rCfgSvcs : rNewSvcs;
- INT32 nLen = rSeq.getLength();
+ sal_Int32 nLen = rSeq.getLength();
const OUString *pEntry = rSeq.getConstArray();
- for (INT32 i = 0; i < nLen; ++i)
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], aRes ))
pRes[ nCnt++ ] = pEntry[i];
@@ -218,8 +218,8 @@ Sequence< OUString > lcl_MergeSeq(
return aRes;
}
-INT16 SvxLinguConfigUpdate::nNeedUpdating = -1;
-INT32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1;
+sal_Int16 SvxLinguConfigUpdate::nNeedUpdating = -1;
+sal_Int32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1;
void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
{
@@ -259,13 +259,13 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
OUString aService( ::rtl::OUString::createFromAscii( apServices[k] ) );
OUString aActiveList( ::rtl::OUString::createFromAscii( apCurLists[k] ) );
OUString aLastFoundList( ::rtl::OUString::createFromAscii( apLastFoundLists[k] ) );
- INT32 i;
+ sal_Int32 i;
//
// remove configured but not available language/services entries
//
Sequence< OUString > aNodeNames( aCfg.GetNodeNames( aActiveList ) ); // list of configured locales
- INT32 nNodeNames = aNodeNames.getLength();
+ sal_Int32 nNodeNames = aNodeNames.getLength();
const OUString *pNodeName = aNodeNames.getConstArray();
for (i = 0; i < nNodeNames; ++i)
{
@@ -290,7 +290,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
//
uno::Reference< XAvailableLocales > xAvail( xLngSvcMgr, UNO_QUERY );
Sequence< Locale > aAvailLocales( xAvail->getAvailableLocales(aService) );
- INT32 nAvailLocales = aAvailLocales.getLength();
+ sal_Int32 nAvailLocales = aAvailLocales.getLength();
const Locale *pAvailLocale = aAvailLocales.getConstArray();
for (i = 0; i < nAvailLocales; ++i)
{
@@ -334,9 +334,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
xLngSvcMgr->getAvailableServices( aService, pAvailLocale[i] ) );
#if OSL_DEBUG_LEVEL > 1
- INT32 nSvcs = aSvcImplNames.getLength();
+ sal_Int32 nSvcs = aSvcImplNames.getLength();
const OUString *pSvcImplName = aSvcImplNames.getConstArray();
- for (INT32 j = 0; j < nSvcs; ++j)
+ for (sal_Int32 j = 0; j < nSvcs; ++j)
{
OUString aImplName( pSvcImplName[j] );
}
@@ -371,9 +371,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
#if OSL_DEBUG_LEVEL > 1
Sequence< OUString > aSvcImplNames( (*aIt).second );
- INT32 nSvcs = aSvcImplNames.getLength();
+ sal_Int32 nSvcs = aSvcImplNames.getLength();
const OUString *pSvcImplName = aSvcImplNames.getConstArray();
- for (INT32 j = 0; j < nSvcs; ++j)
+ for (sal_Int32 j = 0; j < nSvcs; ++j)
{
OUString aImplName( pSvcImplName[j] );
}
@@ -389,7 +389,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
{
RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::UpdateAll - ReplaceSetProperties" );
// add new or replace existing entries.
- BOOL bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
+ sal_Bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
if (!bRes)
{
#if OSL_DEBUG_LEVEL > 1
@@ -411,7 +411,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
// not be too troublesome.
// In OOo 3.0 we will not need the respective code anymore at all.
// aAny <<= nCurrentDataFilesChangedCheckValue;
- aAny <<= (INT32) -1; // keep the value set to 'need to check'
+ aAny <<= (sal_Int32) -1; // keep the value set to 'need to check'
aCfg.SetProperty( A2OU( "DataFilesChangedCheckValue" ), aAny );
@@ -428,17 +428,17 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
}
-INT32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue()
+sal_Int32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue()
{
RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue" );
- INT32 nHashVal = 0;
+ sal_Int32 nHashVal = 0;
// nothing to be checked anymore since those old directory paths are gone by now
return nHashVal;
}
-BOOL SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck )
+sal_Bool SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck )
{
RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::IsNeedUpdateAll" );
if (nNeedUpdating == -1 || bForceCheck ) // need to check if updating is necessary
@@ -513,10 +513,10 @@ void ThesDummy_Impl::GetCfgLocales()
String aNode( A2OU( "ServiceManager/ThesaurusList" ) );
Sequence < OUString > aNodeNames( aCfg.GetNodeNames( aNode ) );
const OUString *pNodeNames = aNodeNames.getConstArray();
- INT32 nLen = aNodeNames.getLength();
+ sal_Int32 nLen = aNodeNames.getLength();
pLocaleSeq = new Sequence< Locale >( nLen );
Locale *pLocale = pLocaleSeq->getArray();
- for (INT32 i = 0; i < nLen; ++i)
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
pLocale[i] = SvxCreateLocale(
MsLangId::convertIsoStringToLanguage( pNodeNames[i] ) );
@@ -571,8 +571,8 @@ sal_Bool SAL_CALL
else if (!pLocaleSeq) // if not already loaded save startup time by avoiding loading them now
GetCfgLocales();
GetCfgLocales();
- BOOL bFound = FALSE;
- INT32 nLen = pLocaleSeq->getLength();
+ sal_Bool bFound = sal_False;
+ sal_Int32 nLen = pLocaleSeq->getLength();
const Locale *pLocale = pLocaleSeq->getConstArray();
const Locale *pEnd = pLocale + nLen;
for ( ; pLocale < pEnd && !bFound; ++pLocale)
@@ -669,7 +669,7 @@ sal_Bool SAL_CALL
throw(uno::RuntimeException)
{
GetSpell_Impl();
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (xSpell.is())
bRes = xSpell->hasLanguage( nLanguage );
return bRes;
@@ -683,7 +683,7 @@ sal_Bool SAL_CALL
uno::RuntimeException)
{
GetSpell_Impl();
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if (xSpell.is())
bRes = xSpell->isValid( rWord, nLanguage, rProperties );
return bRes;
@@ -785,7 +785,7 @@ sal_Bool SAL_CALL
throw(uno::RuntimeException)
{
GetHyph_Impl();
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (xHyph.is())
bRes = xHyph->hasLocale( rLocale );
return bRes;
@@ -1215,32 +1215,32 @@ SvxAlternativeSpelling SvxGetAltSpelling(
{
OUString aWord( rHyphWord->getWord() ),
aAltWord( rHyphWord->getHyphenatedWord() );
- INT16 nHyphenationPos = rHyphWord->getHyphenationPos(),
+ sal_Int16 nHyphenationPos = rHyphWord->getHyphenationPos(),
nHyphenPos = rHyphWord->getHyphenPos();
- INT16 nLen = (INT16)aWord.getLength();
- INT16 nAltLen = (INT16)aAltWord.getLength();
+ sal_Int16 nLen = (sal_Int16)aWord.getLength();
+ sal_Int16 nAltLen = (sal_Int16)aAltWord.getLength();
const sal_Unicode *pWord = aWord.getStr(),
*pAltWord = aAltWord.getStr();
// count number of chars from the left to the
// hyphenation pos / hyphen pos that are equal
- INT16 nL = 0;
+ sal_Int16 nL = 0;
while (nL <= nHyphenationPos && nL <= nHyphenPos
&& pWord[ nL ] == pAltWord[ nL ])
++nL;
// count number of chars from the right to the
// hyphenation pos / hyphen pos that are equal
- INT16 nR = 0;
- INT32 nIdx = nLen - 1;
- INT32 nAltIdx = nAltLen - 1;
+ sal_Int16 nR = 0;
+ sal_Int32 nIdx = nLen - 1;
+ sal_Int32 nAltIdx = nAltLen - 1;
while (nIdx > nHyphenationPos && nAltIdx > nHyphenPos
&& pWord[ nIdx-- ] == pAltWord[ nAltIdx-- ])
++nR;
aRes.aReplacement = OUString( aAltWord.copy( nL, nAltLen - nL - nR ) );
- aRes.nChangedPos = (INT16) nL;
+ aRes.nChangedPos = (sal_Int16) nL;
aRes.nChangedLength = nLen - nL - nR;
- aRes.bIsAltSpelling = TRUE;
+ aRes.bIsAltSpelling = sal_True;
aRes.xHyphWord = rHyphWord;
}
return aRes;
diff --git a/editeng/source/outliner/outl_pch.cxx b/editeng/source/outliner/outl_pch.cxx
index 1eff044ef9..1eff044ef9 100644..100755
--- a/editeng/source/outliner/outl_pch.cxx
+++ b/editeng/source/outliner/outl_pch.cxx
diff --git a/editeng/source/outliner/outl_pch.hxx b/editeng/source/outliner/outl_pch.hxx
index 289b475f98..289b475f98 100644..100755
--- a/editeng/source/outliner/outl_pch.hxx
+++ b/editeng/source/outliner/outl_pch.hxx
diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx
index 2767305098..75164f9ebd 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -56,7 +56,7 @@ OutlinerEditEng::~OutlinerEditEng()
{
}
-void OutlinerEditEng::PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
+void OutlinerEditEng::PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
{
if( GetControlWord() && EE_CNTRL_OUTLINER )
{
@@ -67,7 +67,7 @@ void OutlinerEditEng::PaintingFirstLine( USHORT nPara, const Point& rStartPos, l
pOwner->PaintBullet( nPara, rStartPos, rOrigin, nOrientation, pOutDev );
}
-const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( USHORT nPara ) const
+const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_uInt16 nPara ) const
{
const SvxNumberFormat* pFmt = NULL;
if (pOwner)
@@ -76,32 +76,32 @@ const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( USHORT nPara ) const
}
-Rectangle OutlinerEditEng::GetBulletArea( USHORT nPara )
+Rectangle OutlinerEditEng::GetBulletArea( sal_uInt16 nPara )
{
Rectangle aBulletArea = Rectangle( Point(), Point() );
if ( nPara < pOwner->pParaList->GetParagraphCount() )
{
if ( pOwner->ImplHasBullet( nPara ) )
- aBulletArea = pOwner->ImpCalcBulletArea( nPara, FALSE, FALSE );
+ aBulletArea = pOwner->ImpCalcBulletArea( nPara, sal_False, sal_False );
}
return aBulletArea;
}
-void OutlinerEditEng::ParagraphInserted( USHORT nNewParagraph )
+void OutlinerEditEng::ParagraphInserted( sal_uInt16 nNewParagraph )
{
pOwner->ParagraphInserted( nNewParagraph );
EditEngine::ParagraphInserted( nNewParagraph );
}
-void OutlinerEditEng::ParagraphDeleted( USHORT nDeletedParagraph )
+void OutlinerEditEng::ParagraphDeleted( sal_uInt16 nDeletedParagraph )
{
pOwner->ParagraphDeleted( nDeletedParagraph );
EditEngine::ParagraphDeleted( nDeletedParagraph );
}
-void OutlinerEditEng::ParagraphConnected( USHORT /*nLeftParagraph*/, USHORT nRightParagraph )
+void OutlinerEditEng::ParagraphConnected( sal_uInt16 /*nLeftParagraph*/, sal_uInt16 nRightParagraph )
{
if( pOwner && pOwner->IsUndoEnabled() && !const_cast<EditEngine&>(pOwner->GetEditEngine()).IsInUndo() )
{
@@ -119,22 +119,22 @@ void OutlinerEditEng::StyleSheetChanged( SfxStyleSheet* pStyle )
pOwner->StyleSheetChanged( pStyle );
}
-void OutlinerEditEng::ParaAttribsChanged( USHORT nPara )
+void OutlinerEditEng::ParaAttribsChanged( sal_uInt16 nPara )
{
pOwner->ParaAttribsChanged( nPara );
}
-BOOL OutlinerEditEng::SpellNextDocument()
+sal_Bool OutlinerEditEng::SpellNextDocument()
{
return pOwner->SpellNextDocument();
}
-BOOL OutlinerEditEng::ConvertNextDocument()
+sal_Bool OutlinerEditEng::ConvertNextDocument()
{
return pOwner->ConvertNextDocument();
}
-XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const
+XubString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const
{
switch( nUndoId )
{
@@ -158,8 +158,8 @@ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const
}
}
-void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen,
- const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
+void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen,
+ const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
bool bEndOfLine,
@@ -174,7 +174,7 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex
}
void OutlinerEditEng::DrawingTab( const Point& rStartPos, long nWidth, const String& rChar,
- const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
bool bEndOfLine, bool bEndOfParagraph,
const Color& rOverlineColor, const Color& rTextLineColor)
{
@@ -182,23 +182,23 @@ void OutlinerEditEng::DrawingTab( const Point& rStartPos, long nWidth, const Str
bEndOfLine, bEndOfParagraph, rOverlineColor, rTextLineColor );
}
-void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos )
{
EditEngine::FieldClicked( rField, nPara, nPos ); // If URL
pOwner->FieldClicked( rField, nPara, nPos );
}
-void OutlinerEditEng::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+void OutlinerEditEng::FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos )
{
pOwner->FieldSelected( rField, nPara, nPos );
}
-XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
-void OutlinerEditEng::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void OutlinerEditEng::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
if( pPara )
@@ -206,13 +206,13 @@ void OutlinerEditEng::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
if ( !IsInUndo() && IsUndoEnabled() )
pOwner->UndoActionStart( OLUNDO_ATTR );
- EditEngine::SetParaAttribs( (USHORT)nPara, rSet );
+ EditEngine::SetParaAttribs( (sal_uInt16)nPara, rSet );
- pOwner->ImplCheckNumBulletItem( (USHORT)nPara );
+ pOwner->ImplCheckNumBulletItem( (sal_uInt16)nPara );
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
- pOwner->ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pOwner->pParaList->GetParagraphCount()) );
+ pOwner->ImplCheckParagraphs( (sal_uInt16)nPara, (sal_uInt16) (pOwner->pParaList->GetParagraphCount()) );
if ( !IsInUndo() && IsUndoEnabled() )
pOwner->UndoActionEnd( OLUNDO_ATTR );
diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx
index 11baca5b99..cbe254c845 100644..100755
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -42,21 +42,21 @@ protected:
// derived from EditEngine. Allows Outliner objetcs to provide
// bullet access to the EditEngine.
- virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const;
+ virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const;
public:
OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool );
~OutlinerEditEng();
- virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
+ virtual void PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
- virtual void ParagraphInserted( USHORT nNewParagraph );
- virtual void ParagraphDeleted( USHORT nDeletedParagraph );
- virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph );
+ virtual void ParagraphInserted( sal_uInt16 nNewParagraph );
+ virtual void ParagraphDeleted( sal_uInt16 nDeletedParagraph );
+ virtual void ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph );
virtual void DrawingText(
- const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
- USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
+ const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
+ sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
bool bEndOfLine,
@@ -68,27 +68,27 @@ public:
virtual void DrawingTab(
const Point& rStartPos, long nWidth, const String& rChar,
- const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
+ const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
bool bEndOfLine,
bool bEndOfParagraph,
const Color& rOverlineColor,
const Color& rTextLineColor);
virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
- virtual void ParaAttribsChanged( USHORT nPara );
- virtual BOOL SpellNextDocument();
- virtual XubString GetUndoComment( USHORT nUndoId ) const;
+ virtual void ParaAttribsChanged( sal_uInt16 nPara );
+ virtual sal_Bool SpellNextDocument();
+ virtual XubString GetUndoComment( sal_uInt16 nUndoId ) const;
// for text conversion
- virtual BOOL ConvertNextDocument();
+ virtual sal_Bool ConvertNextDocument();
- virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos );
- virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos );
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos );
+ virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos );
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor );
- virtual Rectangle GetBulletArea( USHORT nPara );
+ virtual Rectangle GetBulletArea( sal_uInt16 nPara );
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
// belongs into class Outliner, move there before incompatible update!
Link aOutlinerNotifyHdl;
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 5921bbf3a4..c66cb7b25b 100644..100755
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -60,14 +60,14 @@ using namespace ::com::sun::star::linguistic2;
// ====================== Simple pass-through =======================
// ======================================================================
-void Outliner::SetUpdateMode( BOOL bUpdate )
+void Outliner::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetUpdateMode( bUpdate );
}
-BOOL Outliner::GetUpdateMode() const
+sal_Bool Outliner::GetUpdateMode() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetUpdateMode();
@@ -79,13 +79,13 @@ const SfxItemSet& Outliner::GetEmptyItemSet() const
return pEditEngine->GetEmptyItemSet();
}
-void Outliner::EnableUndo( BOOL bEnable )
+void Outliner::EnableUndo( sal_Bool bEnable )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->EnableUndo( bEnable );
}
-BOOL Outliner::IsUndoEnabled() const
+sal_Bool Outliner::IsUndoEnabled() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsUndoEnabled();
@@ -122,13 +122,13 @@ void Outliner::ClearModifyFlag()
pEditEngine->ClearModifyFlag();
}
-BOOL Outliner::IsModified() const
+sal_Bool Outliner::IsModified() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsModified();
}
-ULONG Outliner::GetTextHeight() const
+sal_uLong Outliner::GetTextHeight() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetTextHeight();
@@ -176,31 +176,31 @@ Link Outliner::GetStatusEventHdl() const
return pEditEngine->GetStatusEventHdl();
}
-void Outliner::SetDefTab( USHORT nTab )
+void Outliner::SetDefTab( sal_uInt16 nTab )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetDefTab( nTab );
}
-USHORT Outliner::GetDefTab() const
+sal_uInt16 Outliner::GetDefTab() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetDefTab();
}
-BOOL Outliner::IsFlatMode() const
+sal_Bool Outliner::IsFlatMode() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsFlatMode();
}
-BOOL Outliner::UpdateFields()
+sal_Bool Outliner::UpdateFields()
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->UpdateFields();
}
-void Outliner::RemoveFields( BOOL bKeepFieldText, TypeId aType )
+void Outliner::RemoveFields( sal_Bool bKeepFieldText, TypeId aType )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->RemoveFields( bKeepFieldText, aType );
@@ -218,7 +218,7 @@ String Outliner::GetWordDelimiters() const
return pEditEngine->GetWordDelimiters();
}
-String Outliner::GetWord( USHORT nPara, USHORT nIndex )
+String Outliner::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex )
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetWord( nPara, nIndex );
@@ -303,7 +303,7 @@ void Outliner::SetMaxAutoPaperSize( const Size& rSz )
pEditEngine->SetMaxAutoPaperSize( rSz );
}
-BOOL Outliner::IsExpanded( Paragraph* pPara ) const
+sal_Bool Outliner::IsExpanded( Paragraph* pPara ) const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->HasVisibleChilds( pPara );
@@ -315,7 +315,7 @@ Paragraph* Outliner::GetParent( Paragraph* pParagraph ) const
return pParaList->GetParent( pParagraph );
}
-ULONG Outliner::GetChildCount( Paragraph* pParent ) const
+sal_uLong Outliner::GetChildCount( Paragraph* pParent ) const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->GetChildCount( pParent );
@@ -330,7 +330,7 @@ Size Outliner::CalcTextSize()
Point Outliner::GetDocPos( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetDocPosTopLeft( (USHORT)pParaList->GetAbsPos( pPara ) );
+ return pEditEngine->GetDocPosTopLeft( (sal_uInt16)pParaList->GetAbsPos( pPara ) );
}
void Outliner::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
@@ -345,73 +345,73 @@ SfxStyleSheetPool* Outliner::GetStyleSheetPool()
return pEditEngine->GetStyleSheetPool();
}
-SfxStyleSheet* Outliner::GetStyleSheet( ULONG nPara )
+SfxStyleSheet* Outliner::GetStyleSheet( sal_uLong nPara )
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetStyleSheet( (USHORT)nPara );
+ return pEditEngine->GetStyleSheet( (sal_uInt16)nPara );
}
-BOOL Outliner::IsInSelectionMode() const
+sal_Bool Outliner::IsInSelectionMode() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsInSelectionMode();
}
-void Outliner::SetControlWord( ULONG nWord )
+void Outliner::SetControlWord( sal_uLong nWord )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetControlWord( nWord );
}
-ULONG Outliner::GetControlWord() const
+sal_uLong Outliner::GetControlWord() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetControlWord();
}
-void Outliner::SetAsianCompressionMode( USHORT n )
+void Outliner::SetAsianCompressionMode( sal_uInt16 n )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetAsianCompressionMode( n );
}
-USHORT Outliner::GetAsianCompressionMode() const
+sal_uInt16 Outliner::GetAsianCompressionMode() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetAsianCompressionMode();
}
-void Outliner::SetKernAsianPunctuation( BOOL b )
+void Outliner::SetKernAsianPunctuation( sal_Bool b )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetKernAsianPunctuation( b );
}
-BOOL Outliner::IsKernAsianPunctuation() const
+sal_Bool Outliner::IsKernAsianPunctuation() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsKernAsianPunctuation();
}
-void Outliner::SetAddExtLeading( BOOL bExtLeading )
+void Outliner::SetAddExtLeading( sal_Bool bExtLeading )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetAddExtLeading( bExtLeading );
}
-BOOL Outliner::IsAddExtLeading() const
+sal_Bool Outliner::IsAddExtLeading() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsAddExtLeading();
}
-void Outliner::UndoActionStart( USHORT nId )
+void Outliner::UndoActionStart( sal_uInt16 nId )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->UndoActionStart( nId );
}
-void Outliner::UndoActionEnd( USHORT nId )
+void Outliner::UndoActionEnd( sal_uInt16 nId )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->UndoActionEnd( nId );
@@ -420,34 +420,34 @@ void Outliner::UndoActionEnd( USHORT nId )
void Outliner::InsertUndo( EditUndo* pUndo )
{
DBG_CHKTHIS(Outliner,0);
- pEditEngine->GetUndoManager().AddUndoAction( pUndo, FALSE );
+ pEditEngine->GetUndoManager().AddUndoAction( pUndo, sal_False );
}
-BOOL Outliner::IsInUndo()
+sal_Bool Outliner::IsInUndo()
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsInUndo();
}
-ULONG Outliner::GetLineCount( ULONG nParagraph ) const
+sal_uLong Outliner::GetLineCount( sal_uLong nParagraph ) const
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetLineCount( (USHORT)nParagraph );
+ return pEditEngine->GetLineCount( (sal_uInt16)nParagraph );
}
-USHORT Outliner::GetLineLen( ULONG nParagraph, USHORT nLine ) const
+sal_uInt16 Outliner::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetLineLen( (USHORT)nParagraph, nLine );
+ return pEditEngine->GetLineLen( (sal_uInt16)nParagraph, nLine );
}
-ULONG Outliner::GetLineHeight( ULONG nParagraph, ULONG nLine )
+sal_uLong Outliner::GetLineHeight( sal_uLong nParagraph, sal_uLong nLine )
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetLineHeight( (USHORT)nParagraph, (USHORT)nLine );
+ return pEditEngine->GetLineHeight( (sal_uInt16)nParagraph, (sal_uInt16)nLine );
}
-void Outliner::QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich )
+void Outliner::QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->QuickRemoveCharAttribs( nPara, nWhich );
@@ -465,10 +465,10 @@ sal_Bool Outliner::HasConvertibleTextPortion( LanguageType nLang )
return pEditEngine->HasConvertibleTextPortion( nLang );
}
-BOOL Outliner::ConvertNextDocument()
+sal_Bool Outliner::ConvertNextDocument()
{
DBG_CHKTHIS(Outliner,0);
- return FALSE;
+ return sal_False;
}
void Outliner::SetDefaultLanguage( LanguageType eLang )
@@ -483,7 +483,7 @@ LanguageType Outliner::GetDefaultLanguage() const
return pEditEngine->GetDefaultLanguage();
}
-BOOL Outliner::HasOnlineSpellErrors() const
+sal_Bool Outliner::HasOnlineSpellErrors() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->HasOnlineSpellErrors();
@@ -495,7 +495,7 @@ void Outliner::CompleteOnlineSpelling()
pEditEngine->CompleteOnlineSpelling();
}
-BOOL Outliner::HasText( const SvxSearchItem& rSearchItem )
+sal_Bool Outliner::HasText( const SvxSearchItem& rSearchItem )
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->HasText( rSearchItem );
@@ -513,10 +513,10 @@ SfxItemPool* Outliner::GetEditTextObjectPool() const
return pEditEngine->GetEditTextObjectPool();
}
-BOOL Outliner::SpellNextDocument()
+sal_Bool Outliner::SpellNextDocument()
{
DBG_CHKTHIS(Outliner,0);
- return FALSE;
+ return sal_False;
}
@@ -562,16 +562,16 @@ OutputDevice* Outliner::GetRefDevice() const
return pEditEngine->GetRefDevice();
}
-USHORT Outliner::GetFirstLineOffset( ULONG nParagraph )
+sal_uInt16 Outliner::GetFirstLineOffset( sal_uLong nParagraph )
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetFirstLineOffset( (USHORT)nParagraph );
+ return pEditEngine->GetFirstLineOffset( (sal_uInt16)nParagraph );
}
-ULONG Outliner::GetTextHeight( ULONG nParagraph ) const
+sal_uLong Outliner::GetTextHeight( sal_uLong nParagraph ) const
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetTextHeight((USHORT)nParagraph );
+ return pEditEngine->GetTextHeight((sal_uInt16)nParagraph );
}
Point Outliner::GetDocPos( const Point& rPaperPos ) const
@@ -580,35 +580,35 @@ Point Outliner::GetDocPos( const Point& rPaperPos ) const
return pEditEngine->GetDocPos( rPaperPos );
}
-Point Outliner::GetDocPosTopLeft( ULONG nParagraph )
+Point Outliner::GetDocPosTopLeft( sal_uLong nParagraph )
{
DBG_CHKTHIS(Outliner,0);
- return pEditEngine->GetDocPosTopLeft( (USHORT)nParagraph );
+ return pEditEngine->GetDocPosTopLeft( (sal_uInt16)nParagraph );
}
-BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder )
+sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder )
{
return IsTextPos( rPaperPos, nBorder, NULL );
}
-BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBullet )
+sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBullet )
{
DBG_CHKTHIS(Outliner,0);
if ( pbBullet)
- *pbBullet = FALSE;
- BOOL bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder );
+ *pbBullet = sal_False;
+ sal_Bool bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder );
if ( !bTextPos )
{
Point aDocPos = GetDocPos( rPaperPos );
- USHORT nPara = pEditEngine->FindParagraph( aDocPos.Y() );
+ sal_uInt16 nPara = pEditEngine->FindParagraph( aDocPos.Y() );
if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) )
{
- Rectangle aBulArea = ImpCalcBulletArea( nPara, TRUE, TRUE );
+ Rectangle aBulArea = ImpCalcBulletArea( nPara, sal_True, sal_True );
if ( aBulArea.IsInside( rPaperPos ) )
{
- bTextPos = TRUE;
+ bTextPos = sal_True;
if ( pbBullet)
- *pbBullet = TRUE;
+ *pbBullet = sal_True;
}
}
}
@@ -624,50 +624,50 @@ void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel )
{
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
pEditEngine->QuickInsertText( rText, rSel );
}
void Outliner::QuickDelete( const ESelection& rSel )
{
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
pEditEngine->QuickDelete( rSel );
}
void Outliner::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
{
DBG_CHKTHIS(Outliner,0);
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
pEditEngine->QuickInsertField( rFld, rSel );
}
void Outliner::QuickInsertLineBreak( const ESelection& rSel )
{
DBG_CHKTHIS(Outliner,0);
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
pEditEngine->QuickInsertLineBreak( rSel );
}
-void Outliner::QuickFormatDoc( BOOL bFull )
+void Outliner::QuickFormatDoc( sal_Bool bFull )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->QuickFormatDoc( bFull );
}
-void Outliner::SetGlobalCharStretching( USHORT nX, USHORT nY )
+void Outliner::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetGlobalCharStretching( nX, nY );
}
-void Outliner::GetGlobalCharStretching( USHORT& rX, USHORT& rY )
+void Outliner::GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->GetGlobalCharStretching( rX, rY );
}
-void Outliner::DoStretchChars( USHORT nX, USHORT nY )
+void Outliner::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->DoStretchChars( nX, nY );
@@ -679,43 +679,43 @@ void Outliner::EraseVirtualDevice()
pEditEngine->EraseVirtualDevice();
}
-void Outliner::SetBigTextObjectStart( USHORT nStartAtPortionCount )
+void Outliner::SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetBigTextObjectStart( nStartAtPortionCount );
}
-USHORT Outliner::GetBigTextObjectStart() const
+sal_uInt16 Outliner::GetBigTextObjectStart() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetBigTextObjectStart();
}
-BOOL Outliner::ShouldCreateBigTextObject() const
+sal_Bool Outliner::ShouldCreateBigTextObject() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->ShouldCreateBigTextObject();
}
-void Outliner::SetVertical( BOOL b )
+void Outliner::SetVertical( sal_Bool b )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetVertical( b );
}
-BOOL Outliner::IsVertical() const
+sal_Bool Outliner::IsVertical() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsVertical();
}
-void Outliner::SetFixedCellHeight( BOOL bUseFixedCellHeight )
+void Outliner::SetFixedCellHeight( sal_Bool bUseFixedCellHeight )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetFixedCellHeight( bUseFixedCellHeight );
}
-BOOL Outliner::IsFixedCellHeight() const
+sal_Bool Outliner::IsFixedCellHeight() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsFixedCellHeight();
@@ -733,13 +733,13 @@ EEHorizontalTextDirection Outliner::GetDefaultHorizontalTextDirection() const
return pEditEngine->GetDefaultHorizontalTextDirection();
}
-USHORT Outliner::GetScriptType( const ESelection& rSelection ) const
+sal_uInt16 Outliner::GetScriptType( const ESelection& rSelection ) const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetScriptType( rSelection );
}
-LanguageType Outliner::GetLanguage( USHORT nPara, USHORT nPos ) const
+LanguageType Outliner::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetLanguage( nPara, nPos );
@@ -751,25 +751,25 @@ void Outliner::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemovePara
pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich );
}
-void Outliner::EnableAutoColor( BOOL b )
+void Outliner::EnableAutoColor( sal_Bool b )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->EnableAutoColor( b );
}
-BOOL Outliner::IsAutoColorEnabled() const
+sal_Bool Outliner::IsAutoColorEnabled() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsAutoColorEnabled();
}
-void Outliner::ForceAutoColor( BOOL b )
+void Outliner::ForceAutoColor( sal_Bool b )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->ForceAutoColor( b );
}
-BOOL Outliner::IsForceAutoColor() const
+sal_Bool Outliner::IsForceAutoColor() const
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->IsForceAutoColor();
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index b5cfad5c5b..3e0cc204fc 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -70,20 +70,20 @@ using ::std::advance;
#define DEFAULT_SCALE 75
-static const USHORT nDefStyles = 3; // Special treatment for the first 3 levels
-static const USHORT nDefBulletIndent = 800;
-static const USHORT nDefBulletWidth = 700;
-static const USHORT pDefBulletIndents[nDefStyles]= { 1400, 800, 800 };
-static const USHORT pDefBulletWidths[nDefStyles] = { 1000, 850, 700 };
+static const sal_uInt16 nDefStyles = 3; // Special treatment for the first 3 levels
+static const sal_uInt16 nDefBulletIndent = 800;
+static const sal_uInt16 nDefBulletWidth = 700;
+static const sal_uInt16 pDefBulletIndents[nDefStyles]= { 1400, 800, 800 };
+static const sal_uInt16 pDefBulletWidths[nDefStyles] = { 1000, 850, 700 };
-USHORT lcl_ImplGetDefBulletWidth( sal_Int16 nDepth )
+sal_uInt16 lcl_ImplGetDefBulletWidth( sal_Int16 nDepth )
{
return ( nDepth < nDefStyles ) ? pDefBulletWidths[nDepth] : nDefBulletWidth;
}
-USHORT lcl_ImplGetDefBulletIndent( sal_Int16 nDepth )
+sal_uInt16 lcl_ImplGetDefBulletIndent( sal_Int16 nDepth )
{
- USHORT nI = 0;
+ sal_uInt16 nI = 0;
if( nDepth >= 0 )
{
@@ -108,7 +108,7 @@ void Outliner::ImplCheckDepth( sal_Int16& rnDepth ) const
rnDepth = nMaxDepth;
}
-Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDepth)
+Paragraph* Outliner::Insert(const XubString& rText, sal_uLong nAbsPos, sal_Int16 nDepth)
{
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT(pParaList->GetParagraphCount(),"Insert:No Paras");
@@ -117,7 +117,7 @@ Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDe
ImplCheckDepth( nDepth );
- ULONG nParagraphCount = pParaList->GetParagraphCount();
+ sal_uLong nParagraphCount = pParaList->GetParagraphCount();
if( nAbsPos > nParagraphCount )
nAbsPos = nParagraphCount;
@@ -137,28 +137,28 @@ Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDe
}
else
{
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
- ImplBlockInsertionCallbacks( TRUE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
+ ImplBlockInsertionCallbacks( sal_True );
pPara = new Paragraph( nDepth );
pParaList->Insert( pPara, nAbsPos );
- pEditEngine->InsertParagraph( (USHORT)nAbsPos, String() );
+ pEditEngine->InsertParagraph( (sal_uInt16)nAbsPos, String() );
DBG_ASSERT(pPara==pParaList->GetParagraph(nAbsPos),"Insert:Failed");
- ImplInitDepth( (USHORT)nAbsPos, nDepth, FALSE );
+ ImplInitDepth( (sal_uInt16)nAbsPos, nDepth, sal_False );
pHdlParagraph = pPara;
ParagraphInsertedHdl();
pPara->nFlags |= PARAFLAG_HOLDDEPTH;
SetText( rText, pPara );
- ImplBlockInsertionCallbacks( FALSE );
+ ImplBlockInsertionCallbacks( sal_False );
pEditEngine->SetUpdateMode( bUpdate );
}
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
DBG_ASSERT(pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(),"SetText failed");
return pPara;
}
-void Outliner::ParagraphInserted( USHORT nPara )
+void Outliner::ParagraphInserted( sal_uInt16 nPara )
{
DBG_CHKTHIS(Outliner,0);
@@ -172,7 +172,7 @@ void Outliner::ParagraphInserted( USHORT nPara )
if( pEditEngine->IsInUndo() )
{
pPara->nFlags = PARAFLAG_SETBULLETTEXT;
- pPara->bVisible = TRUE;
+ pPara->bVisible = sal_True;
const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
pPara->SetDepth( rLevel.GetValue() );
}
@@ -189,14 +189,14 @@ void Outliner::ParagraphInserted( USHORT nPara )
if( !pEditEngine->IsInUndo() )
{
- ImplCalcBulletText( nPara, TRUE, FALSE );
+ ImplCalcBulletText( nPara, sal_True, sal_False );
pHdlParagraph = pPara;
ParagraphInsertedHdl();
}
}
}
-void Outliner::ParagraphDeleted( USHORT nPara )
+void Outliner::ParagraphDeleted( sal_uInt16 nPara )
{
DBG_CHKTHIS(Outliner,0);
@@ -223,24 +223,24 @@ void Outliner::ParagraphDeleted( USHORT nPara )
pPara = pParaList->GetParagraph( nPara );
if ( pPara && ( pPara->GetDepth() > nDepth ) )
{
- ImplCalcBulletText( nPara, TRUE, FALSE );
+ ImplCalcBulletText( nPara, sal_True, sal_False );
// Search for next on the this level ...
while ( pPara && pPara->GetDepth() > nDepth )
pPara = pParaList->GetParagraph( ++nPara );
}
if ( pPara && ( pPara->GetDepth() == nDepth ) )
- ImplCalcBulletText( nPara, TRUE, FALSE );
+ ImplCalcBulletText( nPara, sal_True, sal_False );
}
}
-void Outliner::Init( USHORT nMode )
+void Outliner::Init( sal_uInt16 nMode )
{
nOutlinerMode = nMode;
Clear();
- ULONG nCtrl = pEditEngine->GetControlWord();
+ sal_uLong nCtrl = pEditEngine->GetControlWord();
nCtrl &= ~(EE_CNTRL_OUTLINER|EE_CNTRL_OUTLINER2);
SetMaxDepth( 9 );
@@ -263,12 +263,12 @@ void Outliner::Init( USHORT nMode )
pEditEngine->SetControlWord( nCtrl );
- ImplInitDepth( 0, GetMinDepth(), FALSE );
+ ImplInitDepth( 0, GetMinDepth(), sal_False );
GetUndoManager().Clear();
}
-void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs )
+void Outliner::SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParagraphs )
{
if( nMaxDepth != nDepth )
{
@@ -276,8 +276,8 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs )
if( bCheckParagraphs )
{
- USHORT nParagraphs = (USHORT)pParaList->GetParagraphCount();
- for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ sal_uInt16 nParagraphs = (sal_uInt16)pParaList->GetParagraphCount();
+ for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if( pPara && pPara->GetDepth() > nMaxDepth )
@@ -289,7 +289,7 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs )
}
}
-sal_Int16 Outliner::GetDepth( ULONG nPara ) const
+sal_Int16 Outliner::GetDepth( sal_uLong nPara ) const
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::GetDepth - Paragraph not found!" );
@@ -308,9 +308,9 @@ void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth )
mnDepthChangeHdlPrevFlags = pPara->nFlags;
pHdlParagraph = pPara;
- USHORT nPara = (USHORT)GetAbsPos( pPara );
- ImplInitDepth( nPara, nNewDepth, TRUE );
- ImplCalcBulletText( nPara, FALSE, FALSE );
+ sal_uInt16 nPara = (sal_uInt16)GetAbsPos( pPara );
+ ImplInitDepth( nPara, nNewDepth, sal_True );
+ ImplCalcBulletText( nPara, sal_False, sal_False );
if ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
ImplSetLevelDependendStyleSheet( nPara );
@@ -341,7 +341,7 @@ void Outliner::SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingSta
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
- ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) );
+ ImplCheckParagraphs( nPara, (sal_uInt16) (pParaList->GetParagraphCount()) );
pEditEngine->SetModified();
}
}
@@ -368,18 +368,18 @@ void Outliner::SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumb
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
- ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) );
+ ImplCheckParagraphs( nPara, (sal_uInt16) (pParaList->GetParagraphCount()) );
pEditEngine->SetModified();
}
}
-OutlinerParaObject* Outliner::CreateParaObject( USHORT nStartPara, USHORT nCount ) const
+OutlinerParaObject* Outliner::CreateParaObject( sal_uInt16 nStartPara, sal_uInt16 nCount ) const
{
DBG_CHKTHIS(Outliner,0);
- if ( sal::static_int_cast< ULONG >( nStartPara + nCount ) >
+ if ( sal::static_int_cast< sal_uLong >( nStartPara + nCount ) >
pParaList->GetParagraphCount() )
- nCount = sal::static_int_cast< USHORT >(
+ nCount = sal::static_int_cast< sal_uInt16 >(
pParaList->GetParagraphCount() - nStartPara );
// When a new OutlinerParaObject is created because a paragraph is just beeing deleted,
@@ -412,16 +412,16 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT(pPara,"SetText:No Para");
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
- ImplBlockInsertionCallbacks( TRUE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
+ ImplBlockInsertionCallbacks( sal_True );
- USHORT nPara = (USHORT)pParaList->GetAbsPos( pPara );
+ sal_uInt16 nPara = (sal_uInt16)pParaList->GetAbsPos( pPara );
if( !rText.Len() )
{
pEditEngine->SetText( nPara, rText );
- ImplInitDepth( nPara, pPara->GetDepth(), FALSE );
+ ImplInitDepth( nPara, pPara->GetDepth(), sal_False );
}
else
{
@@ -431,9 +431,9 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
if( aText.GetChar( aText.Len()-1 ) == '\x0A' )
aText.Erase( aText.Len()-1, 1 ); // Delete the last break
- USHORT nCount = aText.GetTokenCount( '\x0A' );
- USHORT nPos = 0;
- USHORT nInsPos = nPara+1;
+ sal_uInt16 nCount = aText.GetTokenCount( '\x0A' );
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nInsPos = nPara+1;
while( nCount > nPos )
{
XubString aStr = aText.GetToken( nPos, '\x0A' );
@@ -453,7 +453,7 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) )
{
// Extract Tabs
- USHORT nTabs = 0;
+ sal_uInt16 nTabs = 0;
while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) )
nTabs++;
if ( nTabs )
@@ -480,15 +480,15 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
nInsPos--;
pEditEngine->SetText( nInsPos, aStr );
}
- ImplInitDepth( nInsPos, nCurDepth, FALSE );
+ ImplInitDepth( nInsPos, nCurDepth, sal_False );
nInsPos++;
nPos++;
}
}
DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"SetText failed!");
- bFirstParaIsEmpty = FALSE;
- ImplBlockInsertionCallbacks( FALSE );
+ bFirstParaIsEmpty = sal_False;
+ ImplBlockInsertionCallbacks( sal_False );
pEditEngine->SetUpdateMode( bUpdate );
}
@@ -499,7 +499,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
DBG_CHKTHIS(Outliner,0);
bool bConverted = false;
- USHORT nTabs = 0;
+ sal_uInt16 nTabs = 0;
ESelection aDelSel;
// const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (sal_uInt16)nPara );
@@ -509,16 +509,16 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
XubString aHeading_US( RTL_CONSTASCII_USTRINGPARAM( "heading" ) );
XubString aNumber_US( RTL_CONSTASCII_USTRINGPARAM( "Numbering" ) );
- XubString aStr( pEditEngine->GetText( (USHORT)nPara ) );
+ XubString aStr( pEditEngine->GetText( (sal_uInt16)nPara ) );
xub_Unicode* pPtr = (xub_Unicode*)aStr.GetBuffer();
- USHORT nHeadingNumberStart = 0;
- USHORT nNumberingNumberStart = 0;
- SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (USHORT)nPara );
+ sal_uInt16 nHeadingNumberStart = 0;
+ sal_uInt16 nNumberingNumberStart = 0;
+ SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (sal_uInt16)nPara );
if( pStyle )
{
aName = pStyle->GetName();
- USHORT nSearch;
+ sal_uInt16 nSearch;
if ( ( nSearch = aName.Search( aHeading_US ) ) != STRING_NOTFOUND )
nHeadingNumberStart = nSearch + aHeading_US.Len();
else if ( ( nSearch = aName.Search( aNumber_US ) ) != STRING_NOTFOUND )
@@ -532,16 +532,16 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
( pPtr[0] != '\t' ) && ( pPtr[1] == '\t' ) )
{
// Extract Bullet and Tab
- aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, 2 );
+ aDelSel = ESelection( (sal_uInt16)nPara, 0, (sal_uInt16)nPara, 2 );
}
- USHORT nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart;
+ sal_uInt16 nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart;
String aLevel = aName.Copy( nPos );
aLevel.EraseLeadingChars( ' ' );
- nTabs = sal::static_int_cast< USHORT >(aLevel.ToInt32());
+ nTabs = sal::static_int_cast< sal_uInt16 >(aLevel.ToInt32());
if( nTabs )
nTabs--; // Level 0 = "heading 1"
- bConverted = TRUE;
+ bConverted = sal_True;
}
else
{
@@ -553,7 +553,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
}
// Remove tabs from the text
if( nTabs )
- aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, nTabs );
+ aDelSel = ESelection( (sal_uInt16)nPara, 0, (sal_uInt16)nPara, nTabs );
}
if ( aDelSel.HasRange() )
@@ -571,7 +571,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
sal_Int16 nOutlLevel = rLevel.GetValue();
ImplCheckDepth( nOutlLevel );
- ImplInitDepth( sal::static_int_cast< sal_uInt16 >(nPara), nOutlLevel, FALSE );
+ ImplInitDepth( sal::static_int_cast< sal_uInt16 >(nPara), nOutlLevel, sal_False );
return bConverted;
}
@@ -580,25 +580,25 @@ void Outliner::SetText( const OutlinerParaObject& rPObj )
{
DBG_CHKTHIS(Outliner,0);
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
- BOOL bUndo = pEditEngine->IsUndoEnabled();
- EnableUndo( FALSE );
+ sal_Bool bUndo = pEditEngine->IsUndoEnabled();
+ EnableUndo( sal_False );
Init( rPObj.GetOutlinerMode() );
- ImplBlockInsertionCallbacks( TRUE );
+ ImplBlockInsertionCallbacks( sal_True );
pEditEngine->SetText(rPObj.GetTextObject());
if( rPObj.Count() != pEditEngine->GetParagraphCount() )
{
int nop=0;nop++;
}
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
- pParaList->Clear( TRUE );
- for( USHORT nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ )
+ pParaList->Clear( sal_True );
+ for( sal_uInt16 nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ )
{
Paragraph* pPara = new Paragraph( rPObj.GetParagraphData(nCurPara));
ImplCheckDepth( pPara->nDepth );
@@ -610,10 +610,10 @@ void Outliner::SetText( const OutlinerParaObject& rPObj )
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
- ImplCheckParagraphs( 0, (USHORT) (pParaList->GetParagraphCount()) );
+ ImplCheckParagraphs( 0, (sal_uInt16) (pParaList->GetParagraphCount()) );
EnableUndo( bUndo );
- ImplBlockInsertionCallbacks( FALSE );
+ ImplBlockInsertionCallbacks( sal_False );
pEditEngine->SetUpdateMode( bUpdate );
DBG_ASSERT( pParaList->GetParagraphCount()==rPObj.Count(),"SetText failed");
@@ -625,14 +625,14 @@ void Outliner::AddText( const OutlinerParaObject& rPObj )
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara;
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
- ImplBlockInsertionCallbacks( TRUE );
- ULONG nPara;
+ ImplBlockInsertionCallbacks( sal_True );
+ sal_uLong nPara;
if( bFirstParaIsEmpty )
{
- pParaList->Clear( TRUE );
+ pParaList->Clear( sal_True );
pEditEngine->SetText(rPObj.GetTextObject());
nPara = 0;
}
@@ -641,53 +641,53 @@ void Outliner::AddText( const OutlinerParaObject& rPObj )
nPara = pParaList->GetParagraphCount();
pEditEngine->InsertParagraph( EE_PARA_APPEND, rPObj.GetTextObject() );
}
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
- for( USHORT n = 0; n < rPObj.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rPObj.Count(); n++ )
{
pPara = new Paragraph( rPObj.GetParagraphData(n) );
pParaList->Append(pPara);
- USHORT nP = sal::static_int_cast< USHORT >(nPara+n);
+ sal_uInt16 nP = sal::static_int_cast< sal_uInt16 >(nPara+n);
DBG_ASSERT(pParaList->GetAbsPos(pPara)==nP,"AddText:Out of sync");
- ImplInitDepth( nP, pPara->GetDepth(), FALSE );
+ ImplInitDepth( nP, pPara->GetDepth(), sal_False );
}
DBG_ASSERT( pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(), "SetText: OutOfSync" );
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
- ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pParaList->GetParagraphCount()) );
+ ImplCheckParagraphs( (sal_uInt16)nPara, (sal_uInt16) (pParaList->GetParagraphCount()) );
- ImplBlockInsertionCallbacks( FALSE );
+ ImplBlockInsertionCallbacks( sal_False );
pEditEngine->SetUpdateMode( bUpdate );
}
-void Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+void Outliner::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos )
{
DBG_CHKTHIS(Outliner,0);
if ( aFieldClickedHdl.IsSet() )
{
EditFieldInfo aFldInfo( this, rField, nPara, nPos );
- aFldInfo.SetSimpleClick( TRUE );
+ aFldInfo.SetSimpleClick( sal_True );
aFieldClickedHdl.Call( &aFldInfo );
}
}
-void Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+void Outliner::FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos )
{
DBG_CHKTHIS(Outliner,0);
if ( !aFieldClickedHdl.IsSet() )
return;
EditFieldInfo aFldInfo( this, rField, nPara, nPos );
- aFldInfo.SetSimpleClick( FALSE );
+ aFldInfo.SetSimpleClick( sal_False );
aFieldClickedHdl.Call( &aFldInfo );
}
-XubString Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
DBG_CHKTHIS(Outliner,0);
if ( !aCalcFieldValueHdl.IsSet() )
@@ -711,19 +711,19 @@ XubString Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, US
return aFldInfo.GetRepresentation();
}
-void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle )
+void Outliner::SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle )
{
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
{
- pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle );
+ pEditEngine->SetStyleSheet( (sal_uInt16)nPara, pStyle );
pPara->nFlags |= PARAFLAG_SETBULLETTEXT;
- ImplCheckNumBulletItem( (USHORT) nPara );
+ ImplCheckNumBulletItem( (sal_uInt16) nPara );
}
}
-void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible )
+void Outliner::SetVisible( Paragraph* pPara, sal_Bool bVisible )
{
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT( pPara, "SetVisible: pPara = NULL" );
@@ -731,19 +731,19 @@ void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible )
if (pPara)
{
pPara->bVisible = bVisible;
- ULONG nPara = pParaList->GetAbsPos( pPara );
- pEditEngine->ShowParagraph( (USHORT)nPara, bVisible );
+ sal_uLong nPara = pParaList->GetAbsPos( pPara );
+ pEditEngine->ShowParagraph( (sal_uInt16)nPara, bVisible );
}
}
-void Outliner::ImplCheckNumBulletItem( USHORT nPara )
+void Outliner::ImplCheckNumBulletItem( sal_uInt16 nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
pPara->aBulSize.Width() = -1;
}
-void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle )
+void Outliner::ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle )
{
DBG_CHKTHIS(Outliner,0);
@@ -778,7 +778,7 @@ void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLe
}
}
-void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction )
+void Outliner::ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction )
{
DBG_CHKTHIS(Outliner,0);
@@ -794,10 +794,10 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo,
// the old values are restored by the EditEngine.
if( !IsInUndo() )
{
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
- BOOL bUndo = bCreateUndo && IsUndoEnabled();
+ sal_Bool bUndo = bCreateUndo && IsUndoEnabled();
if ( bUndo && bUndoAction )
UndoActionStart( OLUNDO_DEPTH );
@@ -805,7 +805,7 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo,
aAttrs.Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nDepth ) );
pEditEngine->SetParaAttribs( nPara, aAttrs );
ImplCheckNumBulletItem( nPara );
- ImplCalcBulletText( nPara, FALSE, FALSE );
+ ImplCalcBulletText( nPara, sal_False, sal_False );
if ( bUndo )
{
@@ -818,30 +818,30 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo,
}
}
-void Outliner::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void Outliner::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetParaAttribs( nPara, rSet );
}
-BOOL Outliner::Expand( Paragraph* pPara )
+sal_Bool Outliner::Expand( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
if ( pParaList->HasHiddenChilds( pPara ) )
{
OLUndoExpand* pUndo = 0;
- BOOL bUndo = IsUndoEnabled() && !IsInUndo();
+ sal_Bool bUndo = IsUndoEnabled() && !IsInUndo();
if( bUndo )
{
UndoActionStart( OLUNDO_EXPAND );
pUndo = new OLUndoExpand( this, OLUNDO_EXPAND );
pUndo->pParas = 0;
- pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara );
+ pUndo->nCount = (sal_uInt16)pParaList->GetAbsPos( pPara );
}
pHdlParagraph = pPara;
- bIsExpanding = TRUE;
+ bIsExpanding = sal_True;
pParaList->Expand( pPara );
ExpandHdl();
InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) );
@@ -850,32 +850,32 @@ BOOL Outliner::Expand( Paragraph* pPara )
InsertUndo( pUndo );
UndoActionEnd( OLUNDO_EXPAND );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL Outliner::Collapse( Paragraph* pPara )
+sal_Bool Outliner::Collapse( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
if ( pParaList->HasVisibleChilds( pPara ) ) // expanded
{
OLUndoExpand* pUndo = 0;
- BOOL bUndo = FALSE;
+ sal_Bool bUndo = sal_False;
if( !IsInUndo() && IsUndoEnabled() )
- bUndo = TRUE;
+ bUndo = sal_True;
if( bUndo )
{
UndoActionStart( OLUNDO_COLLAPSE );
pUndo = new OLUndoExpand( this, OLUNDO_COLLAPSE );
pUndo->pParas = 0;
- pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara );
+ pUndo->nCount = (sal_uInt16)pParaList->GetAbsPos( pPara );
}
pHdlParagraph = pPara;
- bIsExpanding = FALSE;
+ bIsExpanding = sal_False;
pParaList->Collapse( pPara );
ExpandHdl();
InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) );
@@ -884,13 +884,13 @@ BOOL Outliner::Collapse( Paragraph* pPara )
InsertUndo( pUndo );
UndoActionEnd( OLUNDO_COLLAPSE );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
+Font Outliner::ImpCalcBulletFont( sal_uInt16 nPara ) const
{
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" );
@@ -922,17 +922,17 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
}
// Use original scale...
- USHORT nStretchX, nStretchY;
+ sal_uInt16 nStretchX, nStretchY;
const_cast<Outliner*>(this)->GetGlobalCharStretching(nStretchX, nStretchY);
- USHORT nScale = pFmt->GetBulletRelSize() * nStretchY / 100;
- ULONG nScaledLineHeight = aStdFont.GetSize().Height();
+ sal_uInt16 nScale = pFmt->GetBulletRelSize() * nStretchY / 100;
+ sal_uLong nScaledLineHeight = aStdFont.GetSize().Height();
nScaledLineHeight *= nScale*10;
nScaledLineHeight /= 1000;
aBulletFont.SetAlign( ALIGN_BOTTOM );
aBulletFont.SetSize( Size( 0, nScaledLineHeight ) );
- BOOL bVertical = IsVertical();
+ sal_Bool bVertical = IsVertical();
aBulletFont.SetVertical( bVertical );
aBulletFont.SetOrientation( bVertical ? 2700 : 0 );
@@ -949,7 +949,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
return aBulletFont;
}
-void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
+void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
{
DBG_CHKTHIS(Outliner,0);
@@ -963,12 +963,12 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
if ( ImplHasBullet( nPara ) && bDrawBullet)
{
- BOOL bVertical = IsVertical();
+ sal_Bool bVertical = IsVertical();
- BOOL bRightToLeftPara = pEditEngine->IsRightToLeft( nPara );
+ sal_Bool bRightToLeftPara = pEditEngine->IsRightToLeft( nPara );
- Rectangle aBulletArea( ImpCalcBulletArea( nPara, TRUE, FALSE ) );
- USHORT nStretchX, nStretchY;
+ Rectangle aBulletArea( ImpCalcBulletArea( nPara, sal_True, sal_False ) );
+ sal_uInt16 nStretchX, nStretchY;
GetGlobalCharStretching(nStretchX, nStretchY);
aBulletArea = Rectangle( Point(aBulletArea.Left()*nStretchX/100,
aBulletArea.Top()),
@@ -983,7 +983,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
{
Font aBulletFont( ImpCalcBulletFont( nPara ) );
// Use baseline
- BOOL bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL;
+ sal_Bool bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL;
aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE );
Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( aBulletFont );
@@ -1028,7 +1028,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
}
// VCL will take care of brackets and so on...
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
if ( bRightToLeftPara )
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL;
@@ -1136,15 +1136,15 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
}
}
-void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara )
+void Outliner::InvalidateBullet( Paragraph* /*pPara*/, sal_uLong nPara )
{
DBG_CHKTHIS(Outliner,0);
- long nLineHeight = (long)pEditEngine->GetLineHeight((USHORT)nPara );
+ long nLineHeight = (long)pEditEngine->GetLineHeight((sal_uInt16)nPara );
for ( size_t i = 0, n = aViewList.size(); i < n; ++i )
{
OutlinerView* pView = aViewList[ i ];
- Point aPos( pView->pEditView->GetWindowPosTopLeft((USHORT)nPara ) );
+ Point aPos( pView->pEditView->GetWindowPosTopLeft((sal_uInt16)nPara ) );
Rectangle aRect( pView->GetOutputArea() );
aRect.Right() = aPos.X();
aRect.Top() = aPos.Y();
@@ -1155,26 +1155,26 @@ void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara )
}
}
-ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, SvKeyValueIterator* pHTTPHeaderAttrs )
+sal_uLong Outliner::Read( SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat, SvKeyValueIterator* pHTTPHeaderAttrs )
{
DBG_CHKTHIS(Outliner,0);
- BOOL bOldUndo = pEditEngine->IsUndoEnabled();
- EnableUndo( FALSE );
+ sal_Bool bOldUndo = pEditEngine->IsUndoEnabled();
+ EnableUndo( sal_False );
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
Clear();
- ImplBlockInsertionCallbacks( TRUE );
- ULONG nRet = pEditEngine->Read( rInput, rBaseURL, (EETextFormat)eFormat, pHTTPHeaderAttrs );
+ ImplBlockInsertionCallbacks( sal_True );
+ sal_uLong nRet = pEditEngine->Read( rInput, rBaseURL, (EETextFormat)eFormat, pHTTPHeaderAttrs );
- bFirstParaIsEmpty = FALSE;
+ bFirstParaIsEmpty = sal_False;
- USHORT nParas = pEditEngine->GetParagraphCount();
- pParaList->Clear( TRUE );
- USHORT n;
+ sal_uInt16 nParas = pEditEngine->GetParagraphCount();
+ pParaList->Clear( sal_True );
+ sal_uInt16 n;
for ( n = 0; n < nParas; n++ )
{
Paragraph* pPara = new Paragraph( 0 );
@@ -1185,7 +1185,7 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat,
const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( n );
const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
sal_Int16 nDepth = rLevel.GetValue();
- ImplInitDepth( n, nDepth, FALSE );
+ ImplInitDepth( n, nDepth, sal_False );
}
}
@@ -1194,7 +1194,7 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat,
ImpFilterIndents( 0, nParas-1 );
}
- ImplBlockInsertionCallbacks( FALSE );
+ ImplBlockInsertionCallbacks( sal_False );
pEditEngine->SetUpdateMode( bUpdate );
EnableUndo( bOldUndo );
@@ -1202,15 +1202,15 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat,
}
-void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara )
+void Outliner::ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara )
{
DBG_CHKTHIS(Outliner,0);
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
Paragraph* pLastConverted = NULL;
- for( ULONG nPara = nFirstPara; nPara <= nLastPara; nPara++ )
+ for( sal_uLong nPara = nFirstPara; nPara <= nLastPara; nPara++ )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
@@ -1225,27 +1225,27 @@ void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara )
pPara->SetDepth( pLastConverted->GetDepth() );
}
- ImplInitDepth( (USHORT)nPara, pPara->GetDepth(), FALSE );
+ ImplInitDepth( (sal_uInt16)nPara, pPara->GetDepth(), sal_False );
}
}
pEditEngine->SetUpdateMode( bUpdate );
}
-SfxUndoManager& Outliner::GetUndoManager()
+::svl::IUndoManager& Outliner::GetUndoManager()
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetUndoManager();
}
-void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount )
+void Outliner::ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount )
{
DBG_CHKTHIS(Outliner,0);
- BOOL bUpdate = pEditEngine->GetUpdateMode();
- pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( sal_False );
- const ULONG nStart = nStartPara;
+ const sal_uLong nStart = nStartPara;
Paragraph* pPara = pParaList->GetParagraph( nStartPara );
@@ -1270,14 +1270,14 @@ void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount )
else // EditEngine mode
{
sal_Int16 nDepth = -1;
- const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (USHORT)nStartPara );
+ const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (sal_uInt16)nStartPara );
if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SFX_ITEM_ON )
{
const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
nDepth = rLevel.GetValue();
}
if ( nDepth != GetDepth( nStartPara ) )
- ImplInitDepth( (USHORT)nStartPara, nDepth, FALSE );
+ ImplInitDepth( (sal_uInt16)nStartPara, nDepth, sal_False );
}
nCount--;
@@ -1298,7 +1298,7 @@ long Outliner::IndentingPagesHdl( OutlinerView* pView )
return aIndentingPagesHdl.Call( pView );
}
-BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
+sal_Bool Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
{
DBG_CHKTHIS(Outliner,0);
// The selected pages must already be set in advance through
@@ -1309,32 +1309,32 @@ BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) )
{
if ( nDepthChangedHdlPrevDepth == 1 ) // is the only page
- return FALSE;
+ return sal_False;
else
- pCurView->ImpCalcSelectedPages( FALSE ); // without the first
+ pCurView->ImpCalcSelectedPages( sal_False ); // without the first
}
- return (BOOL)IndentingPagesHdl( pCurView );
+ return (sal_Bool)IndentingPagesHdl( pCurView );
}
-BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView )
+sal_Bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView )
{
DBG_CHKTHIS(Outliner,0);
// The selected pages must already be set in advance through
// ImpCalcSelectedPages
- return (BOOL)RemovingPagesHdl( pCurView );
+ return (sal_Bool)RemovingPagesHdl( pCurView );
}
-Outliner::Outliner( SfxItemPool* pPool, USHORT nMode )
+Outliner::Outliner( SfxItemPool* pPool, sal_uInt16 nMode )
: nMinDepth( -1 )
{
DBG_CTOR( Outliner, 0 );
- bStrippingPortions = FALSE;
- bPasting = FALSE;
+ bStrippingPortions = sal_False;
+ bPasting = sal_False;
nFirstPage = 1;
- bBlockInsCallback = FALSE;
+ bBlockInsCallback = sal_False;
nMaxDepth = 9;
@@ -1342,7 +1342,7 @@ Outliner::Outliner( SfxItemPool* pPool, USHORT nMode )
pParaList->SetVisibleStateChangedHdl( LINK( this, Outliner, ParaVisibleStateChangedHdl ) );
Paragraph* pPara = new Paragraph( 0 );
pParaList->Append(pPara);
- bFirstParaIsEmpty = TRUE;
+ bFirstParaIsEmpty = sal_True;
pEditEngine = new OutlinerEditEng( this, pPool );
pEditEngine->SetBeginMovingParagraphsHdl( LINK( this, Outliner, BeginMovingParagraphsHdl ) );
@@ -1357,7 +1357,7 @@ Outliner::~Outliner()
{
DBG_DTOR(Outliner,0);
- pParaList->Clear( TRUE );
+ pParaList->Clear( sal_True );
delete pParaList;
delete pEditEngine;
}
@@ -1378,7 +1378,7 @@ size_t Outliner::InsertView( OutlinerView* pView, size_t nIndex )
advance( it, nIndex );
ActualIndex = nIndex;
}
- pEditEngine->InsertView( pView->pEditView, (USHORT)nIndex );
+ pEditEngine->InsertView( pView->pEditView, (sal_uInt16)nIndex );
return ActualIndex;
}
@@ -1403,10 +1403,10 @@ OutlinerView* Outliner::RemoveView( size_t nIndex )
{
DBG_CHKTHIS(Outliner,0);
- EditView* pEditView = pEditEngine->GetView( (USHORT)nIndex );
+ EditView* pEditView = pEditEngine->GetView( (sal_uInt16)nIndex );
pEditView->HideCursor(); // HACK
- pEditEngine->RemoveView( (USHORT)nIndex );
+ pEditEngine->RemoveView( (sal_uInt16)nIndex );
{
ViewList::iterator it = aViewList.begin();
@@ -1454,37 +1454,37 @@ void Outliner::DepthChangedHdl()
}
-ULONG Outliner::GetAbsPos( Paragraph* pPara )
+sal_uLong Outliner::GetAbsPos( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT(pPara,"GetAbsPos:No Para");
return pParaList->GetAbsPos( pPara );
}
-ULONG Outliner::GetParagraphCount() const
+sal_uLong Outliner::GetParagraphCount() const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->GetParagraphCount();
}
-Paragraph* Outliner::GetParagraph( ULONG nAbsPos ) const
+Paragraph* Outliner::GetParagraph( sal_uLong nAbsPos ) const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->GetParagraph( nAbsPos );
}
-BOOL Outliner::HasChilds( Paragraph* pParagraph ) const
+sal_Bool Outliner::HasChilds( Paragraph* pParagraph ) const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->HasChilds( pParagraph );
}
-BOOL Outliner::ImplHasBullet( USHORT nPara ) const
+sal_Bool Outliner::ImplHasBullet( sal_uInt16 nPara ) const
{
return GetNumberFormat(nPara) != 0;
}
-const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const
+const SvxNumberFormat* Outliner::GetNumberFormat( sal_uInt16 nPara ) const
{
const SvxNumberFormat* pFmt = NULL;
@@ -1504,7 +1504,7 @@ const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const
return pFmt;
}
-Size Outliner::ImplGetBulletSize( USHORT nPara )
+Size Outliner::ImplGetBulletSize( sal_uInt16 nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (!pPara)
@@ -1539,19 +1539,19 @@ Size Outliner::ImplGetBulletSize( USHORT nPara )
return pPara->aBulSize;
}
-void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd )
+void Outliner::ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd )
{
DBG_CHKTHIS( Outliner, 0 );
// i100014#
// assure that the following for-loop does not loop forever
- for ( USHORT n = nStart; n < nEnd; n++ )
+ for ( sal_uInt16 n = nStart; n < nEnd; n++ )
{
Paragraph* pPara = pParaList->GetParagraph( n );
if (pPara)
{
pPara->Invalidate();
- ImplCalcBulletText( n, FALSE, FALSE );
+ ImplCalcBulletText( n, sal_False, sal_False );
}
}
}
@@ -1560,14 +1560,14 @@ void Outliner::SetRefDevice( OutputDevice* pRefDev )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetRefDevice( pRefDev );
- for ( USHORT n = (USHORT) pParaList->GetParagraphCount(); n; )
+ for ( sal_uInt16 n = (sal_uInt16) pParaList->GetParagraphCount(); n; )
{
Paragraph* pPara = pParaList->GetParagraph( --n );
pPara->Invalidate();
}
}
-void Outliner::ParaAttribsChanged( USHORT nPara )
+void Outliner::ParaAttribsChanged( sal_uInt16 nPara )
{
DBG_CHKTHIS(Outliner,0);
@@ -1584,7 +1584,7 @@ void Outliner::ParaAttribsChanged( USHORT nPara )
if ( pPara && pPara->GetDepth() != rLevel.GetValue() )
{
pPara->SetDepth( rLevel.GetValue() );
- ImplCalcBulletText( nPara, TRUE, TRUE );
+ ImplCalcBulletText( nPara, sal_True, sal_True );
}
}
}
@@ -1598,13 +1598,13 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
// Here all the paragraphs, which had the said template, used to be
// hunted by a ImpRecalcParaAttribs, why?
// => only the Bullet-representation can really change...
- USHORT nParas = (USHORT)pParaList->GetParagraphCount();
- for( USHORT nPara = 0; nPara < nParas; nPara++ )
+ sal_uInt16 nParas = (sal_uInt16)pParaList->GetParagraphCount();
+ for( sal_uInt16 nPara = 0; nPara < nParas; nPara++ )
{
if ( pEditEngine->GetStyleSheet( nPara ) == pStyle )
{
ImplCheckNumBulletItem( nPara );
- ImplCalcBulletText( nPara, FALSE, FALSE );
+ ImplCalcBulletText( nPara, sal_False, sal_False );
// EditEngine formats changed paragraphs before calling this method,
// so they are not reformatted now and use wrong bullet indent
pEditEngine->QuickMarkInvalid( ESelection( nPara, 0, nPara, 0 ) );
@@ -1612,7 +1612,7 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
}
}
-Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos )
+Rectangle Outliner::ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos )
{
// Bullet area within the paragraph ...
Rectangle aBulletArea;
@@ -1623,7 +1623,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
Point aTopLeft;
Size aBulletSize( ImplGetBulletSize( nPara ) );
- BOOL bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0;
+ sal_Bool bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0;
// the ODF attribut text:space-before which holds the spacing to add to the left of the label
const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset();
@@ -1720,7 +1720,7 @@ void Outliner::ExpandHdl()
aExpandHdl.Call( this );
}
-EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
+EBulletInfo Outliner::GetBulletInfo( sal_uInt16 nPara )
{
EBulletInfo aInfo;
@@ -1747,53 +1747,53 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
if ( aInfo.bVisible )
{
- aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE );
+ aInfo.aBounds = ImpCalcBulletArea( nPara, sal_True, sal_True );
}
return aInfo;
}
-XubString Outliner::GetText( Paragraph* pParagraph, ULONG nCount ) const
+XubString Outliner::GetText( Paragraph* pParagraph, sal_uLong nCount ) const
{
DBG_CHKTHIS(Outliner,0);
XubString aText;
- USHORT nStartPara = (USHORT) pParaList->GetAbsPos( pParagraph );
- for ( USHORT n = 0; n < nCount; n++ )
+ sal_uInt16 nStartPara = (sal_uInt16) pParaList->GetAbsPos( pParagraph );
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
aText += pEditEngine->GetText( nStartPara + n );
- if ( (n+1) < (USHORT)nCount )
+ if ( (n+1) < (sal_uInt16)nCount )
aText += '\n';
}
return aText;
}
-void Outliner::Remove( Paragraph* pPara, ULONG nParaCount )
+void Outliner::Remove( Paragraph* pPara, sal_uLong nParaCount )
{
DBG_CHKTHIS(Outliner,0);
- ULONG nPos = pParaList->GetAbsPos( pPara );
+ sal_uLong nPos = pParaList->GetAbsPos( pPara );
if( !nPos && ( nParaCount >= pParaList->GetParagraphCount() ) )
{
Clear();
}
else
{
- for( USHORT n = 0; n < (USHORT)nParaCount; n++ )
- pEditEngine->RemoveParagraph( (USHORT) nPos );
+ for( sal_uInt16 n = 0; n < (sal_uInt16)nParaCount; n++ )
+ pEditEngine->RemoveParagraph( (sal_uInt16) nPos );
}
}
void Outliner::StripPortions()
{
DBG_CHKTHIS(Outliner,0);
- bStrippingPortions = TRUE;
+ bStrippingPortions = sal_True;
pEditEngine->StripPortions();
- bStrippingPortions = FALSE;
+ bStrippingPortions = sal_False;
}
-void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
- USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
+void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
+ sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
bool bEndOfLine,
@@ -1815,7 +1815,7 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO
}
void Outliner::DrawingTab( const Point& rStartPos, long nWidth, const String& rChar, const SvxFont& rFont,
- USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, bool bEndOfLine, bool bEndOfParagraph,
+ sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, bool bEndOfLine, bool bEndOfParagraph,
const Color& rOverlineColor, const Color& rTextLineColor)
{
if(aDrawPortionHdl.IsSet())
@@ -1830,20 +1830,20 @@ void Outliner::DrawingTab( const Point& rStartPos, long nWidth, const String& rC
long Outliner::RemovingPagesHdl( OutlinerView* pView )
{
DBG_CHKTHIS(Outliner,0);
- return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : TRUE;
+ return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : sal_True;
}
-BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT _nFirstPage, USHORT nPages )
+sal_Bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 _nFirstPage, sal_uInt16 nPages )
{
DBG_CHKTHIS(Outliner,0);
nDepthChangedHdlPrevDepth = nPages;
mnFirstSelPage = _nFirstPage;
pHdlParagraph = 0;
- return (BOOL)RemovingPagesHdl( pCurView );
+ return (sal_Bool)RemovingPagesHdl( pCurView );
}
-SfxItemSet Outliner::GetParaAttribs( USHORT nPara )
+SfxItemSet Outliner::GetParaAttribs( sal_uInt16 nPara )
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetParaAttribs( nPara );
@@ -1853,8 +1853,8 @@ IMPL_LINK( Outliner, ParaVisibleStateChangedHdl, Paragraph*, pPara )
{
DBG_CHKTHIS(Outliner,0);
- ULONG nPara = pParaList->GetAbsPos( pPara );
- pEditEngine->ShowParagraph( (USHORT)nPara, pPara->IsVisible() );
+ sal_uLong nPara = pParaList->GetAbsPos( pPara );
+ pEditEngine->ShowParagraph( (sal_uInt16)nPara, pPara->IsVisible() );
return 0;
}
@@ -1878,7 +1878,7 @@ IMPL_LINK( Outliner, BeginPasteOrDropHdl, PasteOrDropInfos*, pInfos )
IMPL_LINK( Outliner, EndPasteOrDropHdl, PasteOrDropInfos*, pInfos )
{
- bPasting = FALSE;
+ bPasting = sal_False;
ImpTextPasted( pInfos->nStartPara, pInfos->nEndPara - pInfos->nStartPara + 1 );
maEndPasteOrDropHdl.Call( pInfos );
UndoActionEnd( EDITUNDO_DRAGANDDROP );
@@ -1890,10 +1890,10 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
DBG_CHKTHIS(Outliner,0);
pParaList->MoveParagraphs( pInfos->nStartPara, pInfos->nDestPara, pInfos->nEndPara - pInfos->nStartPara + 1 );
- USHORT nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara );
- USHORT nParas = (USHORT)pParaList->GetParagraphCount();
- for ( USHORT n = nChangesStart; n < nParas; n++ )
- ImplCalcBulletText( n, FALSE, FALSE );
+ sal_uInt16 nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara );
+ sal_uInt16 nParas = (sal_uInt16)pParaList->GetParagraphCount();
+ for ( sal_uInt16 n = nChangesStart; n < nParas; n++ )
+ ImplCalcBulletText( n, sal_False, sal_False );
if( !IsInUndo() )
aEndMovingHdl.Call( this );
@@ -1905,17 +1905,17 @@ static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat&
{
if( rN1.GetNumberingType() != rN2.GetNumberingType() )
return false;
-
+
if( rN1.GetNumStr(1) != rN2.GetNumStr(1) )
return false;
-
+
if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) )
return false;
-
+
return true;
}
-sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt )
+sal_uInt16 Outliner::ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt )
{
sal_uInt16 nNumber = pParaFmt->GetStart() - 1;
@@ -1936,10 +1936,10 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
break;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
-
+
if( pFmt == 0 )
continue; // ignore paragraphs without bullets
-
+
// check if numbering is the same
if( !isSameNumbering( *pFmt, *pParaFmt ) )
break;
@@ -1963,12 +1963,12 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
return nNumber;
}
-void Outliner::ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds )
+void Outliner::ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds )
{
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara = pParaList->GetParagraph( nPara );
- USHORT nRelPos = 0xFFFF;
+ sal_uInt16 nRelPos = 0xFFFF;
while ( pPara )
{
@@ -2022,12 +2022,12 @@ void Outliner::Clear()
if( !bFirstParaIsEmpty )
{
- ImplBlockInsertionCallbacks( TRUE );
+ ImplBlockInsertionCallbacks( sal_True );
pEditEngine->Clear();
- pParaList->Clear( TRUE );
+ pParaList->Clear( sal_True );
pParaList->Append( new Paragraph( nMinDepth ));
- bFirstParaIsEmpty = TRUE;
- ImplBlockInsertionCallbacks( FALSE );
+ bFirstParaIsEmpty = sal_True;
+ ImplBlockInsertionCallbacks( sal_False );
}
else
{
@@ -2037,20 +2037,20 @@ void Outliner::Clear()
}
}
-void Outliner::SetFlatMode( BOOL bFlat )
+void Outliner::SetFlatMode( sal_Bool bFlat )
{
DBG_CHKTHIS(Outliner,0);
if( bFlat != pEditEngine->IsFlatMode() )
{
- for ( USHORT nPara = (USHORT)pParaList->GetParagraphCount(); nPara; )
+ for ( sal_uInt16 nPara = (sal_uInt16)pParaList->GetParagraphCount(); nPara; )
pParaList->GetParagraph( --nPara )->aBulSize.Width() = -1;
pEditEngine->SetFlatMode( bFlat );
}
}
-String Outliner::ImplGetBulletText( USHORT nPara )
+String Outliner::ImplGetBulletText( sal_uInt16 nPara )
{
String aRes;
Paragraph* pPara = pParaList->GetParagraph( nPara );
@@ -2058,14 +2058,14 @@ String Outliner::ImplGetBulletText( USHORT nPara )
{
// Enable optimization again ...
// if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
- ImplCalcBulletText( nPara, FALSE, FALSE );
+ ImplCalcBulletText( nPara, sal_False, sal_False );
aRes = pPara->GetText();
}
return aRes;
}
// this is needed for StarOffice Api
-void Outliner::SetLevelDependendStyleSheet( USHORT nPara )
+void Outliner::SetLevelDependendStyleSheet( sal_uInt16 nPara )
{
SfxItemSet aOldAttrs( pEditEngine->GetParaAttribs( nPara ) );
ImplSetLevelDependendStyleSheet( nPara );
@@ -2074,7 +2074,7 @@ void Outliner::SetLevelDependendStyleSheet( USHORT nPara )
SV_IMPL_PTRARR( NotifyList, EENotifyPtr );
-void Outliner::ImplBlockInsertionCallbacks( BOOL b )
+void Outliner::ImplBlockInsertionCallbacks( sal_Bool b )
{
if ( b )
{
@@ -2187,7 +2187,7 @@ sal_Bool DrawPortionInfo::IsRTL() const
nError = U_ZERO_ERROR;
// I do not have this info here. Is it necessary? I'll have to ask MT.
- const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
+ const sal_uInt8 nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(mrText.GetBuffer()), mrText.Len(), nDefaultDir, NULL, &nError); // UChar != sal_Unicode in MinGW
nError = U_ZERO_ERROR;
diff --git a/editeng/source/outliner/outliner.src b/editeng/source/outliner/outliner.src
index e7e557e040..e7e557e040 100644..100755
--- a/editeng/source/outliner/outliner.src
+++ b/editeng/source/outliner/outliner.src
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 633fd33737..633fd33737 100644..100755
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx
index ca7b4e941d..933b6a9c7e 100644..100755
--- a/editeng/source/outliner/outlundo.cxx
+++ b/editeng/source/outliner/outlundo.cxx
@@ -42,7 +42,7 @@
#include <outlundo.hxx>
-OutlinerUndoBase::OutlinerUndoBase( USHORT _nId, Outliner* pOutliner )
+OutlinerUndoBase::OutlinerUndoBase( sal_uInt16 _nId, Outliner* pOutliner )
: EditUndo( _nId, NULL )
{
DBG_ASSERT( pOutliner, "Undo: Outliner?!" );
@@ -112,7 +112,7 @@ void OutlinerUndoChangeParaNumberingRestart::ImplApplyData( const ParaRestartDat
pOutliner->SetParaIsNumberingRestart( mnPara, rData.mbParaIsNumberingRestart );
}
-OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth )
+OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, sal_uInt16 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth )
: OutlinerUndoBase( OLUNDO_DEPTH, pOutliner )
{
mnPara = nPara;
@@ -122,12 +122,12 @@ OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nP
void OutlinerUndoChangeDepth::Undo()
{
- GetOutliner()->ImplInitDepth( mnPara, mnOldDepth, FALSE );
+ GetOutliner()->ImplInitDepth( mnPara, mnOldDepth, sal_False );
}
void OutlinerUndoChangeDepth::Redo()
{
- GetOutliner()->ImplInitDepth( mnPara, mnNewDepth, FALSE );
+ GetOutliner()->ImplInitDepth( mnPara, mnNewDepth, sal_False );
}
void OutlinerUndoChangeDepth::Repeat()
@@ -136,7 +136,7 @@ void OutlinerUndoChangeDepth::Repeat()
}
-OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara )
+OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, sal_uInt16 nPara )
: OutlinerUndoBase( OLUNDO_DEPTH, pOutliner )
{
mnPara = nPara;
@@ -146,14 +146,14 @@ void OutlinerUndoCheckPara::Undo()
{
Paragraph* pPara = GetOutliner()->GetParagraph( mnPara );
pPara->Invalidate();
- GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE );
+ GetOutliner()->ImplCalcBulletText( mnPara, sal_False, sal_False );
}
void OutlinerUndoCheckPara::Redo()
{
Paragraph* pPara = GetOutliner()->GetParagraph( mnPara );
pPara->Invalidate();
- GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE );
+ GetOutliner()->ImplCalcBulletText( mnPara, sal_False, sal_False );
}
void OutlinerUndoCheckPara::Repeat()
@@ -163,7 +163,7 @@ void OutlinerUndoCheckPara::Repeat()
DBG_NAME(OLUndoExpand);
-OLUndoExpand::OLUndoExpand(Outliner* pOut, USHORT _nId )
+OLUndoExpand::OLUndoExpand(Outliner* pOut, sal_uInt16 _nId )
: EditUndo( _nId, 0 )
{
DBG_CTOR(OLUndoExpand,0);
@@ -181,20 +181,20 @@ OLUndoExpand::~OLUndoExpand()
}
-void OLUndoExpand::Restore( BOOL bUndo )
+void OLUndoExpand::Restore( sal_Bool bUndo )
{
DBG_CHKTHIS(OLUndoExpand,0);
DBG_ASSERT(pOutliner,"Undo:No Outliner");
DBG_ASSERT(pOutliner->pEditEngine,"Outliner already deleted");
Paragraph* pPara;
- BOOL bExpand = FALSE;
- USHORT _nId = GetId();
+ sal_Bool bExpand = sal_False;
+ sal_uInt16 _nId = GetId();
if((_nId == OLUNDO_EXPAND && !bUndo) || (_nId == OLUNDO_COLLAPSE && bUndo))
- bExpand = TRUE;
+ bExpand = sal_True;
if( !pParas )
{
- pPara = pOutliner->GetParagraph( (ULONG)nCount );
+ pPara = pOutliner->GetParagraph( (sal_uLong)nCount );
if( bExpand )
pOutliner->Expand( pPara );
else
@@ -202,9 +202,9 @@ void OLUndoExpand::Restore( BOOL bUndo )
}
else
{
- for( USHORT nIdx = 0; nIdx < nCount; nIdx++ )
+ for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ )
{
- pPara = pOutliner->GetParagraph( (ULONG)(pParas[nIdx]) );
+ pPara = pOutliner->GetParagraph( (sal_uLong)(pParas[nIdx]) );
if( bExpand )
pOutliner->Expand( pPara );
else
@@ -217,14 +217,14 @@ void OLUndoExpand::Restore( BOOL bUndo )
void OLUndoExpand::Undo()
{
DBG_CHKTHIS(OLUndoExpand,0);
- Restore( TRUE );
+ Restore( sal_True );
}
void OLUndoExpand::Redo()
{
DBG_CHKTHIS(OLUndoExpand,0);
- Restore( FALSE );
+ Restore( sal_False );
}
diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx
index 3fe9f92be6..fcdce80be4 100644
--- a/editeng/source/outliner/outlundo.hxx
+++ b/editeng/source/outliner/outlundo.hxx
@@ -39,7 +39,7 @@ private:
Outliner* mpOutliner;
public:
- OutlinerUndoBase( USHORT nId, Outliner* pOutliner );
+ OutlinerUndoBase( sal_uInt16 nId, Outliner* pOutliner );
Outliner* GetOutliner() const { return mpOutliner; }
};
@@ -88,12 +88,12 @@ class OutlinerUndoChangeDepth : public OutlinerUndoBase
{
using SfxUndoAction::Repeat;
private:
- USHORT mnPara;
+ sal_uInt16 mnPara;
sal_Int16 mnOldDepth;
sal_Int16 mnNewDepth;
public:
- OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth );
+ OutlinerUndoChangeDepth( Outliner* pOutliner, sal_uInt16 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth );
virtual void Undo();
virtual void Redo();
@@ -107,10 +107,10 @@ class OutlinerUndoCheckPara : public OutlinerUndoBase
{
using SfxUndoAction::Repeat;
private:
- USHORT mnPara;
+ sal_uInt16 mnPara;
public:
- OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara );
+ OutlinerUndoCheckPara( Outliner* pOutliner, sal_uInt16 nPara );
virtual void Undo();
virtual void Redo();
@@ -125,17 +125,17 @@ public:
class OLUndoExpand : public EditUndo
{
using SfxUndoAction::Repeat;
- void Restore( BOOL bUndo );
+ void Restore( sal_Bool bUndo );
public:
- OLUndoExpand( Outliner* pOut, USHORT nId );
+ OLUndoExpand( Outliner* pOut, sal_uInt16 nId );
~OLUndoExpand();
virtual void Undo();
virtual void Redo();
virtual void Repeat();
- USHORT* pParas; // 0 == nCount contains paragraph number
+ sal_uInt16* pParas; // 0 == nCount contains paragraph number
Outliner* pOutliner;
- USHORT nCount;
+ sal_uInt16 nCount;
};
#endif
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index de9fae71ed..98de3f705b 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -76,8 +76,8 @@ OutlinerView::OutlinerView( Outliner* pOut, Window* pWin )
DBG_CTOR( OutlinerView, 0 );
pOwner = pOut;
- bDDCursorVisible = FALSE;
- bInDragMode = FALSE;
+ bDDCursorVisible = sal_False;
+ bInDragMode = sal_False;
nDDScrollLRBorderWidthWin = 0;
nDDScrollTBBorderWidthWin = 0;
pHorTabArrDoc = 0;
@@ -104,7 +104,7 @@ void OutlinerView::Paint( const Rectangle& rRect )
pEditView->Paint( rRect );
}
-BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
+sal_Bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
{
DBG_CHKTHIS( OutlinerView, 0 );
@@ -114,18 +114,18 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
pOwner->Insert( String() );
- BOOL bKeyProcessed = FALSE;
+ sal_Bool bKeyProcessed = sal_False;
ESelection aSel( pEditView->GetSelection() );
- BOOL bSelection = aSel.HasRange();
+ sal_Bool bSelection = aSel.HasRange();
KeyCode aKeyCode = rKEvt.GetKeyCode();
KeyFuncType eFunc = aKeyCode.GetFunction();
- USHORT nCode = aKeyCode.GetCode();
- BOOL bReadOnly = IsReadOnly();
+ sal_uInt16 nCode = aKeyCode.GetCode();
+ sal_Bool bReadOnly = IsReadOnly();
if( bSelection && ( nCode != KEY_TAB ) && EditEngine::DoesKeyChangeText( rKEvt ) )
{
- if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) )
- return TRUE;
+ if ( ImpCalcSelectedPages( sal_False ) && !pOwner->ImpCanDeleteSelectedPages( this ) )
+ return sal_True;
}
if ( eFunc != KEYFUNC_DONTKNOW )
@@ -137,14 +137,14 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
if ( !bReadOnly )
{
Cut();
- bKeyProcessed = TRUE;
+ bKeyProcessed = sal_True;
}
}
break;
case KEYFUNC_COPY:
{
Copy();
- bKeyProcessed = TRUE;
+ bKeyProcessed = sal_True;
}
break;
case KEYFUNC_PASTE:
@@ -152,7 +152,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
if ( !bReadOnly )
{
PasteSpecial();
- bKeyProcessed = TRUE;
+ bKeyProcessed = sal_True;
}
}
break;
@@ -166,7 +166,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
if( pNext && pNext->HasFlag(PARAFLAG_ISPAGE) )
{
if( !pOwner->ImpCanDeleteSelectedPages( this, aSel.nEndPara, 1 ) )
- return FALSE;
+ return sal_False;
}
}
}
@@ -189,13 +189,13 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
( bSelection || !aSel.nStartPos ) )
{
Indent( aKeyCode.IsShift() ? (-1) : (+1) );
- bKeyProcessed = TRUE;
+ bKeyProcessed = sal_True;
}
else if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) &&
!bSelection && !aSel.nEndPos && pOwner->ImplHasBullet( aSel.nEndPara ) )
{
Indent( aKeyCode.IsShift() ? (-1) : (+1) );
- bKeyProcessed = TRUE;
+ bKeyProcessed = sal_True;
}
}
}
@@ -207,11 +207,11 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nEndPara );
Paragraph* pPrev = pOwner->pParaList->GetParagraph( aSel.nEndPara-1 );
if( !pPrev->IsVisible() )
- return TRUE;
+ return sal_True;
if( !pPara->GetDepth() )
{
if(!pOwner->ImpCanDeleteSelectedPages(this, aSel.nEndPara , 1 ) )
- return TRUE;
+ return sal_True;
}
}
}
@@ -230,20 +230,20 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
if( !bSelection &&
aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )
{
- ULONG nChilds = pOwner->pParaList->GetChildCount(pPara);
+ sal_uLong nChilds = pOwner->pParaList->GetChildCount(pPara);
if( nChilds && !pOwner->pParaList->HasVisibleChilds(pPara))
{
pOwner->UndoActionStart( OLUNDO_INSERT );
- ULONG nTemp = aSel.nEndPara;
+ sal_uLong nTemp = aSel.nEndPara;
nTemp += nChilds;
nTemp++; // insert above next Non-Child
pOwner->Insert( String(),nTemp,pPara->GetDepth());
// Position the cursor
- ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0);
+ ESelection aTmpSel((sal_uInt16)nTemp,0,(sal_uInt16)nTemp,0);
pEditView->SetSelection( aTmpSel );
- pEditView->ShowCursor( TRUE, TRUE );
+ pEditView->ShowCursor( sal_True, sal_True );
pOwner->UndoActionEnd( OLUNDO_INSERT );
- bKeyProcessed = TRUE;
+ bKeyProcessed = sal_True;
}
}
}
@@ -252,16 +252,16 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
( aSel.nEndPos == pOwner->pEditEngine->GetTextLen(aSel.nEndPara) ) )
{
pOwner->UndoActionStart( OLUNDO_INSERT );
- ULONG nTemp = aSel.nEndPara;
+ sal_uLong nTemp = aSel.nEndPara;
nTemp++;
pOwner->Insert( String(), nTemp, pPara->GetDepth()+1 );
// Position the cursor
- ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0);
+ ESelection aTmpSel((sal_uInt16)nTemp,0,(sal_uInt16)nTemp,0);
pEditView->SetSelection( aTmpSel );
- pEditView->ShowCursor( TRUE, TRUE );
+ pEditView->ShowCursor( sal_True, sal_True );
pOwner->UndoActionEnd( OLUNDO_INSERT );
- bKeyProcessed = TRUE;
+ bKeyProcessed = sal_True;
}
}
}
@@ -269,14 +269,15 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
}
}
- return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt, pFrameWin );
+ return bKeyProcessed ? sal_True : pEditView->PostKeyEvent( rKEvt, pFrameWin );
+
}
-ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget)
+sal_uLong OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget)
{
DBG_CHKTHIS(OutlinerView,0);
- ULONG nPara = EE_PARA_NOT_FOUND;
+ sal_uLong nPara = EE_PARA_NOT_FOUND;
Point aMousePosWin = pEditView->GetWindow()->PixelToLogic( rPosPix );
if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) )
@@ -295,7 +296,7 @@ ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget
aPaperPos.Y() -= aOutArea.Top();
aPaperPos.Y() += aVisArea.Top();
- BOOL bBullet;
+ sal_Bool bBullet;
if ( pOwner->IsTextPos( aPaperPos, 0, &bBullet ) )
{
Point aDocPos = pOwner->GetDocPos( aPaperPos );
@@ -317,7 +318,7 @@ ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget
return nPara;
}
-BOOL OutlinerView::MouseMove( const MouseEvent& rMEvt )
+sal_Bool OutlinerView::MouseMove( const MouseEvent& rMEvt )
{
DBG_CHKTHIS(OutlinerView,0);
@@ -326,7 +327,7 @@ BOOL OutlinerView::MouseMove( const MouseEvent& rMEvt )
Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) )
- return FALSE;
+ return sal_False;
Pointer aPointer = GetPointer( rMEvt.GetPosPixel() );
pEditView->GetWindow()->SetPointer( aPointer );
@@ -334,7 +335,7 @@ BOOL OutlinerView::MouseMove( const MouseEvent& rMEvt )
}
-BOOL OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
{
DBG_CHKTHIS(OutlinerView,0);
if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
@@ -342,24 +343,24 @@ BOOL OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) )
- return FALSE;
+ return sal_False;
Pointer aPointer = GetPointer( rMEvt.GetPosPixel() );
pEditView->GetWindow()->SetPointer( aPointer );
MouseTarget eTarget;
- ULONG nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget );
+ sal_uLong nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget );
if ( eTarget == MouseBullet )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- BOOL bHasChilds = (pPara && pOwner->pParaList->HasChilds(pPara));
+ sal_Bool bHasChilds = (pPara && pOwner->pParaList->HasChilds(pPara));
if( rMEvt.GetClicks() == 1 )
{
- ULONG nEndPara = nPara;
+ sal_uLong nEndPara = nPara;
if ( bHasChilds && pOwner->pParaList->HasVisibleChilds(pPara) )
nEndPara += pOwner->pParaList->GetChildCount( pPara );
- // The selection is inverted, so that EditEngine does not scroll
- ESelection aSel((USHORT)nEndPara, 0xffff,(USHORT)nPara, 0 );
+ // The selection is inverted, so that EditEngine does not scroll
+ ESelection aSel((sal_uInt16)nEndPara, 0xffff,(sal_uInt16)nPara, 0 );
pEditView->SetSelection( aSel );
}
else if( rMEvt.GetClicks() == 2 && bHasChilds )
@@ -367,7 +368,7 @@ BOOL OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
aDDStartPosPix = rMEvt.GetPosPixel();
aDDStartPosRef=pEditView->GetWindow()->PixelToLogic( aDDStartPosPix,pOwner->GetRefMapMode());
- return TRUE;
+ return sal_True;
}
// special case for outliner view in impress, check if double click hits the page icon for toggle
@@ -385,7 +386,7 @@ BOOL OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
}
-BOOL OutlinerView::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool OutlinerView::MouseButtonUp( const MouseEvent& rMEvt )
{
DBG_CHKTHIS(OutlinerView,0);
if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
@@ -393,7 +394,7 @@ BOOL OutlinerView::MouseButtonUp( const MouseEvent& rMEvt )
Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) )
- return FALSE;
+ return sal_False;
Pointer aPointer = GetPointer( rMEvt.GetPosPixel() );
pEditView->GetWindow()->SetPointer( aPointer );
@@ -406,7 +407,7 @@ void OutlinerView::ImpHideDDCursor()
DBG_CHKTHIS(OutlinerView,0);
if ( bDDCursorVisible )
{
- bDDCursorVisible = FALSE;
+ bDDCursorVisible = sal_False;
ImpPaintDDCursor();
}
}
@@ -416,7 +417,7 @@ void OutlinerView::ImpShowDDCursor()
DBG_CHKTHIS(OutlinerView,0);
if ( !bDDCursorVisible )
{
- bDDCursorVisible = TRUE;
+ bDDCursorVisible = sal_True;
ImpPaintDDCursor();
}
}
@@ -445,16 +446,16 @@ void OutlinerView::ImpPaintDDCursor()
}
else
{
- ULONG nPara = nDDCurPara;
+ sal_uLong nPara = nDDCurPara;
if ( nDDCurPara == LIST_APPEND )
{
Paragraph* pTemp = pOwner->pParaList->LastVisible();
nPara = pOwner->pParaList->GetAbsPos( pTemp );
}
- aStartPointWin = pEditView->GetWindowPosTopLeft((USHORT) nPara );
+ aStartPointWin = pEditView->GetWindowPosTopLeft((sal_uInt16) nPara );
if ( nDDCurPara == LIST_APPEND )
{
- long nHeight = pOwner->pEditEngine->GetTextHeight((USHORT)nPara );
+ long nHeight = pOwner->pEditEngine->GetTextHeight((sal_uInt16)nPara );
aStartPointWin.Y() += nHeight;
}
aStartPointWin.X() = aOutputArWin.Left();
@@ -469,10 +470,10 @@ void OutlinerView::ImpPaintDDCursor()
// Calculates above which paragraph must it must be inserted
-ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel )
+sal_uLong OutlinerView::ImpGetInsertionPara( const Point& rPosPixel )
{
DBG_CHKTHIS(OutlinerView,0);
- ULONG nCurPara = pEditView->GetParagraph( rPosPixel );
+ sal_uLong nCurPara = pEditView->GetParagraph( rPosPixel );
ParagraphList* pParaList = pOwner->pParaList;
if ( nCurPara == EE_PARA_NOT_FOUND )
@@ -480,8 +481,8 @@ ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel )
else
{
Point aPosWin = pEditView->GetWindow()->PixelToLogic( rPosPixel );
- Point aParaPosWin = pEditView->GetWindowPosTopLeft((USHORT)nCurPara);
- long nHeightRef = pOwner->pEditEngine->GetTextHeight((USHORT)nCurPara);
+ Point aParaPosWin = pEditView->GetWindowPosTopLeft((sal_uInt16)nCurPara);
+ long nHeightRef = pOwner->pEditEngine->GetTextHeight((sal_uInt16)nCurPara);
long nParaYOffs = aPosWin.Y() - aParaPosWin.Y();
if ( nParaYOffs > nHeightRef / 2 )
@@ -499,7 +500,7 @@ void OutlinerView::ImpToggleExpand( Paragraph* pPara )
{
DBG_CHKTHIS(OutlinerView,0);
- USHORT nPara = (USHORT) pOwner->pParaList->GetAbsPos( pPara );
+ sal_uInt16 nPara = (sal_uInt16) pOwner->pParaList->GetAbsPos( pPara );
pEditView->SetSelection( ESelection( nPara, 0, nPara, 0 ) );
ImplExpandOrCollaps( nPara, nPara, !pOwner->pParaList->HasVisibleChilds( pPara ) );
pEditView->ShowCursor();
@@ -515,21 +516,21 @@ void OutlinerView::SetOutliner( Outliner* pOutliner )
-ULONG OutlinerView::Select( Paragraph* pParagraph, BOOL bSelect,
- BOOL bWithChilds )
+sal_uLong OutlinerView::Select( Paragraph* pParagraph, sal_Bool bSelect,
+ sal_Bool bWithChilds )
{
DBG_CHKTHIS(OutlinerView,0);
- ULONG nPara = pOwner->pParaList->GetAbsPos( pParagraph );
- USHORT nEnd = 0;
+ sal_uLong nPara = pOwner->pParaList->GetAbsPos( pParagraph );
+ sal_uInt16 nEnd = 0;
if ( bSelect )
nEnd = 0xffff;
- ULONG nChildCount = 0;
+ sal_uLong nChildCount = 0;
if ( bWithChilds )
nChildCount = pOwner->pParaList->GetChildCount( pParagraph );
- ESelection aSel( (USHORT)nPara, 0,(USHORT)(nPara+nChildCount), nEnd );
+ ESelection aSel( (sal_uInt16)nPara, 0,(sal_uInt16)(nPara+nChildCount), nEnd );
pEditView->SetSelection( aSel );
return nChildCount+1;
}
@@ -539,23 +540,21 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs )
{
DBG_CHKTHIS(OutlinerView,0);
- BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
pOwner->UndoActionStart( OLUNDO_ATTR );
- ParaRange aSel = ImpGetSelectedParagraphs( FALSE );
+ ParaRange aSel = ImpGetSelectedParagraphs( sal_False );
pEditView->SetAttribs( rAttrs );
// Update Bullet text
- for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ for( sal_uInt16 nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
pOwner->ImplCheckNumBulletItem( nPara );
- // update following paras as well, numbering depends on
- // previous paras
- pOwner->ImplCalcBulletText( nPara, TRUE, FALSE );
+ pOwner->ImplCalcBulletText( nPara, sal_False, sal_False );
if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) );
@@ -567,7 +566,7 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs )
pEditView->SetEditEngineUpdateMode( bUpdate );
}
-ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds )
+ParaRange OutlinerView::ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChilds )
{
DBG_CHKTHIS( OutlinerView, 0 );
@@ -581,7 +580,7 @@ ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds )
Paragraph* pLast = pOwner->pParaList->GetParagraph( aParas.nEndPara );
if ( pOwner->pParaList->HasHiddenChilds( pLast ) )
aParas.nEndPara =
- sal::static_int_cast< USHORT >(
+ sal::static_int_cast< sal_uInt16 >(
aParas.nEndPara +
pOwner->pParaList->GetChildCount( pLast ) );
}
@@ -598,22 +597,22 @@ void OutlinerView::Indent( short nDiff )
{
DBG_CHKTHIS( OutlinerView, 0 );
- if( !nDiff || ( ( nDiff > 0 ) && ImpCalcSelectedPages( TRUE ) && !pOwner->ImpCanIndentSelectedPages( this ) ) )
+ if( !nDiff || ( ( nDiff > 0 ) && ImpCalcSelectedPages( sal_True ) && !pOwner->ImpCanIndentSelectedPages( this ) ) )
return;
const bool bOutlinerView = pOwner->pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER;
- BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
- BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
+ sal_Bool bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
if( bUndo )
pOwner->UndoActionStart( OLUNDO_DEPTH );
sal_Int16 nMinDepth = -1; // Optimization: Not to recalculate to manny parargaphs when not really needed.
- ParaRange aSel = ImpGetSelectedParagraphs( TRUE );
- for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ ParaRange aSel = ImpGetSelectedParagraphs( sal_True );
+ for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
@@ -694,8 +693,8 @@ void OutlinerView::Indent( short nDiff )
pOwner->mnDepthChangeHdlPrevFlags = pPara->nFlags;
pOwner->pHdlParagraph = pPara;
- pOwner->ImplInitDepth( nPara, nNewDepth, TRUE, FALSE );
- pOwner->ImplCalcBulletText( nPara, FALSE, FALSE );
+ pOwner->ImplInitDepth( nPara, nNewDepth, sal_True, sal_False );
+ pOwner->ImplCalcBulletText( nPara, sal_False, sal_False );
if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
pOwner->ImplSetLevelDependendStyleSheet( nPara );
@@ -710,18 +709,18 @@ void OutlinerView::Indent( short nDiff )
}
}
- USHORT nParas = (USHORT)pOwner->pParaList->GetParagraphCount();
- for ( USHORT n = aSel.nEndPara+1; n < nParas; n++ )
+ sal_uInt16 nParas = (sal_uInt16)pOwner->pParaList->GetParagraphCount();
+ for ( sal_uInt16 n = aSel.nEndPara+1; n < nParas; n++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( n );
if ( pPara->GetDepth() < nMinDepth )
break;
- pOwner->ImplCalcBulletText( n, FALSE, FALSE );
+ pOwner->ImplCalcBulletText( n, sal_False, sal_False );
}
if ( bUpdate )
{
- pEditView->SetEditEngineUpdateMode( TRUE );
+ pEditView->SetEditEngineUpdateMode( sal_True );
pEditView->ShowCursor();
}
@@ -729,33 +728,33 @@ void OutlinerView::Indent( short nDiff )
pOwner->UndoActionEnd( OLUNDO_DEPTH );
}
-BOOL OutlinerView::AdjustHeight( long nDY )
+sal_Bool OutlinerView::AdjustHeight( long nDY )
{
DBG_CHKTHIS(OutlinerView,0);
pEditView->MoveParagraphs( nDY );
- return TRUE; // remove return value...
+ return sal_True; // remove return value...
}
-void OutlinerView::AdjustDepth( Paragraph* pPara, short nDX, BOOL bWithChilds)
+void OutlinerView::AdjustDepth( Paragraph* pPara, short nDX, sal_Bool bWithChilds)
{
DBG_CHKTHIS(OutlinerView,0);
- ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara );
- ULONG nEndPara = nStartPara;
+ sal_uLong nStartPara = pOwner->pParaList->GetAbsPos( pPara );
+ sal_uLong nEndPara = nStartPara;
if ( bWithChilds )
nEndPara += pOwner->pParaList->GetChildCount( pPara );
- ESelection aSel((USHORT)nStartPara, 0,(USHORT)nEndPara, 0xffff );
+ ESelection aSel((sal_uInt16)nStartPara, 0,(sal_uInt16)nEndPara, 0xffff );
pEditView->SetSelection( aSel );
AdjustDepth( nDX );
}
-void OutlinerView::AdjustHeight( Paragraph* pPara, long nDY, BOOL bWithChilds )
+void OutlinerView::AdjustHeight( Paragraph* pPara, long nDY, sal_Bool bWithChilds )
{
DBG_CHKTHIS(OutlinerView,0);
- ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara );
- ULONG nEndPara = nStartPara;
+ sal_uLong nStartPara = pOwner->pParaList->GetAbsPos( pPara );
+ sal_uLong nEndPara = nStartPara;
if ( bWithChilds )
nEndPara += pOwner->pParaList->GetChildCount( pPara );
- ESelection aSel( (USHORT)nStartPara, 0, (USHORT)nEndPara, 0xffff );
+ ESelection aSel( (sal_uInt16)nStartPara, 0, (sal_uInt16)nEndPara, 0xffff );
pEditView->SetSelection( aSel );
AdjustHeight( nDY );
}
@@ -896,47 +895,47 @@ void OutlinerView::ImpScrollUp()
void OutlinerView::Expand()
{
DBG_CHKTHIS( OutlinerView, 0 );
- ParaRange aParas = ImpGetSelectedParagraphs( FALSE );
- ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, TRUE );
+ ParaRange aParas = ImpGetSelectedParagraphs( sal_False );
+ ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, sal_True );
}
void OutlinerView::Collapse()
{
DBG_CHKTHIS( OutlinerView, 0 );
- ParaRange aParas = ImpGetSelectedParagraphs( FALSE );
- ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, FALSE );
+ ParaRange aParas = ImpGetSelectedParagraphs( sal_False );
+ ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, sal_False );
}
void OutlinerView::ExpandAll()
{
DBG_CHKTHIS( OutlinerView, 0 );
- ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), TRUE );
+ ImplExpandOrCollaps( 0, (sal_uInt16)(pOwner->pParaList->GetParagraphCount()-1), sal_True );
}
void OutlinerView::CollapseAll()
{
DBG_CHKTHIS(OutlinerView,0);
- ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), FALSE );
+ ImplExpandOrCollaps( 0, (sal_uInt16)(pOwner->pParaList->GetParagraphCount()-1), sal_False );
}
-void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand )
+void OutlinerView::ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand )
{
DBG_CHKTHIS( OutlinerView, 0 );
- BOOL bUpdate = pOwner->GetUpdateMode();
- pOwner->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pOwner->GetUpdateMode();
+ pOwner->SetUpdateMode( sal_False );
- BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
+ sal_Bool bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
if( bUndo )
pOwner->UndoActionStart( bExpand ? OLUNDO_EXPAND : OLUNDO_COLLAPSE );
- for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- BOOL bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara );
+ sal_Bool bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara );
if( bDone )
{
// The line under the paragraph should disappear ...
@@ -949,7 +948,7 @@ void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL
if ( bUpdate )
{
- pOwner->SetUpdateMode( TRUE );
+ pOwner->SetUpdateMode( sal_True );
pEditView->ShowCursor();
}
}
@@ -981,22 +980,22 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj )
DBG_CHKTHIS(OutlinerView,0);
- if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) )
+ if ( ImpCalcSelectedPages( sal_False ) && !pOwner->ImpCanDeleteSelectedPages( this ) )
return;
pOwner->UndoActionStart( OLUNDO_INSERT );
- pOwner->pEditEngine->SetUpdateMode( FALSE );
- ULONG nStart, nParaCount;
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
+ sal_uLong nStart, nParaCount;
nParaCount = pOwner->pEditEngine->GetParagraphCount();
- USHORT nSize = ImpInitPaste( nStart );
+ sal_uInt16 nSize = ImpInitPaste( nStart );
pEditView->InsertText( rParaObj.GetTextObject() );
ImpPasted( nStart, nParaCount, nSize);
- pEditView->SetEditEngineUpdateMode( TRUE );
+ pEditView->SetEditEngineUpdateMode( sal_True );
pOwner->UndoActionEnd( OLUNDO_INSERT );
- pEditView->ShowCursor( TRUE, TRUE );
+ pEditView->ShowCursor( sal_True, sal_True );
}
@@ -1004,7 +1003,7 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj )
void OutlinerView::Cut()
{
DBG_CHKTHIS(OutlinerView,0);
- if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) )
+ if ( !ImpCalcSelectedPages( sal_False ) || pOwner->ImpCanDeleteSelectedPages( this ) )
pEditView->Cut();
}
@@ -1017,25 +1016,25 @@ void OutlinerView::Paste()
void OutlinerView::PasteSpecial()
{
DBG_CHKTHIS(OutlinerView,0);
- if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) )
+ if ( !ImpCalcSelectedPages( sal_False ) || pOwner->ImpCanDeleteSelectedPages( this ) )
{
pOwner->UndoActionStart( OLUNDO_INSERT );
- pOwner->pEditEngine->SetUpdateMode( FALSE );
- pOwner->bPasting = TRUE;
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
+ pOwner->bPasting = sal_True;
pEditView->PasteSpecial();
if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
{
- const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount();
+ const sal_uInt16 nParaCount = pOwner->pEditEngine->GetParagraphCount();
- for( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+ for( sal_uInt16 nPara = 0; nPara < nParaCount; nPara++ )
pOwner->ImplSetLevelDependendStyleSheet( nPara );
}
- pEditView->SetEditEngineUpdateMode( TRUE );
+ pEditView->SetEditEngineUpdateMode( sal_True );
pOwner->UndoActionEnd( OLUNDO_INSERT );
- pEditView->ShowCursor( TRUE, TRUE );
+ pEditView->ShowCursor( sal_True, sal_True );
}
}
@@ -1043,9 +1042,9 @@ void OutlinerView::CreateSelectionList (std::vector<Paragraph*> &aSelList)
{
DBG_CHKTHIS( OutlinerView, 0 );
- ParaRange aParas = ImpGetSelectedParagraphs( TRUE );
+ ParaRange aParas = ImpGetSelectedParagraphs( sal_True );
- for ( USHORT nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
aSelList.push_back(pPara);
@@ -1063,11 +1062,11 @@ void OutlinerView::SetStyleSheet( SfxStyleSheet* pStyle )
DBG_CHKTHIS(OutlinerView,0);
pEditView->SetStyleSheet( pStyle );
- ParaRange aSel = ImpGetSelectedParagraphs( TRUE );
- for( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ ParaRange aSel = ImpGetSelectedParagraphs( sal_True );
+ for( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
pOwner->ImplCheckNumBulletItem( nPara );
- pOwner->ImplCalcBulletText( nPara, FALSE, FALSE );
+ pOwner->ImplCalcBulletText( nPara, sal_False, sal_False );
}
}
@@ -1096,28 +1095,28 @@ Pointer OutlinerView::GetPointer( const Point& rPosPixel )
}
-USHORT OutlinerView::ImpInitPaste( ULONG& rStart )
+sal_uInt16 OutlinerView::ImpInitPaste( sal_uLong& rStart )
{
DBG_CHKTHIS(OutlinerView,0);
- pOwner->bPasting = TRUE;
+ pOwner->bPasting = sal_True;
ESelection aSelection( pEditView->GetSelection() );
aSelection.Adjust();
rStart = aSelection.nStartPara;
- USHORT nSize = aSelection.nEndPara - aSelection.nStartPara + 1;
+ sal_uInt16 nSize = aSelection.nEndPara - aSelection.nStartPara + 1;
return nSize;
}
-void OutlinerView::ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize)
+void OutlinerView::ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize)
{
DBG_CHKTHIS(OutlinerView,0);
- pOwner->bPasting = FALSE;
- ULONG nCurParaCount = (ULONG)pOwner->pEditEngine->GetParagraphCount();
+ pOwner->bPasting = sal_False;
+ sal_uLong nCurParaCount = (sal_uLong)pOwner->pEditEngine->GetParagraphCount();
if( nCurParaCount < nPrevParaCount )
- nSize = sal::static_int_cast< USHORT >(
+ nSize = sal::static_int_cast< sal_uInt16 >(
nSize - ( nPrevParaCount - nCurParaCount ) );
else
- nSize = sal::static_int_cast< USHORT >(
+ nSize = sal::static_int_cast< sal_uInt16 >(
nSize + ( nCurParaCount - nPrevParaCount ) );
pOwner->ImpTextPasted( nStart, nSize );
}
@@ -1130,31 +1129,31 @@ void OutlinerView::Command( const CommandEvent& rCEvt )
}
-void OutlinerView::SelectRange( ULONG nFirst, USHORT nCount )
+void OutlinerView::SelectRange( sal_uLong nFirst, sal_uInt16 nCount )
{
DBG_CHKTHIS(OutlinerView,0);
- ULONG nLast = nFirst+nCount;
- nCount = (USHORT)pOwner->pParaList->GetParagraphCount();
+ sal_uLong nLast = nFirst+nCount;
+ nCount = (sal_uInt16)pOwner->pParaList->GetParagraphCount();
if( nLast <= nCount )
nLast = nCount - 1;
- ESelection aSel( (USHORT)nFirst, 0, (USHORT)nLast, 0xffff );
+ ESelection aSel( (sal_uInt16)nFirst, 0, (sal_uInt16)nLast, 0xffff );
pEditView->SetSelection( aSel );
}
-USHORT OutlinerView::ImpCalcSelectedPages( BOOL bIncludeFirstSelected )
+sal_uInt16 OutlinerView::ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected )
{
DBG_CHKTHIS(OutlinerView,0);
ESelection aSel( pEditView->GetSelection() );
aSel.Adjust();
- USHORT nPages = 0;
- USHORT nFirstPage = 0xFFFF;
- USHORT nStartPara = aSel.nStartPara;
+ sal_uInt16 nPages = 0;
+ sal_uInt16 nFirstPage = 0xFFFF;
+ sal_uInt16 nStartPara = aSel.nStartPara;
if ( !bIncludeFirstSelected )
nStartPara++; // All paragraphs after StartPara will be deleted
- for ( USHORT nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
DBG_ASSERT(pPara, "ImpCalcSelectedPages: invalid Selection? ");
@@ -1185,11 +1184,11 @@ void OutlinerView::ToggleBullets()
aSel.Adjust();
const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode( FALSE );
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
sal_Int16 nDepth = -2;
- for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
@@ -1216,8 +1215,8 @@ void OutlinerView::ToggleBullets()
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
- // to USHORT without check, if the count is 0.
- USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount());
+ // to sal_uInt16 without check, if the count is 0.
+ sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
@@ -1234,9 +1233,9 @@ void OutlinerView::EnableBullets()
aSel.Adjust();
const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
- pOwner->pEditEngine->SetUpdateMode( FALSE );
+ pOwner->pEditEngine->SetUpdateMode( sal_False );
- for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
@@ -1249,8 +1248,9 @@ void OutlinerView::EnableBullets()
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
- // to USHORT without check, if the count is 0.
- USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount());
+ // to sal_uInt16 without check, if the count is 0.
+ sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
+
pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
@@ -1260,16 +1260,16 @@ void OutlinerView::EnableBullets()
}
-void OutlinerView::RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs )
+void OutlinerView::RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs )
{
- RemoveAttribs( bRemoveParaAttribs, 0, TRUE /*keep language attribs*/ );
+ RemoveAttribs( bRemoveParaAttribs, 0, sal_True /*keep language attribs*/ );
}
-void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL bKeepLanguages )
+void OutlinerView::RemoveAttribs( sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich, sal_Bool bKeepLanguages )
{
DBG_CHKTHIS(OutlinerView,0);
- BOOL bUpdate = pOwner->GetUpdateMode();
- pOwner->SetUpdateMode( FALSE );
+ sal_Bool bUpdate = pOwner->GetUpdateMode();
+ pOwner->SetUpdateMode( sal_False );
pOwner->UndoActionStart( OLUNDO_ATTR );
if (bKeepLanguages)
pEditView->RemoveAttribsKeepLanguages( bRemoveParaAttribs );
@@ -1280,10 +1280,10 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b
// Loop through all paragraphs and set indentation and level
ESelection aSel = pEditView->GetSelection();
aSel.Adjust();
- for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- pOwner->ImplInitDepth( nPara, pPara->GetDepth(), FALSE, FALSE );
+ pOwner->ImplInitDepth( nPara, pPara->GetDepth(), sal_False, sal_False );
}
}
pOwner->UndoActionEnd( OLUNDO_ATTR );
@@ -1297,7 +1297,7 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b
// ======================================================================
-void OutlinerView::InsertText( const XubString& rNew, BOOL bSelect )
+void OutlinerView::InsertText( const XubString& rNew, sal_Bool bSelect )
{
DBG_CHKTHIS(OutlinerView,0);
if( pOwner->bFirstParaIsEmpty )
@@ -1318,26 +1318,26 @@ void OutlinerView::SetSelection( const ESelection& rSel )
pEditView->SetSelection( rSel );
}
-void OutlinerView::SetReadOnly( BOOL bReadOnly )
+void OutlinerView::SetReadOnly( sal_Bool bReadOnly )
{
DBG_CHKTHIS(OutlinerView,0);
pEditView->SetReadOnly( bReadOnly );
}
-BOOL OutlinerView::IsReadOnly() const
+sal_Bool OutlinerView::IsReadOnly() const
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->IsReadOnly();
}
-BOOL OutlinerView::HasSelection() const
+sal_Bool OutlinerView::HasSelection() const
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->HasSelection();
}
-void OutlinerView::ShowCursor( BOOL bGotoCursor )
+void OutlinerView::ShowCursor( sal_Bool bGotoCursor )
{
DBG_CHKTHIS(OutlinerView,0);
pEditView->ShowCursor( bGotoCursor );
@@ -1386,10 +1386,10 @@ XubString OutlinerView::GetSelected() const
}
-void OutlinerView::RemoveCharAttribs( ULONG nPara, USHORT nWhich)
+void OutlinerView::RemoveCharAttribs( sal_uLong nPara, sal_uInt16 nWhich)
{
DBG_CHKTHIS(OutlinerView,0);
- pEditView->RemoveCharAttribs( (USHORT)nPara, nWhich);
+ pEditView->RemoveCharAttribs( (sal_uInt16)nPara, nWhich);
}
@@ -1400,7 +1400,7 @@ void OutlinerView::CompleteAutoCorrect()
}
-EESpellState OutlinerView::StartSpeller( BOOL bMultiDoc )
+EESpellState OutlinerView::StartSpeller( sal_Bool bMultiDoc )
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->StartSpeller( bMultiDoc );
@@ -1416,7 +1416,7 @@ EESpellState OutlinerView::StartThesaurus()
void OutlinerView::StartTextConversion(
LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont,
- INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc )
+ sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc )
{
DBG_CHKTHIS(OutlinerView,0);
if (
@@ -1434,7 +1434,7 @@ void OutlinerView::StartTextConversion(
}
-USHORT OutlinerView::StartSearchAndReplace( const SvxSearchItem& rSearchItem )
+sal_uInt16 OutlinerView::StartSearchAndReplace( const SvxSearchItem& rSearchItem )
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->StartSearchAndReplace( rSearchItem );
@@ -1462,14 +1462,14 @@ void OutlinerView::Scroll( long nHorzScroll, long nVertScroll )
}
-void OutlinerView::SetControlWord( ULONG nWord )
+void OutlinerView::SetControlWord( sal_uLong nWord )
{
DBG_CHKTHIS(OutlinerView,0);
pEditView->SetControlWord( nWord );
}
-ULONG OutlinerView::GetControlWord() const
+sal_uLong OutlinerView::GetControlWord() const
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->GetControlWord();
@@ -1504,7 +1504,7 @@ void OutlinerView::Redo()
}
-void OutlinerView::EnablePaste( BOOL bEnable )
+void OutlinerView::EnablePaste( sal_Bool bEnable )
{
DBG_CHKTHIS(OutlinerView,0);
pEditView->EnablePaste( bEnable );
@@ -1532,7 +1532,7 @@ const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer() const
}
-const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer( USHORT& nPara, USHORT& nPos ) const
+const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer( sal_uInt16& nPara, sal_uInt16& nPos ) const
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->GetFieldUnderMousePointer( nPara, nPos );
@@ -1545,28 +1545,28 @@ const SvxFieldItem* OutlinerView::GetFieldAtSelection() const
return pEditView->GetFieldAtSelection();
}
-void OutlinerView::SetInvalidateMore( USHORT nPixel )
+void OutlinerView::SetInvalidateMore( sal_uInt16 nPixel )
{
DBG_CHKTHIS(OutlinerView,0);
pEditView->SetInvalidateMore( nPixel );
}
-USHORT OutlinerView::GetInvalidateMore() const
+sal_uInt16 OutlinerView::GetInvalidateMore() const
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->GetInvalidateMore();
}
-BOOL OutlinerView::IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong )
+sal_Bool OutlinerView::IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong )
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->IsCursorAtWrongSpelledWord( bMarkIfWrong );
}
-BOOL OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong )
+sal_Bool OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong )
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->IsWrongSpelledWordAtPos( rPosPixel, bMarkIfWrong );
@@ -1586,28 +1586,28 @@ void OutlinerView::ExecuteSpellPopup( const Point& rPosPixel, Link* pStartDlg )
pEditView->ExecuteSpellPopup( rPosPixel, pStartDlg );
}
-ULONG OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect, SvKeyValueIterator* pHTTPHeaderAttrs )
+sal_uLong OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs )
{
DBG_CHKTHIS(OutlinerView,0);
- USHORT nOldParaCount = pEditView->GetEditEngine()->GetParagraphCount();
+ sal_uInt16 nOldParaCount = pEditView->GetEditEngine()->GetParagraphCount();
ESelection aOldSel = pEditView->GetSelection();
aOldSel.Adjust();
- ULONG nRet = pEditView->Read( rInput, rBaseURL, eFormat, bSelect, pHTTPHeaderAttrs );
+ sal_uLong nRet = pEditView->Read( rInput, rBaseURL, eFormat, bSelect, pHTTPHeaderAttrs );
long nParaDiff = pEditView->GetEditEngine()->GetParagraphCount() - nOldParaCount;
- USHORT nChangesStart = aOldSel.nStartPara;
- USHORT nChangesEnd = sal::static_int_cast< USHORT >(nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara));
+ sal_uInt16 nChangesStart = aOldSel.nStartPara;
+ sal_uInt16 nChangesEnd = sal::static_int_cast< sal_uInt16 >(nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara));
- for ( USHORT n = nChangesStart; n <= nChangesEnd; n++ )
+ for ( sal_uInt16 n = nChangesStart; n <= nChangesEnd; n++ )
{
if ( eFormat == EE_FORMAT_BIN )
{
- USHORT nDepth = 0;
+ sal_uInt16 nDepth = 0;
const SfxItemSet& rAttrs = pOwner->GetParaAttribs( n );
const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
nDepth = rLevel.GetValue();
- pOwner->ImplInitDepth( n, nDepth, FALSE );
+ pOwner->ImplInitDepth( n, nDepth, sal_False );
}
if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
@@ -1622,7 +1622,7 @@ ULONG OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextForma
return nRet;
}
-ULONG OutlinerView::Write( SvStream& rOutput, EETextFormat eFormat )
+sal_uLong OutlinerView::Write( SvStream& rOutput, EETextFormat eFormat )
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->Write( rOutput, eFormat );
@@ -1647,7 +1647,7 @@ SfxItemSet OutlinerView::GetAttribs()
return pEditView->GetAttribs();
}
-USHORT OutlinerView::GetSelectedScriptType() const
+sal_uInt16 OutlinerView::GetSelectedScriptType() const
{
DBG_CHKTHIS(OutlinerView,0);
return pEditView->GetSelectedScriptType();
diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx
index f018318009..c646710c4d 100644
--- a/editeng/source/outliner/paralist.cxx
+++ b/editeng/source/outliner/paralist.cxx
@@ -76,7 +76,7 @@ Paragraph::Paragraph( sal_Int16 nDDepth )
nDepth = nDDepth;
nFlags = 0;
- bVisible = TRUE;
+ bVisible = sal_True;
}
Paragraph::Paragraph( const Paragraph& rPara )
@@ -94,7 +94,7 @@ Paragraph::Paragraph( const Paragraph& rPara )
Paragraph::Paragraph( const ParagraphData& rData )
: nFlags( 0 )
, aBulSize( -1, -1)
-, bVisible( TRUE )
+, bVisible( sal_True )
{
DBG_CTOR( Paragraph, 0 );
@@ -122,7 +122,7 @@ void Paragraph::SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart )
mnNumberingStartValue = -1;
}
-void ParagraphList::Clear( BOOL bDestroyParagraphs )
+void ParagraphList::Clear( sal_Bool bDestroyParagraphs )
{
if ( bDestroyParagraphs )
{
@@ -139,21 +139,21 @@ void ParagraphList::Append( Paragraph* pPara)
maEntries.push_back(pPara);
}
-void ParagraphList::Insert( Paragraph* pPara, ULONG nAbsPos)
+void ParagraphList::Insert( Paragraph* pPara, sal_uLong nAbsPos)
{
OSL_ASSERT(nAbsPos != ULONG_MAX && nAbsPos <= maEntries.size());
maEntries.insert(maEntries.begin()+nAbsPos,pPara);
}
-void ParagraphList::Remove( ULONG nPara )
+void ParagraphList::Remove( sal_uLong nPara )
{
OSL_ASSERT(nPara < maEntries.size());
maEntries.erase(maEntries.begin() + nPara );
}
-void ParagraphList::MoveParagraphs( ULONG nStart, ULONG nDest, ULONG _nCount )
+void ParagraphList::MoveParagraphs( sal_uLong nStart, sal_uLong nDest, sal_uLong _nCount )
{
OSL_ASSERT(nStart < maEntries.size() && nDest < maEntries.size());
@@ -185,7 +185,6 @@ Paragraph* ParagraphList::NextVisible( Paragraph* pPara ) const
std::vector<Paragraph*>::const_iterator iter = std::find(maEntries.begin(),
maEntries.end(),
pPara);
-
for (; iter != maEntries.end(); ++iter)
{
if ((*iter)->IsVisible())
@@ -200,7 +199,6 @@ Paragraph* ParagraphList::PrevVisible( Paragraph* pPara ) const
std::vector<Paragraph*>::const_reverse_iterator iter = std::find(maEntries.rbegin(),
maEntries.rend(),
pPara);
-
for (; iter != maEntries.rend(); ++iter)
{
if ((*iter)->IsVisible())
@@ -222,31 +220,31 @@ Paragraph* ParagraphList::LastVisible() const
return iter != maEntries.rend() ? *iter : NULL;
}
-BOOL ParagraphList::HasChilds( Paragraph* pParagraph ) const
+sal_Bool ParagraphList::HasChilds( Paragraph* pParagraph ) const
{
- ULONG n = GetAbsPos( pParagraph );
+ sal_uLong n = GetAbsPos( pParagraph );
Paragraph* pNext = GetParagraph( ++n );
- return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? TRUE : FALSE;
+ return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? sal_True : sal_False;
}
-BOOL ParagraphList::HasHiddenChilds( Paragraph* pParagraph ) const
+sal_Bool ParagraphList::HasHiddenChilds( Paragraph* pParagraph ) const
{
- ULONG n = GetAbsPos( pParagraph );
+ sal_uLong n = GetAbsPos( pParagraph );
Paragraph* pNext = GetParagraph( ++n );
- return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? TRUE : FALSE;
+ return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? sal_True : sal_False;
}
-BOOL ParagraphList::HasVisibleChilds( Paragraph* pParagraph ) const
+sal_Bool ParagraphList::HasVisibleChilds( Paragraph* pParagraph ) const
{
- ULONG n = GetAbsPos( pParagraph );
+ sal_uLong n = GetAbsPos( pParagraph );
Paragraph* pNext = GetParagraph( ++n );
- return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? TRUE : FALSE;
+ return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? sal_True : sal_False;
}
-ULONG ParagraphList::GetChildCount( Paragraph* pParent ) const
+sal_uLong ParagraphList::GetChildCount( Paragraph* pParent ) const
{
- ULONG nChildCount = 0;
- ULONG n = GetAbsPos( pParent );
+ sal_uLong nChildCount = 0;
+ sal_uLong n = GetAbsPos( pParent );
Paragraph* pPara = GetParagraph( ++n );
while ( pPara && ( pPara->GetDepth() > pParent->GetDepth() ) )
{
@@ -256,10 +254,10 @@ ULONG ParagraphList::GetChildCount( Paragraph* pParent ) const
return nChildCount;
}
-Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, USHORT& rRelPos */ ) const
+Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, sal_uInt16& rRelPos */ ) const
{
/* rRelPos = 0 */;
- ULONG n = GetAbsPos( pParagraph );
+ sal_uLong n = GetAbsPos( pParagraph );
Paragraph* pPrev = GetParagraph( --n );
while ( pPrev && ( pPrev->GetDepth() >= pParagraph->GetDepth() ) )
{
@@ -273,15 +271,15 @@ Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, USHORT& rRelPos *
void ParagraphList::Expand( Paragraph* pParent )
{
- ULONG nChildCount = GetChildCount( pParent );
- ULONG nPos = GetAbsPos( pParent );
+ sal_uLong nChildCount = GetChildCount( pParent );
+ sal_uLong nPos = GetAbsPos( pParent );
- for ( ULONG n = 1; n <= nChildCount; n++ )
+ for ( sal_uLong n = 1; n <= nChildCount; n++ )
{
Paragraph* pPara = GetParagraph( nPos+n );
if ( !( pPara->IsVisible() ) )
{
- pPara->bVisible = TRUE;
+ pPara->bVisible = sal_True;
aVisibleStateChangedHdl.Call( pPara );
}
}
@@ -289,23 +287,23 @@ void ParagraphList::Expand( Paragraph* pParent )
void ParagraphList::Collapse( Paragraph* pParent )
{
- ULONG nChildCount = GetChildCount( pParent );
- ULONG nPos = GetAbsPos( pParent );
+ sal_uLong nChildCount = GetChildCount( pParent );
+ sal_uLong nPos = GetAbsPos( pParent );
- for ( ULONG n = 1; n <= nChildCount; n++ )
+ for ( sal_uLong n = 1; n <= nChildCount; n++ )
{
Paragraph* pPara = GetParagraph( nPos+n );
if ( pPara->IsVisible() )
{
- pPara->bVisible = FALSE;
+ pPara->bVisible = sal_False;
aVisibleStateChangedHdl.Call( pPara );
}
}
}
-ULONG ParagraphList::GetAbsPos( Paragraph* pParent ) const
+sal_uLong ParagraphList::GetAbsPos( Paragraph* pParent ) const
{
- ULONG pos = 0;
+ sal_uLong pos = 0;
std::vector<Paragraph*>::const_iterator iter;
for (iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++pos)
{
@@ -316,9 +314,9 @@ ULONG ParagraphList::GetAbsPos( Paragraph* pParent ) const
return ~0;
}
-ULONG ParagraphList::GetVisPos( Paragraph* pPara ) const
+sal_uLong ParagraphList::GetVisPos( Paragraph* pPara ) const
{
- ULONG nVisPos = 0;
+ sal_uLong nVisPos = 0;
std::vector<Paragraph*>::const_iterator iter;
for (iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++nVisPos)
{
diff --git a/editeng/source/outliner/paralist.hxx b/editeng/source/outliner/paralist.hxx
index d9095ea1a0..f95ee37fd4 100644
--- a/editeng/source/outliner/paralist.hxx
+++ b/editeng/source/outliner/paralist.hxx
@@ -38,35 +38,35 @@ class Paragraph;
class ParagraphList
{
public:
- void Clear( BOOL bDestroyParagraphs );
+ void Clear( sal_Bool bDestroyParagraphs );
sal_uInt32 GetParagraphCount() const
{
return maEntries.size();
}
- Paragraph* GetParagraph( ULONG nPos ) const
+ Paragraph* GetParagraph( sal_uLong nPos ) const
{
return nPos < maEntries.size() ? maEntries[nPos] : NULL;
}
- ULONG GetAbsPos( Paragraph* pParent ) const;
- ULONG GetVisPos( Paragraph* pParagraph ) const;
+ sal_uLong GetAbsPos( Paragraph* pParent ) const;
+ sal_uLong GetVisPos( Paragraph* pParagraph ) const;
void Append( Paragraph *pPara);
- void Insert( Paragraph* pPara, ULONG nAbsPos);
- void Remove( ULONG nPara );
- void MoveParagraphs( ULONG nStart, ULONG nDest, ULONG nCount );
+ void Insert( Paragraph* pPara, sal_uLong nAbsPos);
+ void Remove( sal_uLong nPara );
+ void MoveParagraphs( sal_uLong nStart, sal_uLong nDest, sal_uLong nCount );
Paragraph* NextVisible( Paragraph* ) const;
Paragraph* PrevVisible( Paragraph* ) const;
Paragraph* LastVisible() const;
- Paragraph* GetParent( Paragraph* pParagraph /*, USHORT& rRelPos */ ) const;
- BOOL HasChilds( Paragraph* pParagraph ) const;
- BOOL HasHiddenChilds( Paragraph* pParagraph ) const;
- BOOL HasVisibleChilds( Paragraph* pParagraph ) const;
- ULONG GetChildCount( Paragraph* pParagraph ) const;
+ Paragraph* GetParent( Paragraph* pParagraph /*, sal_uInt16& rRelPos */ ) const;
+ sal_Bool HasChilds( Paragraph* pParagraph ) const;
+ sal_Bool HasHiddenChilds( Paragraph* pParagraph ) const;
+ sal_Bool HasVisibleChilds( Paragraph* pParagraph ) const;
+ sal_uLong GetChildCount( Paragraph* pParagraph ) const;
void Expand( Paragraph* pParent );
void Collapse( Paragraph* pParent );
diff --git a/editeng/source/rtf/makefile.mk b/editeng/source/rtf/makefile.mk
deleted file mode 100644
index 1af1f0c026..0000000000
--- a/editeng/source/rtf/makefile.mk
+++ /dev/null
@@ -1,47 +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=editeng
-TARGET=rtf
-ENABLE_EXCEPTIONS=TRUE
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/svxrtf.obj \
- $(SLO)$/rtfgrf.obj \
- $(SLO)$/rtfitem.obj
-
-# ==========================================================================
-
-.INCLUDE : target.mk
-
diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx
index 86cc653259..6c9d9b18bb 100644
--- a/editeng/source/rtf/rtfgrf.cxx
+++ b/editeng/source/rtf/rtfgrf.cxx
@@ -41,12 +41,12 @@
using namespace ::rtl;
-static BYTE aPal1[ 2 * 4 ] = {
+static sal_uInt8 aPal1[ 2 * 4 ] = {
0x00, 0x00, 0x00, 0x00, // Black
0xFF, 0xFF, 0xFF, 0x00 // White
};
-static BYTE aPal4[ 16 * 4 ] = {
+static sal_uInt8 aPal4[ 16 * 4 ] = {
0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00,
@@ -65,7 +65,7 @@ static BYTE aPal4[ 16 * 4 ] = {
0xFF, 0xFF, 0xFF, 0x00
};
-static BYTE aPal8[ 256 * 4 ] =
+static sal_uInt8 aPal8[ 256 * 4 ] =
{
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00,
0x80, 0x92, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x00, 0x80, 0x00, 0xAA, 0x00,
@@ -181,14 +181,14 @@ inline short SwapShort( short n )
static void WriteBMPHeader( SvStream& rStream,
const SvxRTFPictureType& rPicType )
{
- ULONG n4Width = rPicType.nWidth;
- ULONG n4Height = rPicType.nHeight;
- USHORT n4ColBits = rPicType.nBitsPerPixel;
+ sal_uInt32 n4Width = rPicType.nWidth;
+ sal_uInt32 n4Height = rPicType.nHeight;
+ sal_uInt16 n4ColBits = rPicType.nBitsPerPixel;
- USHORT nColors = (1 << n4ColBits); // Number of colors (1, 16, 256)
- USHORT nWdtOut = rPicType.nWidthBytes;
+ sal_uInt16 nColors = (1 << n4ColBits); // Number of colors (1, 16, 256)
+ sal_uInt16 nWdtOut = rPicType.nWidthBytes;
if( !nWdtOut )
- nWdtOut = (USHORT)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 );
+ nWdtOut = (sal_uInt16)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 );
long nOffset = 14 + 40; // BMP_FILE_HD_SIZ + sizeof(*pBmpInfo);
if( 256 >= nColors )
@@ -203,7 +203,7 @@ static void WriteBMPHeader( SvStream& rStream,
rStream << SwapLong(40) // sizeof( BmpInfo )
<< SwapLong(n4Width)
<< SwapLong(n4Height)
- << (USHORT)1
+ << (sal_uInt16)1
<< n4ColBits
<< SwapLong(0)
<< SwapLong(0)
@@ -237,7 +237,7 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken )
xub_StrLen n, nLen;
sal_Unicode nVal;
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
const sal_Unicode* pStr = rToken.GetBufferAccess();
sal_Char* pData = (sal_Char*)pStr;
for( n = 0, nLen = rToken.Len(); n < nLen; ++n, ++pStr )
@@ -251,7 +251,7 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken )
else
{
DBG_ASSERT( !this, "invalid Hex value" );
- bValidData = FALSE;
+ bValidData = sal_False;
break;
}
@@ -264,7 +264,7 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken )
return bValidData ? nLen / 2 : STRING_NOTFOUND;
}
-BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
+sal_Bool SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
{
// Delete the old data
rGrf.Clear();
@@ -287,7 +287,7 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
while( _nOpenBrakets && IsParserWorking() && bValidBmp )
{
nToken = GetNextToken();
- USHORT nVal = USHORT( nTokenValue );
+ sal_uInt16 nVal = sal_uInt16( nTokenValue );
switch( nToken )
{
case '}':
@@ -390,7 +390,7 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
{
rStrm.SeekRel(-1);
sal_uInt8 aData[4096];
- ULONG nSize = sizeof(aData);
+ sal_uInt32 nSize = sizeof(aData);
while (rPicType.uPicLen > 0)
{
@@ -447,14 +447,14 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
default:
break;
}
- bFirstTextToken = FALSE;
+ bFirstTextToken = sal_False;
}
if( pTmpFile && SvxRTFPictureType::HEX_MODE == rPicType.nMode )
{
xub_StrLen nTokenLen = HexToBin( aToken );
if( STRING_NOTFOUND == nTokenLen )
- bValidBmp = FALSE;
+ bValidBmp = sal_False;
else
{
pTmpFile->Write( (sal_Char*)aToken.GetBuffer(),
@@ -475,12 +475,12 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
if( bValidBmp )
{
GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
- USHORT nImportFilter = GRFILTER_FORMAT_DONTKNOW;
+ sal_uInt16 nImportFilter = GRFILTER_FORMAT_DONTKNOW;
if( pFilterNm )
{
String sTmp;
- for( USHORT n = pGF->GetImportFormatCount(); n; )
+ for( sal_uInt16 n = pGF->GetImportFormatCount(); n; )
{
sTmp = pGF->GetImportFormatShortName( --n );
if( sTmp.EqualsAscii( pFilterNm ))
@@ -523,8 +523,8 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
else
aSize = OutputDevice::LogicToLogic( aSize,
rGrf.GetPrefMapMode(), aMap );
- rPicType.nWidth = sal::static_int_cast< USHORT >(aSize.Width());
- rPicType.nHeight = sal::static_int_cast< USHORT >(
+ rPicType.nWidth = sal::static_int_cast< sal_uInt16 >(aSize.Width());
+ rPicType.nHeight = sal::static_int_cast< sal_uInt16 >(
aSize.Height());
}
break;
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index bda56e1a9e..64a36aa426 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -98,14 +98,14 @@
// Some helper functions
// char
-inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True)
{ return (const SvxEscapementItem&)rSet.Get( nId,bInP); }
-inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True)
{ return (const SvxLineSpacingItem&)rSet.Get( nId,bInP); }
// frm
-inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True)
{ return (const SvxLRSpaceItem&)rSet.Get( nId,bInP); }
-inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True)
{ return (const SvxULSpaceItem&)rSet.Get( nId,bInP); }
#define PARDID ((RTFPardAttrMapIds*)aPardMap.GetData())
@@ -114,7 +114,7 @@ inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,USHORT nId,BOOL b
void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
SfxPoolItem& rItem )
{
- const USHORT *pNormal = 0, *pCJK = 0, *pCTL = 0;
+ const sal_uInt16 *pNormal = 0, *pCJK = 0, *pCTL = 0;
const RTFPlainAttrMapIds* pIds = (RTFPlainAttrMapIds*)aPlainMap.GetData();
switch( rItem.Which() )
{
@@ -218,30 +218,30 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
{
DBG_ASSERT( pSet, "A SfxItemSet has to be provided as argument!" );
- int bFirstToken = TRUE, bWeiter = TRUE;
- USHORT nStyleNo = 0; // default
+ int bFirstToken = sal_True, bWeiter = sal_True;
+ sal_uInt16 nStyleNo = 0; // default
FontUnderline eUnderline;
FontUnderline eOverline;
FontEmphasisMark eEmphasis;
- bPardTokenRead = FALSE;
+ bPardTokenRead = sal_False;
RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE;
- USHORT nFontAlign;
+ sal_uInt16 nFontAlign;
- int bChkStkPos = !bNewGroup && aAttrStack.Top();
+ int bChkStkPos = !bNewGroup && !aAttrStack.empty();
while( bWeiter && IsParserWorking() ) // as long as known Attribute are recognized
{
switch( nToken )
{
case RTF_PARD:
- RTFPardPlain( TRUE, &pSet );
+ RTFPardPlain( sal_True, &pSet );
ResetPard();
nStyleNo = 0;
- bPardTokenRead = TRUE;
+ bPardTokenRead = sal_True;
break;
case RTF_PLAIN:
- RTFPardPlain( FALSE, &pSet );
+ RTFPardPlain( sal_False, &pSet );
break;
default:
@@ -249,7 +249,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( !bChkStkPos )
break;
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back();
if( !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
pAkt->nSttCnt == pInsPos->GetCntIdx() ))
break;
@@ -263,15 +263,15 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
{
// Open a new Group
SvxRTFItemStackType* pNew = new SvxRTFItemStackType(
- *pAkt, *pInsPos, TRUE );
+ *pAkt, *pInsPos, sal_True );
pNew->SetRTFDefaults( GetRTFDefaults() );
// "Set" all valid attributes up until this point
AttrGroupEnd();
- pAkt = aAttrStack.Top(); // can be changed after AttrGroupEnd!
+ pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); // can be changed after AttrGroupEnd!
pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 );
- aAttrStack.Push( pNew );
+ aAttrStack.push_back( pNew );
pAkt = pNew;
}
else
@@ -279,7 +279,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
pAkt->SetStartPos( *pInsPos );
pSet = &pAkt->aAttrSet;
- } while( FALSE );
+ } while( sal_False );
switch( nToken )
{
@@ -297,18 +297,18 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
{
if( !bFirstToken )
SkipToken( -1 );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
else
{
- nStyleNo = -1 == nTokenValue ? 0 : USHORT(nTokenValue);
- // Set the StyleNumber for the current style on
- // the attribute stack
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ nStyleNo = -1 == nTokenValue ? 0 : sal_uInt16(nTokenValue);
+ // setze am akt. auf dem AttrStack stehenden Style die
+ // StyleNummer
+ SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back();
if( !pAkt )
break;
- pAkt->nStyleNo = USHORT( nStyleNo );
+ pAkt->nStyleNo = sal_uInt16( nStyleNo );
}
break;
@@ -316,14 +316,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
case RTF_KEEP:
if( PARDID->nSplit )
{
- pSet->Put( SvxFmtSplitItem( FALSE, PARDID->nSplit ));
+ pSet->Put( SvxFmtSplitItem( sal_False, PARDID->nSplit ));
}
break;
case RTF_KEEPN:
if( PARDID->nKeep )
{
- pSet->Put( SvxFmtKeepItem( TRUE, PARDID->nKeep ));
+ pSet->Put( SvxFmtKeepItem( sal_True, PARDID->nKeep ));
}
break;
@@ -331,7 +331,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( PARDID->nOutlineLvl )
{
pSet->Put( SfxUInt16Item( PARDID->nOutlineLvl,
- (UINT16)nTokenValue ));
+ (sal_uInt16)nTokenValue ));
}
break;
@@ -364,12 +364,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( PARDID->nLRSpace )
{
SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace ));
- USHORT nSz = 0;
+ sal_uInt16 nSz = 0;
if( -1 != nTokenValue )
{
if( IsCalcValue() )
CalcValue();
- nSz = USHORT(nTokenValue);
+ nSz = sal_uInt16(nTokenValue);
}
aLR.SetTxtFirstLineOfst( nSz );
pSet->Put( aLR );
@@ -381,12 +381,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( PARDID->nLRSpace )
{
SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace ));
- USHORT nSz = 0;
+ sal_uInt16 nSz = 0;
if( 0 < nTokenValue )
{
if( IsCalcValue() )
CalcValue();
- nSz = USHORT(nTokenValue);
+ nSz = sal_uInt16(nTokenValue);
}
aLR.SetTxtLeft( nSz );
pSet->Put( aLR );
@@ -398,12 +398,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( PARDID->nLRSpace )
{
SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace ));
- USHORT nSz = 0;
+ sal_uInt16 nSz = 0;
if( 0 < nTokenValue )
{
if( IsCalcValue() )
CalcValue();
- nSz = USHORT(nTokenValue);
+ nSz = sal_uInt16(nTokenValue);
}
aLR.SetRight( nSz );
pSet->Put( aLR );
@@ -414,12 +414,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( PARDID->nULSpace )
{
SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace ));
- USHORT nSz = 0;
+ sal_uInt16 nSz = 0;
if( 0 < nTokenValue )
{
if( IsCalcValue() )
CalcValue();
- nSz = USHORT(nTokenValue);
+ nSz = sal_uInt16(nTokenValue);
}
aUL.SetUpper( nSz );
pSet->Put( aUL );
@@ -430,12 +430,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( PARDID->nULSpace )
{
SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace ));
- USHORT nSz = 0;
+ sal_uInt16 nSz = 0;
if( 0 < nTokenValue )
{
if( IsCalcValue() )
CalcValue();
- nSz = USHORT(nTokenValue);
+ nSz = sal_uInt16(nTokenValue);
}
aUL.SetLower( nSz );
pSet->Put( aUL );
@@ -447,7 +447,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
{
// then switches to multi-line!
SvxLineSpacingItem aLSpace( GetLineSpacing( *pSet,
- PARDID->nLinespacing, FALSE ));
+ PARDID->nLinespacing, sal_False ));
// how much do you get from the line height value?
@@ -464,7 +464,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( nTokenValue > 200 ) // Data value for PropLnSp
nTokenValue = 200; // is one BYTE !!!
- aLSpace.SetPropLineSpace( (const BYTE)nTokenValue );
+ aLSpace.SetPropLineSpace( (const sal_uInt8)nTokenValue );
aLSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
pSet->Put( aLSpace );
@@ -502,7 +502,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
CalcValue();
if (eLnSpc != SVX_LINE_SPACE_AUTO)
- aLSpace.SetLineHeight( (const USHORT)nTokenValue );
+ aLSpace.SetLineHeight( (const sal_uInt16)nTokenValue );
aLSpace.GetLineSpaceRule() = eLnSpc;
pSet->Put(aLSpace);
@@ -512,14 +512,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
case RTF_NOCWRAP:
if( PARDID->nForbRule )
{
- pSet->Put( SvxForbiddenRuleItem( FALSE,
+ pSet->Put( SvxForbiddenRuleItem( sal_False,
PARDID->nForbRule ));
}
break;
case RTF_NOOVERFLOW:
if( PARDID->nHangPunct )
{
- pSet->Put( SvxHangingPunctuationItem( FALSE,
+ pSet->Put( SvxHangingPunctuationItem( sal_False,
PARDID->nHangPunct ));
}
break;
@@ -527,7 +527,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
case RTF_ASPALPHA:
if( PARDID->nScriptSpace )
{
- pSet->Put( SvxScriptSpaceItem( TRUE,
+ pSet->Put( SvxScriptSpaceItem( sal_True,
PARDID->nScriptSpace ));
}
break;
@@ -584,14 +584,14 @@ SET_FONTALIGNMENT:
case RTF_SUB:
if( PLAINID->nEscapement )
{
- const USHORT nEsc = PLAINID->nEscapement;
+ const sal_uInt16 nEsc = PLAINID->nEscapement;
if( -1 == nTokenValue || RTF_SUB == nToken )
nTokenValue = 6;
if( IsCalcValue() )
CalcValue();
- const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE );
+ const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, sal_False );
short nEs;
- BYTE nProp;
+ sal_uInt8 nProp;
if( DFLT_ESC_AUTO_SUPER == rOld.GetEsc() )
{
nEs = DFLT_ESC_AUTO_SUB;
@@ -609,7 +609,7 @@ SET_FONTALIGNMENT:
case RTF_NOSUPERSUB:
if( PLAINID->nEscapement )
{
- const USHORT nEsc = PLAINID->nEscapement;
+ const sal_uInt16 nEsc = PLAINID->nEscapement;
pSet->Put( SvxEscapementItem( nEsc ));
}
break;
@@ -655,7 +655,7 @@ SET_FONTALIGNMENT:
case RTF_F:
case RTF_AF:
{
- const Font& rSVFont = GetFont( USHORT(nTokenValue) );
+ const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) );
SvxFontItem aTmpItem( rSVFont.GetFamily(),
rSVFont.GetName(), rSVFont.GetStyleName(),
rSVFont.GetPitch(), rSVFont.GetCharSet(),
@@ -683,7 +683,7 @@ SET_FONTALIGNMENT:
// if( IsCalcValue() )
// CalcValue();
SvxFontHeightItem aTmpItem(
- (const USHORT)nTokenValue, 100,
+ (const sal_uInt16)nTokenValue, 100,
SID_ATTR_CHAR_FONTHEIGHT );
SetScriptAttr( eCharType, *pSet, aTmpItem );
}
@@ -704,7 +704,7 @@ SET_FONTALIGNMENT:
if( PLAINID->nContour &&
IsAttrSttPos() ) // not in the text flow?
{
- pSet->Put( SvxContourItem( nTokenValue ? TRUE : FALSE,
+ pSet->Put( SvxContourItem( nTokenValue ? sal_True : sal_False,
PLAINID->nContour ));
}
break;
@@ -713,7 +713,7 @@ SET_FONTALIGNMENT:
if( PLAINID->nShadowed &&
IsAttrSttPos() ) // not in the text flow?
{
- pSet->Put( SvxShadowedItem( nTokenValue ? TRUE : FALSE,
+ pSet->Put( SvxShadowedItem( nTokenValue ? sal_True : sal_False,
PLAINID->nShadowed ));
}
break;
@@ -797,7 +797,7 @@ SET_FONTALIGNMENT:
if( PLAINID->nWordlineMode )
{
- pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode ));
+ pSet->Put( SvxWordLineModeItem( sal_True, PLAINID->nWordlineMode ));
}
goto ATTR_SETUNDERLINE;
@@ -814,7 +814,7 @@ ATTR_SETUNDERLINE:
SvxUnderlineItem aUL( UNDERLINE_SINGLE, PLAINID->nUnderline );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pSet->GetItemState(
- PLAINID->nUnderline, FALSE, &pItem ) )
+ PLAINID->nUnderline, sal_False, &pItem ) )
{
// is switched off ?
if( UNDERLINE_NONE ==
@@ -823,11 +823,11 @@ ATTR_SETUNDERLINE:
aUL = *(SvxUnderlineItem*)pItem;
}
else
- aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, FALSE );
+ aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, sal_False );
if( UNDERLINE_NONE == aUL.GetLineStyle() )
aUL.SetLineStyle( UNDERLINE_SINGLE );
- aUL.SetColor( GetColor( USHORT(nTokenValue) ));
+ aUL.SetColor( GetColor( sal_uInt16(nTokenValue) ));
pSet->Put( aUL );
}
break;
@@ -892,7 +892,7 @@ ATTR_SETUNDERLINE:
if( PLAINID->nWordlineMode )
{
- pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode ));
+ pSet->Put( SvxWordLineModeItem( sal_True, PLAINID->nWordlineMode ));
}
goto ATTR_SETOVERLINE;
@@ -909,7 +909,7 @@ ATTR_SETOVERLINE:
SvxOverlineItem aOL( UNDERLINE_SINGLE, PLAINID->nOverline );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pSet->GetItemState(
- PLAINID->nOverline, FALSE, &pItem ) )
+ PLAINID->nOverline, sal_False, &pItem ) )
{
// is switched off ?
if( UNDERLINE_NONE ==
@@ -918,11 +918,11 @@ ATTR_SETOVERLINE:
aOL = *(SvxOverlineItem*)pItem;
}
else
- aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, FALSE );
+ aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, sal_False );
if( UNDERLINE_NONE == aOL.GetLineStyle() )
aOL.SetLineStyle( UNDERLINE_SINGLE );
- aOL.SetColor( GetColor( USHORT(nTokenValue) ));
+ aOL.SetColor( GetColor( sal_uInt16(nTokenValue) ));
pSet->Put( aOL );
}
break;
@@ -931,14 +931,14 @@ ATTR_SETOVERLINE:
case RTF_SUPER:
if( PLAINID->nEscapement )
{
- const USHORT nEsc = PLAINID->nEscapement;
+ const sal_uInt16 nEsc = PLAINID->nEscapement;
if( -1 == nTokenValue || RTF_SUPER == nToken )
nTokenValue = 6;
if( IsCalcValue() )
CalcValue();
- const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE );
+ const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, sal_False );
short nEs;
- BYTE nProp;
+ sal_uInt8 nProp;
if( DFLT_ESC_AUTO_SUB == rOld.GetEsc() )
{
nEs = DFLT_ESC_AUTO_SUPER;
@@ -956,12 +956,21 @@ ATTR_SETOVERLINE:
case RTF_CF:
if( PLAINID->nColor )
{
- pSet->Put( SvxColorItem( GetColor( USHORT(nTokenValue) ),
+ pSet->Put( SvxColorItem( GetColor( sal_uInt16(nTokenValue) ),
PLAINID->nColor ));
}
break;
//#i12501# While cb is clearly documented in the rtf spec, word
//doesn't accept it at all
+#if 0
+ case RTF_CB:
+ if( PLAINID->nBgColor )
+ {
+ pSet->Put( SvxBrushItem( GetColor( sal_uInt16(nTokenValue) ),
+ PLAINID->nBgColor ));
+ }
+ break;
+#endif
case RTF_LANG:
if( PLAINID->nLanguage )
@@ -987,10 +996,10 @@ ATTR_SETOVERLINE:
break;
case RTF_RTLCH:
- bIsLeftToRightDef = FALSE;
+ bIsLeftToRightDef = sal_False;
break;
case RTF_LTRCH:
- bIsLeftToRightDef = TRUE;
+ bIsLeftToRightDef = sal_True;
break;
case RTF_RTLPAR:
if (PARDID->nDirection)
@@ -1041,7 +1050,7 @@ ATTR_SETEMPHASIS:
default: cStt = 0, cEnd = 0; break;
}
- pSet->Put( SvxTwoLinesItem( TRUE, cStt, cEnd,
+ pSet->Put( SvxTwoLinesItem( sal_True, cStt, cEnd,
PLAINID->nTwoLines ));
}
break;
@@ -1052,7 +1061,7 @@ ATTR_SETEMPHASIS:
//i21372
if (nTokenValue < 1 || nTokenValue > 600)
nTokenValue = 100;
- pSet->Put( SvxCharScaleWidthItem( USHORT(nTokenValue),
+ pSet->Put( SvxCharScaleWidthItem( sal_uInt16(nTokenValue),
PLAINID->nCharScaleX ));
}
break;
@@ -1128,7 +1137,7 @@ ATTR_SETEMPHASIS:
case RTF_SWG_ESCPROP:
{
// Store percentage change!
- BYTE nProp = BYTE( nTokenValue / 100 );
+ sal_uInt8 nProp = sal_uInt8( nTokenValue / 100 );
short nEsc = 0;
if( 1 == ( nTokenValue % 100 ))
// Recognize own auto-flags!
@@ -1143,10 +1152,10 @@ ATTR_SETEMPHASIS:
case RTF_HYPHEN:
{
SvxHyphenZoneItem aHypenZone(
- (nTokenValue & 1) ? TRUE : FALSE,
+ (nTokenValue & 1) ? sal_True : sal_False,
PARDID->nHyphenzone );
aHypenZone.SetPageEnd(
- (nTokenValue & 2) ? TRUE : FALSE );
+ (nTokenValue & 2) ? sal_True : sal_False );
if( PARDID->nHyphenzone &&
RTF_HYPHLEAD == GetNextToken() &&
@@ -1154,11 +1163,11 @@ ATTR_SETEMPHASIS:
RTF_HYPHMAX == GetNextToken() )
{
aHypenZone.GetMinLead() =
- BYTE(GetStackPtr( -2 )->nTokenValue);
+ sal_uInt8(GetStackPtr( -2 )->nTokenValue);
aHypenZone.GetMinTrail() =
- BYTE(GetStackPtr( -1 )->nTokenValue);
+ sal_uInt8(GetStackPtr( -1 )->nTokenValue);
aHypenZone.GetMaxHyphens() =
- BYTE(nTokenValue);
+ sal_uInt8(nTokenValue);
pSet->Put( aHypenZone );
}
@@ -1169,19 +1178,19 @@ ATTR_SETEMPHASIS:
case RTF_SHADOW:
{
- int bSkip = TRUE;
+ int bSkip = sal_True;
do { // middle check loop
SvxShadowLocation eSL = SvxShadowLocation( nTokenValue );
if( RTF_SHDW_DIST != GetNextToken() )
break;
- USHORT nDist = USHORT( nTokenValue );
+ sal_uInt16 nDist = sal_uInt16( nTokenValue );
if( RTF_SHDW_STYLE != GetNextToken() )
break;
if( RTF_SHDW_COL != GetNextToken() )
break;
- USHORT nCol = USHORT( nTokenValue );
+ sal_uInt16 nCol = sal_uInt16( nTokenValue );
if( RTF_SHDW_FCOL != GetNextToken() )
break;
@@ -1192,8 +1201,8 @@ ATTR_SETEMPHASIS:
pSet->Put( SvxShadowItem( PARDID->nShadow,
&aColor, nDist, eSL ) );
- bSkip = FALSE;
- } while( FALSE );
+ bSkip = sal_False;
+ } while( sal_False );
if( bSkip )
SkipGroup(); // at the end of the group
@@ -1256,7 +1265,7 @@ ATTR_SETEMPHASIS:
if (!bFirstToken)
--nSkip; // BRACELEFT: is the next token
SkipToken( nSkip );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
@@ -1272,7 +1281,7 @@ ATTR_SETEMPHASIS:
// unknown token, so token "returned in Parser"
if( !bFirstToken )
SkipToken( -1 );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
}
@@ -1280,7 +1289,7 @@ ATTR_SETEMPHASIS:
{
nToken = GetNextToken();
}
- bFirstToken = FALSE;
+ bFirstToken = sal_False;
}
}
@@ -1290,7 +1299,7 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet )
// then read all the TabStops
SvxTabStop aTabStop;
SvxTabStopItem aAttr( 0, 0, SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop );
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
do {
switch( nToken )
{
@@ -1334,8 +1343,8 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet )
nSkip = -2;
else
{
- aTabStop.GetDecimal() = BYTE(nTokenValue & 0xff);
- aTabStop.GetFill() = BYTE((nTokenValue >> 8) & 0xff);
+ aTabStop.GetDecimal() = sal_uInt8(nTokenValue & 0xff);
+ aTabStop.GetFill() = sal_uInt8((nTokenValue >> 8) & 0xff);
// overwrite the closing parenthesis
if (bMethodOwnsToken)
GetNextToken();
@@ -1343,13 +1352,13 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet )
if( nSkip )
{
SkipToken( nSkip ); // Ignore back again
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
default:
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
if( bWeiter )
{
@@ -1398,11 +1407,11 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
// then read the border attribute
SvxBoxItem aAttr( PARDID->nBox );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, sal_False, &pItem ) )
aAttr = *(SvxBoxItem*)pItem;
SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0, 0, 0 ); // simple lines
- int bWeiter = TRUE, nBorderTyp = 0;
+ int bWeiter = sal_True, nBorderTyp = 0;
do {
switch( nToken )
@@ -1453,23 +1462,23 @@ SETBORDER:
switch( nBorderTyp )
{
case RTF_BRDRB:
- aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_BOTTOM );
+ aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_BOTTOM );
break;
case RTF_BRDRT:
- aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_TOP );
+ aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_TOP );
break;
case RTF_BRDRL:
- aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_LEFT );
+ aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_LEFT );
break;
case RTF_BRDRR:
- aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_RIGHT );
+ aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_RIGHT );
break;
case RTF_BOX:
- aAttr.SetDistance( (USHORT)nTokenValue );
+ aAttr.SetDistance( (sal_uInt16)nTokenValue );
break;
}
}
@@ -1481,7 +1490,7 @@ case RTF_BRDRBAR: break;
case RTF_BRDRCF:
{
- aBrd.SetColor( GetColor( USHORT(nTokenValue) ) );
+ aBrd.SetColor( GetColor( sal_uInt16(nTokenValue) ) );
SetBorderLine( nBorderTyp, aAttr, aBrd );
}
break;
@@ -1577,13 +1586,13 @@ SETBORDERLINE:
nSkip = -1;
else
{
- int bSwgControl = TRUE, bFirstToken = TRUE;
+ int bSwgControl = sal_True, bFirstToken = sal_True;
nToken = GetNextToken();
do {
switch( nToken )
{
case RTF_BRDBOX:
- aAttr.SetDistance( USHORT(nTokenValue) );
+ aAttr.SetDistance( sal_uInt16(nTokenValue) );
break;
case RTF_BRDRT:
@@ -1591,46 +1600,46 @@ SETBORDERLINE:
case RTF_BRDRR:
case RTF_BRDRL:
nBorderTyp = nToken;
- bFirstToken = FALSE;
+ bFirstToken = sal_False;
if( RTF_BRDLINE_COL != GetNextToken() )
{
- bSwgControl = FALSE;
+ bSwgControl = sal_False;
break;
}
- aBrd.SetColor( GetColor( USHORT(nTokenValue) ));
+ aBrd.SetColor( GetColor( sal_uInt16(nTokenValue) ));
if( RTF_BRDLINE_IN != GetNextToken() )
{
- bSwgControl = FALSE;
+ bSwgControl = sal_False;
break;
}
- aBrd.SetInWidth( USHORT(nTokenValue));
+ aBrd.SetInWidth( sal_uInt16(nTokenValue));
if( RTF_BRDLINE_OUT != GetNextToken() )
{
- bSwgControl = FALSE;
+ bSwgControl = sal_False;
break;
}
- aBrd.SetOutWidth( USHORT(nTokenValue));
+ aBrd.SetOutWidth( sal_uInt16(nTokenValue));
if( RTF_BRDLINE_DIST != GetNextToken() )
{
- bSwgControl = FALSE;
+ bSwgControl = sal_False;
break;
}
- aBrd.SetDistance( USHORT(nTokenValue));
+ aBrd.SetDistance( sal_uInt16(nTokenValue));
SetBorderLine( nBorderTyp, aAttr, aBrd );
break;
default:
- bSwgControl = FALSE;
+ bSwgControl = sal_False;
break;
}
if( bSwgControl )
{
nToken = GetNextToken();
- bFirstToken = FALSE;
+ bFirstToken = sal_False;
}
} while( bSwgControl );
@@ -1652,7 +1661,7 @@ SETBORDERLINE:
if( nSkip )
{
SkipToken( nSkip ); // Ignore back again
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
@@ -1667,7 +1676,7 @@ SETBORDERLINE:
SkipToken( -1 );
}
-inline ULONG CalcShading( ULONG nColor, ULONG nFillColor, BYTE nShading )
+inline sal_uInt32 CalcShading( sal_uInt32 nColor, sal_uInt32 nFillColor, sal_uInt8 nShading )
{
nColor = (nColor * nShading) / 100;
nFillColor = (nFillColor * ( 100 - nShading )) / 100;
@@ -1678,11 +1687,11 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet,
int bTableDef )
{
// then read the border attribute
- int bWeiter = TRUE;
- USHORT nColor = USHRT_MAX, nFillColor = USHRT_MAX;
- BYTE nFillValue = 0;
+ int bWeiter = sal_True;
+ sal_uInt16 nColor = USHRT_MAX, nFillColor = USHRT_MAX;
+ sal_uInt8 nFillValue = 0;
- USHORT nWh = ( nToken & ~0xff ) == RTF_CHRFMT
+ sal_uInt16 nWh = ( nToken & ~0xff ) == RTF_CHRFMT
? PLAINID->nBgColor
: PARDID->nBrush;
@@ -1692,19 +1701,19 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet,
case RTF_CLCBPAT:
case RTF_CHCBPAT:
case RTF_CBPAT:
- nFillColor = USHORT( nTokenValue );
+ nFillColor = sal_uInt16( nTokenValue );
break;
case RTF_CLCFPAT:
case RTF_CHCFPAT:
case RTF_CFPAT:
- nColor = USHORT( nTokenValue );
+ nColor = sal_uInt16( nTokenValue );
break;
case RTF_CLSHDNG:
case RTF_CHSHDNG:
case RTF_SHADING:
- nFillValue = (BYTE)( nTokenValue / 100 );
+ nFillValue = (sal_uInt8)( nTokenValue / 100 );
break;
case RTF_CLBGDKHOR:
@@ -1791,9 +1800,9 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet,
aColor = aCol;
else
aColor = Color(
- (BYTE)CalcShading( aCol.GetRed(), aFCol.GetRed(), nFillValue ),
- (BYTE)CalcShading( aCol.GetGreen(), aFCol.GetGreen(), nFillValue ),
- (BYTE)CalcShading( aCol.GetBlue(), aFCol.GetBlue(), nFillValue ) );
+ (sal_uInt8)CalcShading( aCol.GetRed(), aFCol.GetRed(), nFillValue ),
+ (sal_uInt8)CalcShading( aCol.GetGreen(), aFCol.GetGreen(), nFillValue ),
+ (sal_uInt8)CalcShading( aCol.GetBlue(), aFCol.GetBlue(), nFillValue ) );
rSet.Put( SvxBrushItem( aColor, nWh ) );
SkipToken( -1 );
@@ -1803,12 +1812,12 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet,
// pard / plain abarbeiten
void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
{
- if( !bNewGroup && aAttrStack.Top() ) // not at the beginning of a new group
+ if( !bNewGroup && !aAttrStack.empty() ) // not at the beginning of a new group
{
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.back();
int nLastToken = GetStackPtr(-1)->nTokenId;
- int bNewStkEntry = TRUE;
+ int bNewStkEntry = sal_True;
if( RTF_PARD != nLastToken &&
RTF_PLAIN != nLastToken &&
BRACELEFT != nLastToken )
@@ -1816,21 +1825,21 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
if( pAkt->aAttrSet.Count() || pAkt->pChildList || pAkt->nStyleNo )
{
// open a new group
- SvxRTFItemStackType* pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, TRUE );
+ SvxRTFItemStackType* pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, sal_True );
pNew->SetRTFDefaults( GetRTFDefaults() );
// Set all until here valid attributes
AttrGroupEnd();
- pAkt = aAttrStack.Top(); // can be changed after AttrGroupEnd!
+ pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); // can be changed after AttrGroupEnd!
pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 );
- aAttrStack.Push( pNew );
+ aAttrStack.push_back( pNew );
pAkt = pNew;
}
else
{
// continue to use this entry as new
pAkt->SetStartPos( *pInsPos );
- bNewStkEntry = FALSE;
+ bNewStkEntry = sal_False;
}
}
@@ -1839,8 +1848,8 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
( pAkt->aAttrSet.GetParent() || pAkt->aAttrSet.Count() ))
{
const SfxPoolItem *pItem, *pDef;
- const USHORT* pPtr;
- USHORT nCnt;
+ const sal_uInt16* pPtr;
+ sal_uInt16 nCnt;
const SfxItemSet* pDfltSet = &GetRTFDefaults();
if( bPard )
{
@@ -1854,7 +1863,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
nCnt = aPlainMap.Count();
}
- for( USHORT n = 0; n < nCnt; ++n, ++pPtr )
+ for( sal_uInt16 n = 0; n < nCnt; ++n, ++pPtr )
{
// Item set and different -> Set the Default Pool
if( !*pPtr )
@@ -1866,19 +1875,19 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
else if( !pAkt->aAttrSet.GetParent() )
{
if( SFX_ITEM_SET ==
- pDfltSet->GetItemState( *pPtr, FALSE, &pDef ))
+ pDfltSet->GetItemState( *pPtr, sal_False, &pDef ))
pAkt->aAttrSet.Put( *pDef );
else
pAkt->aAttrSet.ClearItem( *pPtr );
}
else if( SFX_ITEM_SET == pAkt->aAttrSet.GetParent()->
- GetItemState( *pPtr, TRUE, &pItem ) &&
+ GetItemState( *pPtr, sal_True, &pItem ) &&
*( pDef = &pDfltSet->Get( *pPtr )) != *pItem )
pAkt->aAttrSet.Put( *pDef );
else
{
if( SFX_ITEM_SET ==
- pDfltSet->GetItemState( *pPtr, FALSE, &pDef ))
+ pDfltSet->GetItemState( *pPtr, sal_False, &pDef ))
pAkt->aAttrSet.Put( *pDef );
else
pAkt->aAttrSet.ClearItem( *pPtr );
@@ -1897,7 +1906,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
//we can fall back to the ansicpg set codeset
if (nDfltFont != -1)
{
- const Font& rSVFont = GetFont(USHORT(nDfltFont));
+ const Font& rSVFont = GetFont(sal_uInt16(nDfltFont));
SetEncoding(rSVFont.GetCharSet());
}
else
@@ -1912,16 +1921,16 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
return;
SfxItemSet aTmp( *pAttrPool, aWhichMap.GetData() );
- BOOL bOldFlag = bIsLeftToRightDef;
- bIsLeftToRightDef = TRUE;
+ sal_Bool bOldFlag = bIsLeftToRightDef;
+ bIsLeftToRightDef = sal_True;
switch( nToken )
{
- case RTF_ADEFF: bIsLeftToRightDef = FALSE; // no break!
+ case RTF_ADEFF: bIsLeftToRightDef = sal_False; // no break!
case RTF_DEFF:
{
if( -1 == nValue )
nValue = 0;
- const Font& rSVFont = GetFont( USHORT(nValue) );
+ const Font& rSVFont = GetFont( sal_uInt16(nValue) );
SvxFontItem aTmpItem(
rSVFont.GetFamily(), rSVFont.GetName(),
rSVFont.GetStyleName(), rSVFont.GetPitch(),
@@ -1930,7 +1939,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
}
break;
- case RTF_ADEFLANG: bIsLeftToRightDef = FALSE; // no break!
+ case RTF_ADEFLANG: bIsLeftToRightDef = sal_False; // no break!
case RTF_DEFLANG:
// store default Language
if( -1 != nValue )
@@ -1945,7 +1954,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
if( PARDID->nTabStop )
{
// RTF defines 720 twips as default
- bIsSetDfltTab = TRUE;
+ bIsSetDfltTab = sal_True;
if( -1 == nValue || !nValue )
nValue = 720;
@@ -1960,7 +1969,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
// Calculate the ratio of default TabWidth / Tabs and
// calculate the corresponding new number.
// ?? how did one come up with 13 ??
- USHORT nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / USHORT(nValue);
+ sal_uInt16 nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / sal_uInt16(nValue);
/*
cmc, make sure we have at least one, or all hell breaks loose in
everybodies exporters, #i8247#
@@ -1969,7 +1978,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
nAnzTabs = 1;
// we want Defaulttabs
- SvxTabStopItem aNewTab( nAnzTabs, USHORT(nValue),
+ SvxTabStopItem aNewTab( nAnzTabs, sal_uInt16(nValue),
SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop );
while( nAnzTabs )
((SvxTabStop&)aNewTab[ --nAnzTabs ]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
@@ -1984,7 +1993,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
{
SfxItemIter aIter( aTmp );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
pAttrPool->SetPoolDefaultItem( *pItem );
if( aIter.IsAtEnd() )
diff --git a/editeng/source/rtf/segincr.asm b/editeng/source/rtf/segincr.asm
index 27575f74ad..27575f74ad 100644..100755
--- a/editeng/source/rtf/segincr.asm
+++ b/editeng/source/rtf/segincr.asm
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 5dc21b9c20..0041f87fcf 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -53,7 +53,6 @@
using namespace ::com::sun::star;
-SV_IMPL_PTRARR( SvxRTFColorTbl, ColorPtr )
SV_IMPL_PTRARR( SvxRTFItemStackList, SvxRTFItemStackType* )
CharSet lcl_GetDefaultTextEncodingForRTF()
@@ -81,7 +80,6 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
int bReadNewDoc )
: SvRTFParser( rIn, 5 ),
rStrm(rIn),
- aColorTbl( 16, 4 ),
aFontTbl( 16, 4 ),
pInsPos( 0 ),
pAttrPool( &rPool ),
@@ -91,18 +89,18 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
{
bNewDoc = bReadNewDoc;
- bChkStyleAttr = bCalcValue = bReadDocInfo = bIsInReadStyleTab = FALSE;
- bIsLeftToRightDef = TRUE;
+ bChkStyleAttr = bCalcValue = bReadDocInfo = bIsInReadStyleTab = sal_False;
+ bIsLeftToRightDef = sal_True;
{
RTFPlainAttrMapIds aTmp( rPool );
- aPlainMap.Insert( (USHORT*)&aTmp,
- sizeof( RTFPlainAttrMapIds ) / sizeof(USHORT), 0 );
+ aPlainMap.Insert( (sal_uInt16*)&aTmp,
+ sizeof( RTFPlainAttrMapIds ) / sizeof(sal_uInt16), 0 );
}
{
RTFPardAttrMapIds aTmp( rPool );
- aPardMap.Insert( (USHORT*)&aTmp,
- sizeof( RTFPardAttrMapIds ) / sizeof(USHORT), 0 );
+ aPardMap.Insert( (sal_uInt16*)&aTmp,
+ sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16), 0 );
}
pDfltFont = new Font;
pDfltColor = new Color;
@@ -122,13 +120,13 @@ void SvxRTFParser::ResetPard()
SvxRTFParser::~SvxRTFParser()
{
- if( aColorTbl.Count() )
+ if( !aColorTbl.empty() )
ClearColorTbl();
if( aFontTbl.Count() )
ClearFontTbl();
if( aStyleTbl.Count() )
ClearStyleTbl();
- if( aAttrStack.Count() )
+ if( !aAttrStack.empty() )
ClearAttrStack();
delete pRTFDefaults;
@@ -152,17 +150,17 @@ SvParserState SvxRTFParser::CallParser()
if( !pInsPos )
return SVPAR_ERROR;
- if( aColorTbl.Count() )
+ if( !aColorTbl.empty() )
ClearColorTbl();
if( aFontTbl.Count() )
ClearFontTbl();
if( aStyleTbl.Count() )
ClearStyleTbl();
- if( aAttrStack.Count() )
+ if( !aAttrStack.empty() )
ClearAttrStack();
- bIsSetDfltTab = FALSE;
- bNewGroup = FALSE;
+ bIsSetDfltTab = sal_False;
+ bNewGroup = sal_False;
nDfltFont = 0;
sBaseURL.Erase();
@@ -237,7 +235,7 @@ INSINGLECHAR:
{
InsertText();
// all collected Attributes are set
- for( USHORT n = aAttrSetList.Count(); n; )
+ for( sal_uInt16 n = aAttrSetList.Count(); n; )
{
SvxRTFItemStackType* pStkSet = aAttrSetList[--n];
SetAttrSet( *pStkSet );
@@ -347,8 +345,8 @@ void SvxRTFParser::ReadStyleTable()
SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, aWhichMap.GetData() );
pStyle->aAttrSet.Put( GetRTFDefaults() );
- bIsInReadStyleTab = TRUE;
- bChkStyleAttr = FALSE; // Do not check Attribute against the Styles
+ bIsInReadStyleTab = sal_True;
+ bChkStyleAttr = sal_False; // Do not check Attribute against the Styles
while( _nOpenBrakets && IsParserWorking() )
{
@@ -379,13 +377,13 @@ void SvxRTFParser::ReadStyleTable()
}
break;
- case RTF_SBASEDON: pStyle->nBasedOn = USHORT(nTokenValue); pStyle->bBasedOnIsSet=TRUE; break;
- case RTF_SNEXT: pStyle->nNext = USHORT(nTokenValue); break;
+ case RTF_SBASEDON: pStyle->nBasedOn = sal_uInt16(nTokenValue); pStyle->bBasedOnIsSet=sal_True; break;
+ case RTF_SNEXT: pStyle->nNext = sal_uInt16(nTokenValue); break;
case RTF_OUTLINELEVEL:
- case RTF_SOUTLVL: pStyle->nOutlineNo = BYTE(nTokenValue); break;
+ case RTF_SOUTLVL: pStyle->nOutlineNo = sal_uInt8(nTokenValue); break;
case RTF_S: nStyleNo = (short)nTokenValue; break;
case RTF_CS: nStyleNo = (short)nTokenValue;
- pStyle->bIsCharFmt = TRUE;
+ pStyle->bIsCharFmt = sal_True;
break;
case RTF_TEXTTOKEN:
@@ -437,21 +435,21 @@ void SvxRTFParser::ReadStyleTable()
// Flag back to old state
bChkStyleAttr = bSaveChkStyleAttr;
- bIsInReadStyleTab = FALSE;
+ bIsInReadStyleTab = sal_False;
}
void SvxRTFParser::ReadColorTable()
{
int nToken;
- BYTE nRed = 0xff, nGreen = 0xff, nBlue = 0xff;
+ sal_uInt8 nRed = 0xff, nGreen = 0xff, nBlue = 0xff;
while( '}' != ( nToken = GetNextToken() ) && IsParserWorking() )
{
switch( nToken )
{
- case RTF_RED: nRed = BYTE(nTokenValue); break;
- case RTF_GREEN: nGreen = BYTE(nTokenValue); break;
- case RTF_BLUE: nBlue = BYTE(nTokenValue); break;
+ case RTF_RED: nRed = sal_uInt8(nTokenValue); break;
+ case RTF_GREEN: nGreen = sal_uInt8(nTokenValue); break;
+ case RTF_BLUE: nBlue = sal_uInt8(nTokenValue); break;
case RTF_TEXTTOKEN:
if( 1 == aToken.Len()
@@ -467,10 +465,10 @@ void SvxRTFParser::ReadColorTable()
// one color is finished, fill in the table
// try to map the values to SV internal names
ColorPtr pColor = new Color( nRed, nGreen, nBlue );
- if( !aColorTbl.Count() &&
- BYTE(-1) == nRed && BYTE(-1) == nGreen && BYTE(-1) == nBlue )
+ if( aColorTbl.empty() &&
+ sal_uInt8(-1) == nRed && sal_uInt8(-1) == nGreen && sal_uInt8(-1) == nBlue )
pColor->SetColor( COL_AUTO );
- aColorTbl.Insert( pColor, aColorTbl.Count() );
+ aColorTbl.push_back( pColor );
nRed = 0, nGreen = 0, nBlue = 0;
// Color has been completely read,
@@ -490,7 +488,7 @@ void SvxRTFParser::ReadFontTable()
Font* pFont = new Font();
short nFontNo(0), nInsFontNo (0);
String sAltNm, sFntNm;
- BOOL bIsAltFntNm = FALSE, bCheckNewFont;
+ sal_Bool bIsAltFntNm = sal_False, bCheckNewFont;
CharSet nSystemChar = lcl_GetDefaultTextEncodingForRTF();
pFont->SetCharSet( nSystemChar );
@@ -498,16 +496,16 @@ void SvxRTFParser::ReadFontTable()
while( _nOpenBrakets && IsParserWorking() )
{
- bCheckNewFont = FALSE;
+ bCheckNewFont = sal_False;
switch( ( nToken = GetNextToken() ))
{
case '}':
- bIsAltFntNm = FALSE;
+ bIsAltFntNm = sal_False;
// Style has been completely read,
// so this is still a stable status
if( --_nOpenBrakets <= 1 && IsParserWorking() )
SaveState( RTF_FONTTBL );
- bCheckNewFont = TRUE;
+ bCheckNewFont = sal_True;
nInsFontNo = nFontNo;
break;
case '{':
@@ -556,7 +554,7 @@ void SvxRTFParser::ReadFontTable()
if (-1 != nTokenValue)
{
CharSet nCharSet = rtl_getTextEncodingFromWindowsCharset(
- (BYTE)nTokenValue);
+ (sal_uInt8)nTokenValue);
pFont->SetCharSet(nCharSet);
//When we're in a font, the fontname is in the font
//charset, except for symbol fonts I believe
@@ -577,12 +575,12 @@ void SvxRTFParser::ReadFontTable()
}
break;
case RTF_F:
- bCheckNewFont = TRUE;
+ bCheckNewFont = sal_True;
nInsFontNo = nFontNo;
nFontNo = (short)nTokenValue;
break;
case RTF_FALT:
- bIsAltFntNm = TRUE;
+ bIsAltFntNm = sal_True;
break;
case RTF_TEXTTOKEN:
DelCharAtEnd( aToken, ';' );
@@ -670,19 +668,19 @@ String& SvxRTFParser::GetTextToEndGroup( String& rStr )
util::DateTime SvxRTFParser::GetDateTimeStamp( )
{
util::DateTime aDT;
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
int nToken;
while( bWeiter && IsParserWorking() )
{
switch( nToken = GetNextToken() )
{
- case RTF_YR: aDT.Year = (USHORT)nTokenValue; break;
- case RTF_MO: aDT.Month = (USHORT)nTokenValue; break;
- case RTF_DY: aDT.Day = (USHORT)nTokenValue; break;
- case RTF_HR: aDT.Hours = (USHORT)nTokenValue; break;
- case RTF_MIN: aDT.Minutes = (USHORT)nTokenValue; break;
+ case RTF_YR: aDT.Year = (sal_uInt16)nTokenValue; break;
+ case RTF_MO: aDT.Month = (sal_uInt16)nTokenValue; break;
+ case RTF_DY: aDT.Day = (sal_uInt16)nTokenValue; break;
+ case RTF_HR: aDT.Hours = (sal_uInt16)nTokenValue; break;
+ case RTF_MIN: aDT.Minutes = (sal_uInt16)nTokenValue; break;
default:
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
SkipToken( -1 ); // the closing brace is evaluated "above"
@@ -795,27 +793,32 @@ void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
void SvxRTFParser::ClearColorTbl()
{
- aColorTbl.DeleteAndDestroy( 0, aColorTbl.Count() );
+ while ( !aColorTbl.empty() )
+ {
+ delete aColorTbl.back();
+ aColorTbl.pop_back();
+ }
}
void SvxRTFParser::ClearFontTbl()
{
- for( ULONG nCnt = aFontTbl.Count(); nCnt; )
+ for( sal_uInt32 nCnt = aFontTbl.Count(); nCnt; )
delete aFontTbl.GetObject( --nCnt );
}
void SvxRTFParser::ClearStyleTbl()
{
- for( ULONG nCnt = aStyleTbl.Count(); nCnt; )
+ for( sal_uInt32 nCnt = aStyleTbl.Count(); nCnt; )
delete aStyleTbl.GetObject( --nCnt );
}
void SvxRTFParser::ClearAttrStack()
{
SvxRTFItemStackType* pTmp;
- for( ULONG nCnt = aAttrStack.Count(); nCnt; --nCnt )
+ for( size_t nCnt = aAttrStack.size(); nCnt; --nCnt )
{
- pTmp = aAttrStack.Pop();
+ pTmp = aAttrStack.back();
+ aAttrStack.pop_back();
delete pTmp;
}
}
@@ -832,7 +835,7 @@ String& SvxRTFParser::DelCharAtEnd( String& rStr, const sal_Unicode cDel )
}
-const Font& SvxRTFParser::GetFont( USHORT nId )
+const Font& SvxRTFParser::GetFont( sal_uInt16 nId )
{
const Font* pFont = aFontTbl.Get( nId );
if( !pFont )
@@ -849,7 +852,7 @@ const Font& SvxRTFParser::GetFont( USHORT nId )
SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
{
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back();
SvxRTFItemStackType* pNew;
if( pAkt )
pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, bCopyAttr );
@@ -858,8 +861,8 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
*pInsPos );
pNew->SetRTFDefaults( GetRTFDefaults() );
- aAttrStack.Push( pNew );
- bNewGroup = FALSE;
+ aAttrStack.push_back( pNew );
+ bNewGroup = sal_False;
return pNew;
}
@@ -878,10 +881,10 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType )
!rStkType.GetAttrSet().Count() ||
0 == ( pStyle = aStyleTbl.Get( rStkType.nStyleNo ) ))
{
- for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
+ for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
{
if( SFX_WHICH_MAX > nWhich &&
- SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) &&
+ SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) &&
rPool.GetDefaultItem( nWhich ) == *pItem )
rSet.ClearItem( nWhich ); // delete
}
@@ -892,16 +895,16 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType )
// from the current AttrSet.
SfxItemSet &rStyleSet = pStyle->aAttrSet;
const SfxPoolItem* pSItem;
- for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
+ for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
{
- if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, TRUE, &pSItem ))
+ if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, sal_True, &pSItem ))
{
- if( SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem )
+ if( SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem )
&& *pItem == *pSItem )
rSet.ClearItem( nWhich ); // delete
}
else if( SFX_WHICH_MAX > nWhich &&
- SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) &&
+ SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) &&
rPool.GetDefaultItem( nWhich ) == *pItem )
rSet.ClearItem( nWhich ); // delete
}
@@ -910,13 +913,14 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType )
void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
{
- if( aAttrStack.Count() )
+ if( !aAttrStack.empty() )
{
- SvxRTFItemStackType *pOld = aAttrStack.Pop();
- SvxRTFItemStackType *pAkt = aAttrStack.Top();
+ SvxRTFItemStackType *pOld = aAttrStack.empty() ? 0 : aAttrStack.back();
+ aAttrStack.pop_back();
+ SvxRTFItemStackType *pAkt = aAttrStack.empty() ? 0 : aAttrStack.back();
do { // middle check loop
- ULONG nOldSttNdIdx = pOld->pSttNd->GetIdx();
+ sal_uLong nOldSttNdIdx = pOld->pSttNd->GetIdx();
if( !pOld->pChildList &&
((!pOld->aAttrSet.Count() && !pOld->nStyleNo ) ||
(nOldSttNdIdx == pInsPos->GetNodeIdx() &&
@@ -928,10 +932,10 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
{
SfxItemIter aIter( pOld->aAttrSet );
const SfxPoolItem* pItem = aIter.GetCurItem(), *pGet;
- while( TRUE )
+ while( sal_True )
{
if( SFX_ITEM_SET == pAkt->aAttrSet.GetItemState(
- pItem->Which(), FALSE, &pGet ) &&
+ pItem->Which(), sal_False, &pGet ) &&
*pItem == *pGet )
pOld->aAttrSet.ClearItem( pItem->Which() );
@@ -950,8 +954,8 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
if( bCrsrBack )
{
// at the beginning of a paragraph? Move back one position
- ULONG nNd = pInsPos->GetNodeIdx();
- MovePos( FALSE );
+ sal_uLong nNd = pInsPos->GetNodeIdx();
+ MovePos( sal_False );
// if can not move backward then later dont move forward !
bCrsrBack = nNd != pInsPos->GetNodeIdx();
}
@@ -975,11 +979,11 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
// - all paragraph attributes to get the area
// up to the previous paragraph
SvxRTFItemStackType* pNew = new SvxRTFItemStackType(
- *pOld, *pInsPos, TRUE );
+ *pOld, *pInsPos, sal_True );
pNew->aAttrSet.SetParent( pOld->aAttrSet.GetParent() );
// Delete all paragraph attributes from pNew
- for( USHORT n = 0; n < aPardMap.Count() &&
+ for( sal_uInt16 n = 0; n < aPardMap.Count() &&
pNew->aAttrSet.Count(); ++n )
if( aPardMap[n] )
pNew->aAttrSet.ClearItem( aPardMap[n] );
@@ -1045,19 +1049,19 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
if( bCrsrBack && 50 < pAkt->pChildList->Count() )
{
// at the beginning of a paragraph? Move back one position
- MovePos( TRUE );
- bCrsrBack = FALSE;
+ MovePos( sal_True );
+ bCrsrBack = sal_False;
// Open a new Group.
SvxRTFItemStackType* pNew = new SvxRTFItemStackType(
- *pAkt, *pInsPos, TRUE );
+ *pAkt, *pInsPos, sal_True );
pNew->SetRTFDefaults( GetRTFDefaults() );
// Set all until here valid Attributes
AttrGroupEnd();
- pAkt = aAttrStack.Top(); // can be changed after AttrGroupEnd!
+ pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); // can be changed after AttrGroupEnd!
pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 );
- aAttrStack.Push( pNew );
+ aAttrStack.push_back( pNew );
pAkt = pNew;
}
}
@@ -1071,24 +1075,24 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
if( bCrsrBack )
// at the beginning of a paragraph? Move back one position
- MovePos( TRUE );
+ MovePos( sal_True );
- } while( FALSE );
+ } while( sal_False );
if( pOld )
delete pOld;
- bNewGroup = FALSE;
+ bNewGroup = sal_False;
}
}
void SvxRTFParser::SetAllAttrOfStk() // end all Attr. and set it into doc
{
- // Yet to get all Attrbutes from the stack!
- while( aAttrStack.Count() )
+ // repeat until all attributes will be taken from stack
+ while( !aAttrStack.empty() )
AttrGroupEnd();
- for( USHORT n = aAttrSetList.Count(); n; )
+ for( sal_uInt16 n = aAttrSetList.Count(); n; )
{
SvxRTFItemStackType* pStkSet = aAttrSetList[--n];
SetAttrSet( *pStkSet );
@@ -1110,14 +1114,14 @@ void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet )
// then process all the children
if( rSet.pChildList )
- for( USHORT n = 0; n < rSet.pChildList->Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSet.pChildList->Count(); ++n )
SetAttrSet( *(*rSet.pChildList)[ n ] );
}
// Has no Text been inserted yet? (SttPos from the top Stack entry!)
int SvxRTFParser::IsAttrSttPos()
{
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back();
return !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
pAkt->nSttCnt == pInsPos->GetCntIdx());
}
@@ -1131,13 +1135,13 @@ void SvxRTFParser::BuildWhichTbl()
{
if( aWhichMap.Count() )
aWhichMap.Remove( 0, aWhichMap.Count() );
- aWhichMap.Insert( (USHORT)0, (USHORT)0 );
+ aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 );
// Building a Which-Map 'rWhichMap' from an Array of
// 'pWhichIds' frm Which-Ids. It has the long 'nWhichIds'.
// The Which-Map is not going to be deleted.
- SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPardMap.GetData(), aPardMap.Count() );
- SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPlainMap.GetData(), aPlainMap.Count() );
+ SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPardMap.GetData(), aPardMap.Count() );
+ SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPlainMap.GetData(), aPlainMap.Count() );
}
const SfxItemSet& SvxRTFParser::GetRTFDefaults()
@@ -1145,10 +1149,10 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults()
if( !pRTFDefaults )
{
pRTFDefaults = new SfxItemSet( *pAttrPool, aWhichMap.GetData() );
- USHORT nId;
+ sal_uInt16 nId;
if( 0 != ( nId = ((RTFPardAttrMapIds*)aPardMap.GetData())->nScriptSpace ))
{
- SvxScriptSpaceItem aItem( FALSE, nId );
+ SvxScriptSpaceItem aItem( sal_False, nId );
if( bNewDoc )
pAttrPool->SetPoolDefaultItem( aItem );
else
@@ -1160,19 +1164,19 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults()
/* */
-SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange )
+SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange )
: aAttrSet( rPool, pWhichRange )
{
- nOutlineNo = BYTE(-1); // not set
+ nOutlineNo = sal_uInt8(-1); // not set
nBasedOn = 0;
- bBasedOnIsSet = FALSE;
+ bBasedOnIsSet = sal_False; //$flr #117411#
nNext = 0;
- bIsCharFmt = FALSE;
+ bIsCharFmt = sal_False;
}
SvxRTFItemStackType::SvxRTFItemStackType(
- SfxItemPool& rPool, const USHORT* pWhichRange,
+ SfxItemPool& rPool, const sal_uInt16* pWhichRange,
const SvxPosition& rPos )
: aAttrSet( rPool, pWhichRange ),
pChildList( 0 ),
@@ -1248,8 +1252,8 @@ void SvxRTFItemStackType::MoveFullNode(const SvxNodeIdx &rOldNode,
}
//And the same for all the children
- USHORT nCount = pChildList ? pChildList->Count() : 0;
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pChildList ? pChildList->Count() : 0;
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
SvxRTFItemStackType* pStk = (*pChildList)[i];
pStk->MoveFullNode(rOldNode, rNewNode);
@@ -1265,7 +1269,7 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser )
{
DBG_ASSERT( pChildList, "There is no child list" );
- USHORT n;
+ sal_uInt16 n;
SvxRTFItemStackType* pTmp = (*pChildList)[0];
if( !pTmp->aAttrSet.Count() ||
@@ -1304,15 +1308,15 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser )
SfxItemIter aIter( aMrgSet );
const SfxPoolItem* pItem;
do {
- USHORT nWhich = aIter.GetCurItem()->Which();
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
if( SFX_ITEM_SET != pTmp->aAttrSet.GetItemState( nWhich,
- FALSE, &pItem ) || *pItem != *aIter.GetCurItem() )
+ sal_False, &pItem ) || *pItem != *aIter.GetCurItem() )
aMrgSet.ClearItem( nWhich );
if( aIter.IsAtEnd() )
break;
aIter.NextItem();
- } while( TRUE );
+ } while( sal_True );
if( !aMrgSet.Count() )
return;
@@ -1353,14 +1357,14 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults )
{
SfxItemIter aIter( rDefaults );
do {
- USHORT nWhich = aIter.GetCurItem()->Which();
- if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, FALSE ))
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, sal_False ))
aAttrSet.Put( *aIter.GetCurItem() );
if( aIter.IsAtEnd() )
break;
aIter.NextItem();
- } while( TRUE );
+ } while( sal_True );
}
}
@@ -1368,62 +1372,62 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults )
RTFPlainAttrMapIds::RTFPlainAttrMapIds( const SfxItemPool& rPool )
{
- nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, FALSE );
- nBgColor = rPool.GetTrueWhich( SID_ATTR_BRUSH_CHAR, FALSE );
- nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE );
- nContour = rPool.GetTrueWhich( SID_ATTR_CHAR_CONTOUR, FALSE );
- nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE );
- nEscapement = rPool.GetTrueWhich( SID_ATTR_CHAR_ESCAPEMENT, FALSE );
- nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, FALSE );
- nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, FALSE );
- nKering = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE );
- nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, FALSE );
- nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE );
- nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, FALSE );
- nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE );
- nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE );
- nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE );
- nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, FALSE );
- nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, FALSE );
-
- nCJKFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, FALSE );
- nCJKFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, FALSE );
- nCJKLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, FALSE );
- nCJKPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, FALSE );
- nCJKWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, FALSE );
- nCTLFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, FALSE );
- nCTLFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, FALSE );
- nCTLLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, FALSE );
- nCTLPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, FALSE );
- nCTLWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, FALSE );
- nEmphasis = rPool.GetTrueWhich( SID_ATTR_CHAR_EMPHASISMARK, FALSE );
- nTwoLines = rPool.GetTrueWhich( SID_ATTR_CHAR_TWO_LINES, FALSE );
- nRuby = 0; //rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_RUBY, FALSE );
- nCharScaleX = rPool.GetTrueWhich( SID_ATTR_CHAR_SCALEWIDTH, FALSE );
- nHorzVert = rPool.GetTrueWhich( SID_ATTR_CHAR_ROTATED, FALSE );
- nRelief = rPool.GetTrueWhich( SID_ATTR_CHAR_RELIEF, FALSE );
- nHidden = rPool.GetTrueWhich( SID_ATTR_CHAR_HIDDEN, FALSE );
+ nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, sal_False );
+ nBgColor = rPool.GetTrueWhich( SID_ATTR_BRUSH_CHAR, sal_False );
+ nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, sal_False );
+ nContour = rPool.GetTrueWhich( SID_ATTR_CHAR_CONTOUR, sal_False );
+ nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, sal_False );
+ nEscapement = rPool.GetTrueWhich( SID_ATTR_CHAR_ESCAPEMENT, sal_False );
+ nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, sal_False );
+ nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, sal_False );
+ nKering = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, sal_False );
+ nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, sal_False );
+ nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, sal_False );
+ nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, sal_False );
+ nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, sal_False );
+ nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, sal_False );
+ nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, sal_False );
+ nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, sal_False );
+ nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, sal_False );
+
+ nCJKFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, sal_False );
+ nCJKFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, sal_False );
+ nCJKLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, sal_False );
+ nCJKPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, sal_False );
+ nCJKWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, sal_False );
+ nCTLFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, sal_False );
+ nCTLFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, sal_False );
+ nCTLLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, sal_False );
+ nCTLPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, sal_False );
+ nCTLWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, sal_False );
+ nEmphasis = rPool.GetTrueWhich( SID_ATTR_CHAR_EMPHASISMARK, sal_False );
+ nTwoLines = rPool.GetTrueWhich( SID_ATTR_CHAR_TWO_LINES, sal_False );
+ nRuby = 0; //rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_RUBY, sal_False );
+ nCharScaleX = rPool.GetTrueWhich( SID_ATTR_CHAR_SCALEWIDTH, sal_False );
+ nHorzVert = rPool.GetTrueWhich( SID_ATTR_CHAR_ROTATED, sal_False );
+ nRelief = rPool.GetTrueWhich( SID_ATTR_CHAR_RELIEF, sal_False );
+ nHidden = rPool.GetTrueWhich( SID_ATTR_CHAR_HIDDEN, sal_False );
}
RTFPardAttrMapIds ::RTFPardAttrMapIds ( const SfxItemPool& rPool )
{
- nLinespacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, FALSE );
- nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, FALSE );
- nTabStop = rPool.GetTrueWhich( SID_ATTR_TABSTOP, FALSE );
- nHyphenzone = rPool.GetTrueWhich( SID_ATTR_PARA_HYPHENZONE, FALSE );
- nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, FALSE );
- nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, FALSE );
- nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, FALSE );
- nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, FALSE );
- nShadow = rPool.GetTrueWhich( SID_ATTR_BORDER_SHADOW, FALSE );
- nOutlineLvl = rPool.GetTrueWhich( SID_ATTR_PARA_OUTLLEVEL, FALSE );
- nSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, FALSE );
- nKeep = rPool.GetTrueWhich( SID_ATTR_PARA_KEEP, FALSE );
- nFontAlign = rPool.GetTrueWhich( SID_PARA_VERTALIGN, FALSE );
- nScriptSpace = rPool.GetTrueWhich( SID_ATTR_PARA_SCRIPTSPACE, FALSE );
- nHangPunct = rPool.GetTrueWhich( SID_ATTR_PARA_HANGPUNCTUATION, FALSE );
- nForbRule = rPool.GetTrueWhich( SID_ATTR_PARA_FORBIDDEN_RULES, FALSE );
- nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE );
+ nLinespacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, sal_False );
+ nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, sal_False );
+ nTabStop = rPool.GetTrueWhich( SID_ATTR_TABSTOP, sal_False );
+ nHyphenzone = rPool.GetTrueWhich( SID_ATTR_PARA_HYPHENZONE, sal_False );
+ nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, sal_False );
+ nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, sal_False );
+ nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, sal_False );
+ nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, sal_False );
+ nShadow = rPool.GetTrueWhich( SID_ATTR_BORDER_SHADOW, sal_False );
+ nOutlineLvl = rPool.GetTrueWhich( SID_ATTR_PARA_OUTLLEVEL, sal_False );
+ nSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, sal_False );
+ nKeep = rPool.GetTrueWhich( SID_ATTR_PARA_KEEP, sal_False );
+ nFontAlign = rPool.GetTrueWhich( SID_PARA_VERTALIGN, sal_False );
+ nScriptSpace = rPool.GetTrueWhich( SID_ATTR_PARA_SCRIPTSPACE, sal_False );
+ nHangPunct = rPool.GetTrueWhich( SID_ATTR_PARA_HANGPUNCTUATION, sal_False );
+ nForbRule = rPool.GetTrueWhich( SID_ATTR_PARA_FORBIDDEN_RULES, sal_False );
+ nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx b/editeng/source/uno/UnoForbiddenCharsTable.cxx
index 5d3c3b468f..985c27be9e 100644..100755
--- a/editeng/source/uno/UnoForbiddenCharsTable.cxx
+++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx
@@ -64,7 +64,7 @@ ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Loc
throw RuntimeException();
const LanguageType eLang = SvxLocaleToLanguage( rLocale );
- const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE );
+ const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, sal_False );
if(!pForbidden)
throw NoSuchElementException();
@@ -80,7 +80,7 @@ sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocal
return sal_False;
const LanguageType eLang = SvxLocaleToLanguage( rLocale );
- const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE );
+ const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, sal_False );
return NULL != pForbidden;
}
@@ -128,7 +128,7 @@ Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales()
for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
- const ULONG nLanguage = mxForbiddenChars->GetObjectKey( nIndex );
+ const sal_uLong nLanguage = mxForbiddenChars->GetObjectKey( nIndex );
SvxLanguageToLocale ( *pLocales++, static_cast < LanguageType > (nLanguage) );
}
}
diff --git a/editeng/source/uno/makefile.mk b/editeng/source/uno/makefile.mk
deleted file mode 100644
index 573dd21508..0000000000
--- a/editeng/source/uno/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=editeng
-TARGET=uno
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/unonrule.obj \
- $(SLO)$/unoedsrc.obj \
- $(SLO)$/unoedhlp.obj \
- $(SLO)$/unofdesc.obj \
- $(SLO)$/unoviwou.obj \
- $(SLO)$/unofored.obj \
- $(SLO)$/unoforou.obj \
- $(SLO)$/unoipset.obj \
- $(SLO)$/unotext.obj \
- $(SLO)$/unotext2.obj \
- $(SLO)$/unofield.obj \
- $(SLO)$/UnoForbiddenCharsTable.obj \
- $(SLO)$/unopracc.obj \
- $(SLO)$/unoedprx.obj \
- $(SLO)$/unoviwed.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx
index 219f2e797f..1280f3b83a 100644..100755
--- a/editeng/source/uno/unoedhlp.cxx
+++ b/editeng/source/uno/unoedhlp.cxx
@@ -38,46 +38,46 @@
TYPEINIT1( SvxEditSourceHint, TextHint );
-SvxEditSourceHint::SvxEditSourceHint( ULONG _nId ) :
+SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId ) :
TextHint( _nId ),
mnStart( 0 ),
mnEnd( 0 )
{
}
-SvxEditSourceHint::SvxEditSourceHint( ULONG _nId, ULONG nValue, ULONG nStart, ULONG nEnd ) :
+SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId, sal_uLong nValue, sal_uLong nStart, sal_uLong nEnd ) :
TextHint( _nId, nValue ),
mnStart( nStart),
mnEnd( nEnd )
{
}
-ULONG SvxEditSourceHint::GetValue() const
+sal_uLong SvxEditSourceHint::GetValue() const
{
return TextHint::GetValue();
}
-ULONG SvxEditSourceHint::GetStartValue() const
+sal_uLong SvxEditSourceHint::GetStartValue() const
{
return mnStart;
}
-ULONG SvxEditSourceHint::GetEndValue() const
+sal_uLong SvxEditSourceHint::GetEndValue() const
{
return mnEnd;
}
-void SvxEditSourceHint::SetValue( ULONG n )
+void SvxEditSourceHint::SetValue( sal_uLong n )
{
TextHint::SetValue( n );
}
-void SvxEditSourceHint::SetStartValue( ULONG n )
+void SvxEditSourceHint::SetStartValue( sal_uLong n )
{
mnStart = n;
}
-void SvxEditSourceHint::SetEndValue( ULONG n )
+void SvxEditSourceHint::SetEndValue( sal_uLong n )
{
mnEnd = n;
}
@@ -132,14 +132,14 @@ void SvxEditSourceHint::SetEndValue( ULONG n )
return ::std::auto_ptr<SfxHint>( new SfxHint() );
}
-sal_Bool SvxEditSourceHelper::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex )
+sal_Bool SvxEditSourceHelper::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex )
{
EECharAttribArray aCharAttribs;
rEE.GetCharAttribs( nPara, aCharAttribs );
// find closest index in front of nIndex
- USHORT nAttr, nCurrIndex;
+ sal_uInt16 nAttr, nCurrIndex;
sal_Int32 nClosestStartIndex;
for( nAttr=0, nClosestStartIndex=0; nAttr<aCharAttribs.Count(); ++nAttr )
{
@@ -167,8 +167,8 @@ sal_Bool SvxEditSourceHelper::GetAttributeRun( USHORT& nStartIndex, USHORT& nEnd
}
}
- nStartIndex = static_cast<USHORT>( nClosestStartIndex );
- nEndIndex = static_cast<USHORT>( nClosestEndIndex );
+ nStartIndex = static_cast<sal_uInt16>( nClosestStartIndex );
+ nEndIndex = static_cast<sal_uInt16>( nClosestEndIndex );
return sal_True;
}
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 29b4deca4e..8cc4e1f157 100644..100755
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -77,11 +77,11 @@ public:
~SvxAccessibleTextIndex() {};
// Get/Set current paragraph
- void SetParagraph( USHORT nPara )
+ void SetParagraph( sal_uInt16 nPara )
{
mnPara = nPara;
}
- USHORT GetParagraph() const { return mnPara; }
+ sal_uInt16 GetParagraph() const { return mnPara; }
/** Set the index in the UAA semantic
@@ -92,7 +92,7 @@ public:
The text forwarder to use in the calculations
*/
void SetIndex( sal_Int32 nIndex, const SvxTextForwarder& rTF );
- void SetIndex( USHORT nPara, sal_Int32 nIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetIndex(nIndex, rTF); }
+ void SetIndex( sal_uInt16 nPara, sal_Int32 nIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetIndex(nIndex, rTF); }
sal_Int32 GetIndex() const { return mnIndex; }
/** Set the index in the edit engine semantic
@@ -106,9 +106,9 @@ public:
@param rTF
The text forwarder to use in the calculations
*/
- void SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF );
- void SetEEIndex( USHORT nPara, USHORT nEEIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetEEIndex(nEEIndex, rTF); }
- USHORT GetEEIndex() const;
+ void SetEEIndex( sal_uInt16 nEEIndex, const SvxTextForwarder& rTF );
+ void SetEEIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetEEIndex(nEEIndex, rTF); }
+ sal_uInt16 GetEEIndex() const;
void SetFieldOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnFieldOffset = nOffset; mnFieldLen = nLen; }
sal_Int32 GetFieldOffset() const { return mnFieldOffset; }
@@ -129,7 +129,7 @@ public:
sal_Bool IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const;
private:
- USHORT mnPara;
+ sal_uInt16 mnPara;
sal_Int32 mnIndex;
sal_Int32 mnEEIndex;
sal_Int32 mnFieldOffset;
@@ -179,15 +179,15 @@ ESelection MakeEESelection( const SvxAccessibleTextIndex& rIndex )
rIndex.GetParagraph(), rIndex.GetEEIndex() + 1 );
}
-USHORT SvxAccessibleTextIndex::GetEEIndex() const
+sal_uInt16 SvxAccessibleTextIndex::GetEEIndex() const
{
DBG_ASSERT(mnEEIndex >= 0 && mnEEIndex <= USHRT_MAX,
"SvxAccessibleTextIndex::GetEEIndex: index value overflow");
- return static_cast< USHORT > (mnEEIndex);
+ return static_cast< sal_uInt16 > (mnEEIndex);
}
-void SvxAccessibleTextIndex::SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF )
+void SvxAccessibleTextIndex::SetEEIndex( sal_uInt16 nEEIndex, const SvxTextForwarder& rTF )
{
// reset
mnFieldOffset = 0;
@@ -201,7 +201,7 @@ void SvxAccessibleTextIndex::SetEEIndex( USHORT nEEIndex, const SvxTextForwarder
mnEEIndex = nEEIndex;
// calculate unknowns
- USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() );
+ sal_uInt16 nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() );
mnIndex = nEEIndex;
@@ -247,7 +247,7 @@ void SvxAccessibleTextIndex::SetIndex( sal_Int32 nIndex, const SvxTextForwarder&
mnIndex = nIndex;
// calculate unknowns
- USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() );
+ sal_uInt16 nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() );
DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
@@ -456,21 +456,21 @@ SvxAccessibleTextAdapter::~SvxAccessibleTextAdapter()
{
}
-USHORT SvxAccessibleTextAdapter::GetParagraphCount() const
+sal_uInt16 SvxAccessibleTextAdapter::GetParagraphCount() const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->GetParagraphCount();
}
-USHORT SvxAccessibleTextAdapter::GetTextLen( USHORT nParagraph ) const
+sal_uInt16 SvxAccessibleTextAdapter::GetTextLen( sal_uInt16 nParagraph ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
SvxAccessibleTextIndex aIndex;
aIndex.SetEEIndex( nParagraph, mrTextForwarder->GetTextLen( nParagraph ), *this );
- return static_cast< USHORT >(aIndex.GetIndex());
+ return static_cast< sal_uInt16 >(aIndex.GetIndex());
}
String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
@@ -499,7 +499,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
aStartIndex.GetFieldOffset() <= USHRT_MAX,
"SvxAccessibleTextIndex::GetText: index value overflow");
- sStr.Erase(0, static_cast< USHORT > (aStartIndex.GetFieldOffset()) );
+ sStr.Erase(0, static_cast< sal_uInt16 > (aStartIndex.GetFieldOffset()) );
}
if( aEndIndex.InField() && aEndIndex.GetFieldOffset() )
{
@@ -507,11 +507,11 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset()) <= USHRT_MAX,
"SvxAccessibleTextIndex::GetText: index value overflow");
- sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset())) );
+ sStr = sStr.Copy(0, static_cast< sal_uInt16 > (sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset())) );
}
- EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< USHORT >(aStartIndex.GetParagraph()) );
- EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< USHORT >(aEndIndex.GetParagraph()) );
+ EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< sal_uInt16 >(aStartIndex.GetParagraph()) );
+ EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< sal_uInt16 >(aEndIndex.GetParagraph()) );
if( aStartIndex.InBullet() )
{
@@ -522,7 +522,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
aStartIndex.GetBulletOffset() <= USHRT_MAX,
"SvxAccessibleTextIndex::GetText: index value overflow");
- sBullet.Erase(0, static_cast< USHORT > (aStartIndex.GetBulletOffset()) );
+ sBullet.Erase(0, static_cast< sal_uInt16 > (aStartIndex.GetBulletOffset()) );
sBullet += sStr;
sStr = sBullet;
@@ -537,7 +537,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX,
"SvxAccessibleTextIndex::GetText: index value overflow");
- sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) );
+ sStr = sStr.Copy(0, static_cast< sal_uInt16 > (sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) );
}
else if( aStartIndex.GetParagraph() != aEndIndex.GetParagraph() &&
HaveTextBullet( aEndIndex.GetParagraph() ) )
@@ -548,17 +548,17 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX,
"SvxAccessibleTextIndex::GetText: index value overflow");
- sBullet = sBullet.Copy(0, static_cast< USHORT > (sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) );
+ sBullet = sBullet.Copy(0, static_cast< sal_uInt16 > (sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) );
// insert bullet
sStr.Insert( sBullet,
- static_cast< USHORT > (GetTextLen(aStartIndex.GetParagraph()) - aStartIndex.GetIndex()) );
+ static_cast< sal_uInt16 > (GetTextLen(aStartIndex.GetParagraph()) - aStartIndex.GetIndex()) );
}
return sStr;
}
-SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -572,14 +572,14 @@ SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, BOOL bO
bOnlyHardAttrib );
}
-SfxItemSet SvxAccessibleTextAdapter::GetParaAttribs( USHORT nPara ) const
+SfxItemSet SvxAccessibleTextAdapter::GetParaAttribs( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->GetParaAttribs( nPara );
}
-void SvxAccessibleTextAdapter::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void SvxAccessibleTextAdapter::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -591,14 +591,14 @@ void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& , sal_Bool , sal
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
}
-void SvxAccessibleTextAdapter::GetPortions( USHORT nPara, SvUShorts& rList ) const
+void SvxAccessibleTextAdapter::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
mrTextForwarder->GetPortions( nPara, rList );
}
-USHORT SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+sal_uInt16 SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -612,7 +612,7 @@ USHORT SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, USHORT nW
nWhich );
}
-USHORT SvxAccessibleTextAdapter::GetItemState( USHORT nPara, USHORT nWhich ) const
+sal_uInt16 SvxAccessibleTextAdapter::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -681,21 +681,21 @@ SfxItemPool* SvxAccessibleTextAdapter::GetPool() const
return mrTextForwarder->GetPool();
}
-XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
-void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos )
+void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
mrTextForwarder->FieldClicked( rField, nPara, nPos );
}
-sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( USHORT nPara, USHORT nEEIndex )
+sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -704,7 +704,7 @@ sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( USHORT nPara, USHORT nEEIn
return aIndex.GetIndex();
}
-USHORT SvxAccessibleTextAdapter::CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex )
+sal_uInt16 SvxAccessibleTextAdapter::CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -715,7 +715,7 @@ USHORT SvxAccessibleTextAdapter::CalcEditEngineIndex( USHORT nPara, sal_Int32 nL
-BOOL SvxAccessibleTextAdapter::IsValid() const
+sal_Bool SvxAccessibleTextAdapter::IsValid() const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -725,7 +725,7 @@ BOOL SvxAccessibleTextAdapter::IsValid() const
return sal_False;
}
-LanguageType SvxAccessibleTextAdapter::GetLanguage( USHORT nPara, USHORT nPos ) const
+LanguageType SvxAccessibleTextAdapter::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -736,28 +736,28 @@ LanguageType SvxAccessibleTextAdapter::GetLanguage( USHORT nPara, USHORT nPos )
return mrTextForwarder->GetLanguage( nPara, aIndex.GetEEIndex() );
}
-USHORT SvxAccessibleTextAdapter::GetFieldCount( USHORT nPara ) const
+sal_uInt16 SvxAccessibleTextAdapter::GetFieldCount( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->GetFieldCount( nPara );
}
-EFieldInfo SvxAccessibleTextAdapter::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo SvxAccessibleTextAdapter::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->GetFieldInfo( nPara, nField );
}
-EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( USHORT nPara ) const
+EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->GetBulletInfo( nPara );
}
-Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -766,7 +766,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex )
// preset if anything goes wrong below
// n-th char in GetParagraphIndex's paragraph
- Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) );
+ Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, static_cast< sal_uInt16 >( aIndex.GetEEIndex() ) );
if( aIndex.InBullet() )
{
@@ -804,7 +804,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex )
aFont,
mrTextForwarder->GetText( aSel ) );
- Rectangle aStartRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) );
+ Rectangle aStartRect = mrTextForwarder->GetCharBounds( nPara, static_cast< sal_uInt16 >( aIndex.GetEEIndex() ) );
if( !aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect ) )
aRect = aStartRect;
@@ -817,7 +817,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex )
return aRect;
}
-Rectangle SvxAccessibleTextAdapter::GetParaBounds( USHORT nPara ) const
+Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -852,7 +852,7 @@ OutputDevice* SvxAccessibleTextAdapter::GetRefDevice() const
return mrTextForwarder->GetRefDevice();
}
-sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& nPara, USHORT& nIndex ) const
+sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_uInt16& nPara, sal_uInt16& nIndex ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -865,7 +865,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT&
DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
- nIndex = static_cast< USHORT > (aIndex.GetIndex());
+ nIndex = static_cast< sal_uInt16 > (aIndex.GetIndex());
EBulletInfo aBulletInfo = GetBulletInfo( nPara );
@@ -892,7 +892,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT&
aStringWrap.GetIndexAtPoint( aPoint ) <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
- nIndex = static_cast< USHORT > (aStringWrap.GetIndexAtPoint( aPoint ));
+ nIndex = static_cast< sal_uInt16 > (aStringWrap.GetIndexAtPoint( aPoint ));
return sal_True;
}
}
@@ -920,14 +920,14 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT&
aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( rPoint ) <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
- nIndex = static_cast< USHORT >(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint ));
+ nIndex = static_cast< sal_uInt16 >(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint ));
return sal_True;
}
return sal_True;
}
-sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -943,7 +943,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex,
// always treat bullet as separate word
nStart = 0;
- nEnd = static_cast< USHORT > (aIndex.GetBulletLen());
+ nEnd = static_cast< sal_uInt16 > (aIndex.GetBulletLen());
return sal_True;
}
@@ -958,8 +958,8 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex,
// always treat field as separate word
// TODO: to circumvent this, _we_ would have to do the break iterator stuff!
- nStart = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset());
- nEnd = static_cast< USHORT > (nStart + aIndex.GetFieldLen());
+ nStart = static_cast< sal_uInt16 > (aIndex.GetIndex() - aIndex.GetFieldOffset());
+ nEnd = static_cast< sal_uInt16 > (nStart + aIndex.GetFieldLen());
return sal_True;
}
@@ -971,18 +971,18 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex,
DBG_ASSERT(aIndex.GetIndex() >= 0 &&
aIndex.GetIndex() <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
- nStart = static_cast< USHORT > (aIndex.GetIndex());
+ nStart = static_cast< sal_uInt16 > (aIndex.GetIndex());
aIndex.SetEEIndex( nPara, nEnd, *this );
DBG_ASSERT(aIndex.GetIndex() >= 0 &&
aIndex.GetIndex() <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
- nEnd = static_cast< USHORT > (aIndex.GetIndex());
+ nEnd = static_cast< sal_uInt16 > (aIndex.GetIndex());
return sal_True;
}
-sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -998,7 +998,7 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT&
// always treat bullet as distinct attribute
nStartIndex = 0;
- nEndIndex = static_cast< USHORT > (aIndex.GetBulletLen());
+ nEndIndex = static_cast< sal_uInt16 > (aIndex.GetBulletLen());
return sal_True;
}
@@ -1010,8 +1010,8 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT&
"SvxAccessibleTextIndex::SetIndex: index value overflow");
// always treat field as distinct attribute
- nStartIndex = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset());
- nEndIndex = static_cast< USHORT > (nStartIndex + aIndex.GetFieldLen());
+ nStartIndex = static_cast< sal_uInt16 > (aIndex.GetIndex() - aIndex.GetFieldOffset());
+ nEndIndex = static_cast< sal_uInt16 > (nStartIndex + aIndex.GetFieldLen());
return sal_True;
}
@@ -1023,32 +1023,32 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT&
DBG_ASSERT(aIndex.GetIndex() >= 0 &&
aIndex.GetIndex() <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
- nStartIndex = static_cast< USHORT > (aIndex.GetIndex());
+ nStartIndex = static_cast< sal_uInt16 > (aIndex.GetIndex());
aIndex.SetEEIndex( nPara, nEndIndex, *this );
DBG_ASSERT(aIndex.GetIndex() >= 0 &&
aIndex.GetIndex() <= USHRT_MAX,
"SvxAccessibleTextIndex::SetIndex: index value overflow");
- nEndIndex = static_cast< USHORT > (aIndex.GetIndex());
+ nEndIndex = static_cast< sal_uInt16 > (aIndex.GetIndex());
return sal_True;
}
-USHORT SvxAccessibleTextAdapter::GetLineCount( USHORT nPara ) const
+sal_uInt16 SvxAccessibleTextAdapter::GetLineCount( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->GetLineCount( nPara );
}
-USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const
+sal_uInt16 SvxAccessibleTextAdapter::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
SvxAccessibleTextIndex aStartIndex;
SvxAccessibleTextIndex aEndIndex;
- USHORT nCurrLine;
- USHORT nCurrIndex, nLastIndex;
+ sal_uInt16 nCurrLine;
+ sal_uInt16 nCurrIndex, nLastIndex;
for( nCurrLine=0, nCurrIndex=0, nLastIndex=0; nCurrLine<=nLine; ++nCurrLine )
{
nLastIndex = nCurrIndex;
@@ -1061,18 +1061,18 @@ USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const
{
aStartIndex.SetEEIndex( nPara, nLastIndex, *this );
- return static_cast< USHORT >(aEndIndex.GetIndex() - aStartIndex.GetIndex());
+ return static_cast< sal_uInt16 >(aEndIndex.GetIndex() - aStartIndex.GetIndex());
}
else
- return static_cast< USHORT >(aEndIndex.GetIndex());
+ return static_cast< sal_uInt16 >(aEndIndex.GetIndex());
}
-void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const
+void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const
{
mrTextForwarder->GetLineBoundaries( rStart, rEnd, nParagraph, nLine );
}
-USHORT SvxAccessibleTextAdapter::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 SvxAccessibleTextAdapter::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
return mrTextForwarder->GetLineNumberAtIndex( nPara, nIndex );
}
@@ -1103,21 +1103,21 @@ sal_Bool SvxAccessibleTextAdapter::InsertText( const String& rStr, const ESelect
return mrTextForwarder->InsertText( rStr, MakeEESelection(aStartIndex, aEndIndex) );
}
-sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( BOOL bFull )
+sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( sal_Bool bFull )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->QuickFormatDoc( bFull );
}
-sal_Int16 SvxAccessibleTextAdapter::GetDepth( USHORT nPara ) const
+sal_Int16 SvxAccessibleTextAdapter::GetDepth( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
return mrTextForwarder->GetDepth( nPara );
}
-sal_Bool SvxAccessibleTextAdapter::SetDepth( USHORT nPara, sal_Int16 nNewDepth )
+sal_Bool SvxAccessibleTextAdapter::SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -1129,7 +1129,7 @@ void SvxAccessibleTextAdapter::SetForwarder( SvxTextForwarder& rForwarder )
mrTextForwarder = &rForwarder;
}
-sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( USHORT nPara ) const
+sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -1147,7 +1147,7 @@ sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( USHORT nPara ) const
}
}
-sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( USHORT nPara ) const
+sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( sal_uInt16 nPara ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -1196,7 +1196,7 @@ void SvxAccessibleTextAdapter::AppendParagraph()
OSL_FAIL( "not implemented" );
}
-xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( USHORT, const String &, const SfxItemSet & )
+xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( sal_uInt16, const String &, const SfxItemSet & )
{
OSL_FAIL( "not implemented" );
return 0;
@@ -1218,7 +1218,7 @@ SvxAccessibleTextEditViewAdapter::~SvxAccessibleTextEditViewAdapter()
{
}
-BOOL SvxAccessibleTextEditViewAdapter::IsValid() const
+sal_Bool SvxAccessibleTextEditViewAdapter::IsValid() const
{
DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
@@ -1268,8 +1268,8 @@ sal_Bool SvxAccessibleTextEditViewAdapter::GetSelection( ESelection& rSel ) cons
aEndIndex.GetIndex() >= 0 && aEndIndex.GetIndex() <= USHRT_MAX,
"SvxAccessibleTextEditViewAdapter::GetSelection: index value overflow");
- rSel = ESelection( aStartIndex.GetParagraph(), static_cast< USHORT > (aStartIndex.GetIndex()),
- aEndIndex.GetParagraph(), static_cast< USHORT > (aEndIndex.GetIndex()) );
+ rSel = ESelection( aStartIndex.GetParagraph(), static_cast< sal_uInt16 > (aStartIndex.GetIndex()),
+ aEndIndex.GetParagraph(), static_cast< sal_uInt16 > (aEndIndex.GetIndex()) );
return sal_True;
}
diff --git a/editeng/source/uno/unoedsrc.cxx b/editeng/source/uno/unoedsrc.cxx
index 06337654b5..06337654b5 100644..100755
--- a/editeng/source/uno/unoedsrc.cxx
+++ b/editeng/source/uno/unoedsrc.cxx
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index 419892316b..7ae3d79875 100644..100755
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -143,7 +143,7 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes
{
const SfxPoolItem* pItem = NULL;
{
- SvxFontItem* pFontItem = (SvxFontItem*)&rSet.Get( EE_CHAR_FONTINFO, TRUE );
+ SvxFontItem* pFontItem = (SvxFontItem*)&rSet.Get( EE_CHAR_FONTINFO, sal_True );
rDesc.Name = pFontItem->GetFamilyName();
rDesc.StyleName = pFontItem->GetStyleName();
rDesc.Family = sal::static_int_cast< sal_Int16 >(
@@ -153,37 +153,37 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes
pFontItem->GetPitch());
}
{
- pItem = &rSet.Get( EE_CHAR_FONTHEIGHT, TRUE );
+ pItem = &rSet.Get( EE_CHAR_FONTHEIGHT, sal_True );
uno::Any aHeight;
if( pItem->QueryValue( aHeight, MID_FONTHEIGHT ) )
aHeight >>= rDesc.Height;
}
{
- pItem = &rSet.Get( EE_CHAR_ITALIC, TRUE );
+ pItem = &rSet.Get( EE_CHAR_ITALIC, sal_True );
uno::Any aFontSlant;
if(pItem->QueryValue( aFontSlant, MID_POSTURE ))
aFontSlant >>= rDesc.Slant;
}
{
- pItem = &rSet.Get( EE_CHAR_UNDERLINE, TRUE );
+ pItem = &rSet.Get( EE_CHAR_UNDERLINE, sal_True );
uno::Any aUnderline;
if(pItem->QueryValue( aUnderline, MID_TL_STYLE ))
aUnderline >>= rDesc.Underline;
}
{
- pItem = &rSet.Get( EE_CHAR_WEIGHT, TRUE );
+ pItem = &rSet.Get( EE_CHAR_WEIGHT, sal_True );
uno::Any aWeight;
if(pItem->QueryValue( aWeight, MID_WEIGHT ))
aWeight >>= rDesc.Weight;
}
{
- pItem = &rSet.Get( EE_CHAR_STRIKEOUT, TRUE );
+ pItem = &rSet.Get( EE_CHAR_STRIKEOUT, sal_True );
uno::Any aStrikeOut;
if(pItem->QueryValue( aStrikeOut, MID_CROSS_OUT ))
aStrikeOut >>= rDesc.Strikeout;
}
{
- SvxWordLineModeItem* pWLMItem = (SvxWordLineModeItem*)&rSet.Get( EE_CHAR_WLM, TRUE );
+ SvxWordLineModeItem* pWLMItem = (SvxWordLineModeItem*)&rSet.Get( EE_CHAR_WLM, sal_True );
rDesc.WordLineMode = pWLMItem->GetValue();
}
}
@@ -201,13 +201,13 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes
beans::PropertyState SvxUnoFontDescriptor::getPropertyState( const SfxItemSet& rSet )
{
- CheckState(rSet.GetItemState( EE_CHAR_FONTINFO, FALSE ));
- CheckState(rSet.GetItemState( EE_CHAR_FONTHEIGHT, FALSE ));
- CheckState(rSet.GetItemState( EE_CHAR_ITALIC, FALSE ));
- CheckState(rSet.GetItemState( EE_CHAR_UNDERLINE, FALSE ));
- CheckState(rSet.GetItemState( EE_CHAR_WEIGHT, FALSE ));
- CheckState(rSet.GetItemState( EE_CHAR_STRIKEOUT, FALSE ));
- CheckState(rSet.GetItemState( EE_CHAR_WLM, FALSE ));
+ CheckState(rSet.GetItemState( EE_CHAR_FONTINFO, sal_False ));
+ CheckState(rSet.GetItemState( EE_CHAR_FONTHEIGHT, sal_False ));
+ CheckState(rSet.GetItemState( EE_CHAR_ITALIC, sal_False ));
+ CheckState(rSet.GetItemState( EE_CHAR_UNDERLINE, sal_False ));
+ CheckState(rSet.GetItemState( EE_CHAR_WEIGHT, sal_False ));
+ CheckState(rSet.GetItemState( EE_CHAR_STRIKEOUT, sal_False ));
+ CheckState(rSet.GetItemState( EE_CHAR_WLM, sal_False ));
return beans::PropertyState_DEFAULT_VALUE;
}
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 5952aa612d..85e4ff9af5 100644..100755
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -216,7 +216,7 @@ static SvxFileFormat setFileNameDisplayFormat( sal_Int16 nFormat )
}
}
-static util::DateTime getDate( ULONG nDate )
+static util::DateTime getDate( sal_uLong nDate )
{
util::DateTime aDate;
memset( &aDate, 0, sizeof( util::DateTime ) );
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index c3b05be0dc..27991ab88a 100644..100755
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -57,12 +57,12 @@ SvxEditEngineForwarder::~SvxEditEngineForwarder()
// the EditEngine may need to be deleted from the outside
}
-USHORT SvxEditEngineForwarder::GetParagraphCount() const
+sal_uInt16 SvxEditEngineForwarder::GetParagraphCount() const
{
return rEditEngine.GetParagraphCount();
}
-USHORT SvxEditEngineForwarder::GetTextLen( USHORT nParagraph ) const
+sal_uInt16 SvxEditEngineForwarder::GetTextLen( sal_uInt16 nParagraph ) const
{
return rEditEngine.GetTextLen( nParagraph );
}
@@ -74,7 +74,7 @@ String SvxEditEngineForwarder::GetText( const ESelection& rSel ) const
return aRet;
}
-SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
if( rSel.nStartPara == rSel.nEndPara )
{
@@ -102,14 +102,14 @@ SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnl
}
}
-SfxItemSet SvxEditEngineForwarder::GetParaAttribs( USHORT nPara ) const
+SfxItemSet SvxEditEngineForwarder::GetParaAttribs( sal_uInt16 nPara ) const
{
SfxItemSet aSet( rEditEngine.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( rEditEngine.HasParaAttrib( nPara, nWhich ) )
aSet.Put( rEditEngine.GetParaAttrib( nPara, nWhich ) );
@@ -120,7 +120,7 @@ SfxItemSet SvxEditEngineForwarder::GetParaAttribs( USHORT nPara ) const
return aSet;
}
-void SvxEditEngineForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void SvxEditEngineForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
rEditEngine.SetParaAttribs( nPara, rSet );
}
@@ -135,7 +135,7 @@ SfxItemPool* SvxEditEngineForwarder::GetPool() const
return rEditEngine.GetEmptyItemSet().GetPool();
}
-void SvxEditEngineForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+void SvxEditEngineForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
{
rEditEngine.GetPortions( nPara, rList );
}
@@ -160,24 +160,24 @@ void SvxEditEngineForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESel
rEditEngine.QuickSetAttribs( rSet, rSel );
}
-BOOL SvxEditEngineForwarder::IsValid() const
+sal_Bool SvxEditEngineForwarder::IsValid() const
{
// cannot reliably query EditEngine state
// while in the middle of an update
return rEditEngine.GetUpdateMode();
}
-XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
-void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos )
+void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos )
{
rEditEngine.FieldClicked( rField, nPara, nPos );
}
-USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich )
+sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
{
EECharAttribArray aAttribs;
@@ -186,16 +186,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 );
@@ -203,13 +203,13 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
// get list of char attribs
rEditEngine.GetCharAttribs( nPara, aAttribs );
- 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_Bool bEmpty = sal_True; // we found no item inside the selektion of this paragraph
+ sal_Bool bGaps = sal_False; // we found items but theire gaps between them
+ 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 );
DBG_ASSERT( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
@@ -237,16 +237,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
}
if( bEmpty )
- bEmpty = FALSE;
+ bEmpty = sal_False;
if( !bGaps && aAttrib.nStart > nLastEnd )
- bGaps = TRUE;
+ bGaps = sal_True;
nLastEnd = aAttrib.nEnd;
}
if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) )
- bGaps = TRUE;
+ bGaps = sal_True;
/*
// since we have no portion with our item or if there were gaps
if( bEmpty || bGaps )
@@ -309,45 +309,45 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
return eState;
}
-USHORT SvxEditEngineForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+sal_uInt16 SvxEditEngineForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
return GetSvxEditEngineItemState( rEditEngine, rSel, nWhich );
}
-USHORT SvxEditEngineForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+sal_uInt16 SvxEditEngineForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
const SfxItemSet& rSet = rEditEngine.GetParaAttribs( nPara );
return rSet.GetItemState( nWhich );
}
-LanguageType SvxEditEngineForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+LanguageType SvxEditEngineForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
return rEditEngine.GetLanguage(nPara, nIndex);
}
-USHORT SvxEditEngineForwarder::GetFieldCount( USHORT nPara ) const
+sal_uInt16 SvxEditEngineForwarder::GetFieldCount( sal_uInt16 nPara ) const
{
return rEditEngine.GetFieldCount(nPara);
}
-EFieldInfo SvxEditEngineForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo SvxEditEngineForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
return rEditEngine.GetFieldInfo( nPara, nField );
}
-EBulletInfo SvxEditEngineForwarder::GetBulletInfo( USHORT ) const
+EBulletInfo SvxEditEngineForwarder::GetBulletInfo( sal_uInt16 ) const
{
return EBulletInfo();
}
-Rectangle SvxEditEngineForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+Rectangle SvxEditEngineForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
// #101701#
// EditEngine's 'internal' methods like GetCharacterBounds()
// don't rotate for vertical text.
Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() );
::std::swap( aSize.Width(), aSize.Height() );
- bool bIsVertical( rEditEngine.IsVertical() == TRUE );
+ bool bIsVertical( rEditEngine.IsVertical() == sal_True );
// #108900# Handle virtual position one-past-the end of the string
if( nIndex >= rEditEngine.GetTextLen(nPara) )
@@ -388,12 +388,12 @@ Rectangle SvxEditEngineForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) c
}
}
-Rectangle SvxEditEngineForwarder::GetParaBounds( USHORT nPara ) const
+Rectangle SvxEditEngineForwarder::GetParaBounds( sal_uInt16 nPara ) const
{
const Point aPnt = rEditEngine.GetDocPosTopLeft( nPara );
- ULONG nWidth;
- ULONG nHeight;
- ULONG nTextWidth;
+ sal_uLong nWidth;
+ sal_uLong nHeight;
+ sal_uLong nTextWidth;
if( rEditEngine.IsVertical() )
{
@@ -426,13 +426,13 @@ OutputDevice* SvxEditEngineForwarder::GetRefDevice() const
return rEditEngine.GetRefDevice();
}
-sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const
{
Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() );
::std::swap( aSize.Width(), aSize.Height() );
Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos,
aSize,
- rEditEngine.IsVertical() == TRUE ));
+ rEditEngine.IsVertical() == sal_True ));
EPosition aDocPos = rEditEngine.FindDocPosition( aEEPos );
@@ -442,7 +442,7 @@ sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPa
return sal_True;
}
-sal_Bool SvxEditEngineForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+sal_Bool SvxEditEngineForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
ESelection aRes = rEditEngine.GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD );
@@ -458,33 +458,33 @@ sal_Bool SvxEditEngineForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, US
return sal_False;
}
-sal_Bool SvxEditEngineForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+sal_Bool SvxEditEngineForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex );
}
-USHORT SvxEditEngineForwarder::GetLineCount( USHORT nPara ) const
+sal_uInt16 SvxEditEngineForwarder::GetLineCount( sal_uInt16 nPara ) const
{
return rEditEngine.GetLineCount(nPara);
}
-USHORT SvxEditEngineForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+sal_uInt16 SvxEditEngineForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const
{
return rEditEngine.GetLineLen(nPara, nLine);
}
-void SvxEditEngineForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+void SvxEditEngineForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const
{
rEditEngine.GetLineBoundaries(rStart, rEnd, nPara, nLine);
}
-USHORT SvxEditEngineForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 SvxEditEngineForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
return rEditEngine.GetLineNumberAtIndex(nPara, nIndex);
}
-sal_Bool SvxEditEngineForwarder::QuickFormatDoc( BOOL )
+sal_Bool SvxEditEngineForwarder::QuickFormatDoc( sal_Bool )
{
rEditEngine.QuickFormatDoc();
@@ -507,13 +507,13 @@ sal_Bool SvxEditEngineForwarder::InsertText( const String& rStr, const ESelectio
return sal_True;
}
-sal_Int16 SvxEditEngineForwarder::GetDepth( USHORT ) const
+sal_Int16 SvxEditEngineForwarder::GetDepth( sal_uInt16 ) const
{
// EditEngine does not support outline depth
return -1;
}
-sal_Bool SvxEditEngineForwarder::SetDepth( USHORT, sal_Int16 nNewDepth )
+sal_Bool SvxEditEngineForwarder::SetDepth( sal_uInt16, sal_Int16 nNewDepth )
{
// EditEngine does not support outline depth
return nNewDepth == -1 ? sal_True : sal_False;
@@ -529,11 +529,11 @@ void SvxEditEngineForwarder::AppendParagraph()
rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() );
}
-xub_StrLen SvxEditEngineForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet & /*rSet*/ )
+xub_StrLen SvxEditEngineForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet & /*rSet*/ )
{
xub_StrLen nLen = 0;
- USHORT nParaCount = rEditEngine.GetParagraphCount();
+ sal_uInt16 nParaCount = rEditEngine.GetParagraphCount();
DBG_ASSERT( nPara < nParaCount, "paragraph index out of bounds" );
if (/*0 <= nPara && */nPara < nParaCount)
{
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index 004b567750..f95c1bf90b 100644..100755
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
-SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl, BOOL bOutlText /* = FALSE */ ) :
+SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText /* = sal_False */ ) :
rOutliner( rOutl ),
bOutlinerText( bOutlText ),
mpAttribsCache( NULL ),
@@ -64,12 +64,12 @@ SvxOutlinerForwarder::~SvxOutlinerForwarder()
flushCache();
}
-USHORT SvxOutlinerForwarder::GetParagraphCount() const
+sal_uInt16 SvxOutlinerForwarder::GetParagraphCount() const
{
- return (USHORT)rOutliner.GetParagraphCount();
+ return (sal_uInt16)rOutliner.GetParagraphCount();
}
-USHORT SvxOutlinerForwarder::GetTextLen( USHORT nParagraph ) const
+sal_uInt16 SvxOutlinerForwarder::GetTextLen( sal_uInt16 nParagraph ) const
{
return rOutliner.GetEditEngine().GetTextLen( nParagraph );
}
@@ -82,7 +82,7 @@ String SvxOutlinerForwarder::GetText( const ESelection& rSel ) const
return pEditEngine->GetText( rSel, LINEEND_LF );
}
-static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib, EditEngine& rEditEngine )
+static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib, EditEngine& rEditEngine )
{
if( rSel.nStartPara == rSel.nEndPara )
{
@@ -110,7 +110,7 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL
}
}
-SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
if( mpAttribsCache && ( 0 == bOnlyHardAttrib ) )
{
@@ -147,7 +147,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyH
return aSet;
}
-SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const
+SfxItemSet SvxOutlinerForwarder::GetParaAttribs( sal_uInt16 nPara ) const
{
if( mpParaAttribsCache )
{
@@ -177,7 +177,7 @@ SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const
return *mpParaAttribsCache;
}
-void SvxOutlinerForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void SvxOutlinerForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
flushCache();
@@ -201,7 +201,7 @@ SfxItemPool* SvxOutlinerForwarder::GetPool() const
return rOutliner.GetEmptyItemSet().GetPool();
}
-void SvxOutlinerForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+void SvxOutlinerForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
{
((EditEngine&)rOutliner.GetEditEngine()).GetPortions( nPara, rList );
}
@@ -237,31 +237,31 @@ void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelec
rOutliner.QuickSetAttribs( rSet, rSel );
}
-XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
-void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos )
+void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos )
{
rOutliner.FieldClicked( rField, nPara, nPos );
}
-BOOL SvxOutlinerForwarder::IsValid() const
+sal_Bool SvxOutlinerForwarder::IsValid() const
{
// cannot reliably query outliner state
// while in the middle of an update
return rOutliner.GetUpdateMode();
}
-extern USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich );
+extern sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich );
-USHORT SvxOutlinerForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+sal_uInt16 SvxOutlinerForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
return GetSvxEditEngineItemState( (EditEngine&)rOutliner.GetEditEngine(), rSel, nWhich );
}
-USHORT SvxOutlinerForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+sal_uInt16 SvxOutlinerForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
const SfxItemSet& rSet = rOutliner.GetParaAttribs( nPara );
return rSet.GetItemState( nWhich );
@@ -283,33 +283,33 @@ void SvxOutlinerForwarder::flushCache()
}
}
-LanguageType SvxOutlinerForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+LanguageType SvxOutlinerForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
return rOutliner.GetLanguage(nPara, nIndex);
}
-USHORT SvxOutlinerForwarder::GetFieldCount( USHORT nPara ) const
+sal_uInt16 SvxOutlinerForwarder::GetFieldCount( sal_uInt16 nPara ) const
{
return rOutliner.GetEditEngine().GetFieldCount(nPara);
}
-EFieldInfo SvxOutlinerForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo SvxOutlinerForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
return rOutliner.GetEditEngine().GetFieldInfo( nPara, nField );
}
-EBulletInfo SvxOutlinerForwarder::GetBulletInfo( USHORT nPara ) const
+EBulletInfo SvxOutlinerForwarder::GetBulletInfo( sal_uInt16 nPara ) const
{
return rOutliner.GetBulletInfo( nPara );
}
-Rectangle SvxOutlinerForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+Rectangle SvxOutlinerForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
// EditEngine's 'internal' methods like GetCharacterBounds()
// don't rotate for vertical text.
Size aSize( rOutliner.CalcTextSize() );
::std::swap( aSize.Width(), aSize.Height() );
- bool bIsVertical( rOutliner.IsVertical() == TRUE );
+ bool bIsVertical( rOutliner.IsVertical() == sal_True );
// #108900# Handle virtual position one-past-the end of the string
if( nIndex >= GetTextLen(nPara) )
@@ -350,7 +350,7 @@ Rectangle SvxOutlinerForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) con
}
}
-Rectangle SvxOutlinerForwarder::GetParaBounds( USHORT nPara ) const
+Rectangle SvxOutlinerForwarder::GetParaBounds( sal_uInt16 nPara ) const
{
Point aPnt = rOutliner.GetDocPosTopLeft( nPara );
Size aSize = rOutliner.CalcTextSize();
@@ -360,13 +360,13 @@ Rectangle SvxOutlinerForwarder::GetParaBounds( USHORT nPara ) const
// Hargl. Outliner's 'external' methods return the rotated
// dimensions, 'internal' methods like GetTextHeight( n )
// don't rotate.
- ULONG nWidth = rOutliner.GetTextHeight( nPara );
+ sal_uLong nWidth = rOutliner.GetTextHeight( nPara );
return Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() );
}
else
{
- ULONG nHeight = rOutliner.GetTextHeight( nPara );
+ sal_uLong nHeight = rOutliner.GetTextHeight( nPara );
return Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight );
}
@@ -382,13 +382,13 @@ OutputDevice* SvxOutlinerForwarder::GetRefDevice() const
return rOutliner.GetRefDevice();
}
-sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const
{
Size aSize( rOutliner.CalcTextSize() );
::std::swap( aSize.Width(), aSize.Height() );
Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos,
aSize,
- rOutliner.IsVertical() == TRUE ));
+ rOutliner.IsVertical() == sal_True ));
EPosition aDocPos = rOutliner.GetEditEngine().FindDocPosition( aEEPos );
@@ -398,7 +398,7 @@ sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara
return sal_True;
}
-sal_Bool SvxOutlinerForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+sal_Bool SvxOutlinerForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
ESelection aRes = rOutliner.GetEditEngine().GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD );
@@ -414,32 +414,32 @@ sal_Bool SvxOutlinerForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHO
return sal_False;
}
-sal_Bool SvxOutlinerForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+sal_Bool SvxOutlinerForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex );
}
-USHORT SvxOutlinerForwarder::GetLineCount( USHORT nPara ) const
+sal_uInt16 SvxOutlinerForwarder::GetLineCount( sal_uInt16 nPara ) const
{
- return static_cast < USHORT >( rOutliner.GetLineCount(nPara) );
+ return static_cast < sal_uInt16 >( rOutliner.GetLineCount(nPara) );
}
-USHORT SvxOutlinerForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+sal_uInt16 SvxOutlinerForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const
{
return rOutliner.GetLineLen(nPara, nLine);
}
-void SvxOutlinerForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+void SvxOutlinerForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const
{
return rOutliner.GetEditEngine().GetLineBoundaries( rStart, rEnd, nPara, nLine );
}
-USHORT SvxOutlinerForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 SvxOutlinerForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
return rOutliner.GetEditEngine().GetLineNumberAtIndex( nPara, nIndex );
}
-sal_Bool SvxOutlinerForwarder::QuickFormatDoc( BOOL )
+sal_Bool SvxOutlinerForwarder::QuickFormatDoc( sal_Bool )
{
rOutliner.QuickFormatDoc();
@@ -464,7 +464,7 @@ sal_Bool SvxOutlinerForwarder::InsertText( const String& rStr, const ESelection&
return sal_True;
}
-sal_Int16 SvxOutlinerForwarder::GetDepth( USHORT nPara ) const
+sal_Int16 SvxOutlinerForwarder::GetDepth( sal_uInt16 nPara ) const
{
DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::GetDepth: Invalid paragraph index");
@@ -478,7 +478,7 @@ sal_Int16 SvxOutlinerForwarder::GetDepth( USHORT nPara ) const
return nLevel;
}
-sal_Bool SvxOutlinerForwarder::SetDepth( USHORT nPara, sal_Int16 nNewDepth )
+sal_Bool SvxOutlinerForwarder::SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth )
{
DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::SetDepth: Invalid paragraph index");
@@ -562,12 +562,12 @@ void SvxOutlinerForwarder::AppendParagraph()
rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() );
}
-xub_StrLen SvxOutlinerForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet & /*rSet*/ )
+xub_StrLen SvxOutlinerForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet & /*rSet*/ )
{
xub_StrLen nLen = 0;
EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() );
- USHORT nParaCount = rEditEngine.GetParagraphCount();
+ sal_uInt16 nParaCount = rEditEngine.GetParagraphCount();
DBG_ASSERT( nPara < nParaCount, "paragraph index out of bounds" );
if (/*0 <= nPara && */nPara < nParaCount)
{
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index c5dbf3ae1e..1aa2737458 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -128,8 +128,8 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
if( NULL == pItem && pPool )
pItem = &(pPool->GetDefaultItem( pMap->nWID ));
- const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM;
- BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+ const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : SFX_MAPUNIT_100TH_MM;
+ sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
if( eMapUnit == SFX_MAPUNIT_100TH_MM )
nMemberId &= (~CONVERT_TWIPS);
@@ -190,7 +190,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa
{
uno::Any aValue( rVal );
- const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM;
+ const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : SFX_MAPUNIT_100TH_MM;
// check for needed metric translation
if( (pMap->nMemberId & SFX_METRIC_ITEM) && eMapUnit != SFX_MAPUNIT_100TH_MM )
@@ -201,7 +201,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa
pNewItem = pItem->Clone();
- BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+ sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
if( eMapUnit == SFX_MAPUNIT_100TH_MM )
nMemberId &= (~CONVERT_TWIPS);
@@ -223,8 +223,8 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
return *pUsrAny;
// No UsrAny detected yet, generate Default entry and return this
- const SfxMapUnit eMapUnit = mrItemPool.GetMetric((USHORT)pMap->nWID);
- BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+ const SfxMapUnit eMapUnit = mrItemPool.GetMetric((sal_uInt16)pMap->nWID);
+ sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
if( eMapUnit == SFX_MAPUNIT_100TH_MM )
nMemberId &= (~CONVERT_TWIPS);
uno::Any aVal;
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index cca9f8bf16..6513fabb25 100644..100755
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -548,7 +548,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr
}
else
{
- SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , FALSE);
+ SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
return new SvxUnoNumberingRules( aDefaultRule );
}
}
@@ -584,13 +584,13 @@ sal_Int16 SvxUnoNumberingRules::Compare( const Any& Any1, const Any& Any2 )
const SvxNumRule& rRule1 = pRule1->getNumRule();
const SvxNumRule& rRule2 = pRule2->getNumRule();
- const USHORT nLevelCount1 = rRule1.GetLevelCount();
- const USHORT nLevelCount2 = rRule2.GetLevelCount();
+ const sal_uInt16 nLevelCount1 = rRule1.GetLevelCount();
+ const sal_uInt16 nLevelCount2 = rRule2.GetLevelCount();
if( nLevelCount1 == 0 || nLevelCount2 == 0 )
return -1;
- for( USHORT i = 0; (i < nLevelCount1) && (i < nLevelCount2); i++ )
+ for( sal_uInt16 i = 0; (i < nLevelCount1) && (i < nLevelCount2); i++ )
{
if( rRule1.GetLevel(i) != rRule2.GetLevel(i) )
return -1;
diff --git a/editeng/source/uno/unopracc.cxx b/editeng/source/uno/unopracc.cxx
index 759c8c686d..759c8c686d 100644..100755
--- a/editeng/source/uno/unopracc.cxx
+++ b/editeng/source/uno/unopracc.cxx
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 3eda3f69a0..af248fc685 100644..100755
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -454,9 +454,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa
while( nPara <= nEndPara )
{
// we have a paragraph
- SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nPara ) );
+ SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nPara ) );
setPropertyValue( pMap, aValue, maSelection, aSet, aSet );
- pForwarder->SetParaAttribs( (USHORT)nPara, aSet );
+ pForwarder->SetParaAttribs( (sal_uInt16)nPara, aSet );
nPara++;
}
}
@@ -589,7 +589,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert
{
SfxItemSet* pAttribs = NULL;
if( nPara != -1 )
- pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone();
+ pAttribs = pForwarder->GetParaAttribs( (sal_uInt16)nPara ).Clone();
else
pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone();
@@ -798,7 +798,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt
{
if( NULL == pNewParaSet )
{
- const SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) );
+ const SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nTempPara ) );
pOldParaSet = new SfxItemSet( aSet );
pNewParaSet = new SfxItemSet( *pOldParaSet->GetPool(), pOldParaSet->GetRanges() );
}
@@ -826,9 +826,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt
{
while( nTempPara <= nEndPara )
{
- SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) );
+ SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nTempPara ) );
aSet.Put( *pNewParaSet );
- pForwarder->SetParaAttribs( (USHORT)nTempPara, aSet );
+ pForwarder->SetParaAttribs( (sal_uInt16)nTempPara, aSet );
nTempPara++;
}
bNeedsUpdate = sal_True;
@@ -874,7 +874,7 @@ uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( cons
{
SfxItemSet* pAttribs = NULL;
if( nPara != -1 )
- pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone();
+ pAttribs = pForwarder->GetParaAttribs( (sal_uInt16)nPara ).Clone();
else
pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone();
@@ -942,7 +942,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
while( *pWhichId )
{
if(nPara != -1)
- eTempItemState = pForwarder->GetItemState( (USHORT)nPara, *pWhichId );
+ eTempItemState = pForwarder->GetItemState( (sal_uInt16)nPara, *pWhichId );
else
eTempItemState = pForwarder->GetItemState( GetSelection(), *pWhichId );
@@ -991,7 +991,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
if( nWID != 0 )
{
if( nPara != -1 )
- eItemState = pForwarder->GetItemState( (USHORT)nPara, nWID );
+ eItemState = pForwarder->GetItemState( (sal_uInt16)nPara, nWID );
else
eItemState = pForwarder->GetItemState( GetSelection(), nWID );
}
@@ -1042,7 +1042,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
SfxItemSet* pSet = NULL;
if( nPara != -1 )
{
- pSet = new SfxItemSet( pForwarder->GetParaAttribs( (USHORT)nPara ) );
+ pSet = new SfxItemSet( pForwarder->GetParaAttribs( (sal_uInt16)nPara ) );
}
else
{
@@ -1190,7 +1190,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co
{
do
{
- SfxItemSet aSet( *pForwarder->GetPool(), TRUE );
+ SfxItemSet aSet( *pForwarder->GetPool(), sal_True );
if( pMap->nWID == WID_FONTDESC )
{
@@ -1216,7 +1216,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co
}
if(nPara != -1)
- pForwarder->SetParaAttribs( (USHORT)nPara, aSet );
+ pForwarder->SetParaAttribs( (sal_uInt16)nPara, aSet );
else
pForwarder->QuickSetAttribs( aSet, GetSelection() );
@@ -2057,7 +2057,7 @@ void SvxPropertyValuesToItemSet(
const uno::Sequence< beans::PropertyValue > rPropertyVaules,
const SfxItemPropertySet *pPropSet,
SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/,
- USHORT nPara /*needed for WID_NUMLEVEL*/)
+ sal_uInt16 nPara /*needed for WID_NUMLEVEL*/)
throw(lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
{
sal_Int32 nProps = rPropertyVaules.getLength();
@@ -2136,7 +2136,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendParagraph(
SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0;
if (pTextForwarder)
{
- USHORT nParaCount = pTextForwarder->GetParagraphCount();
+ sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount();
DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" );
pTextForwarder->AppendParagraph();
@@ -2167,12 +2167,12 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::finishParagraph(
SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0;
if (pTextForwarder)
{
- USHORT nParaCount = pTextForwarder->GetParagraphCount();
+ sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount();
DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" );
pTextForwarder->AppendParagraph();
// set properties for the previously last paragraph
- USHORT nPara = nParaCount - 1;
+ sal_uInt16 nPara = nParaCount - 1;
ESelection aSel( nPara, 0, nPara, 0 );
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
@@ -2199,9 +2199,9 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion(
uno::Reference< text::XTextRange > xRet;
if (pTextForwarder)
{
- USHORT nParaCount = pTextForwarder->GetParagraphCount();
+ sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount();
DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" );
- USHORT nPara = nParaCount - 1;
+ sal_uInt16 nPara = nParaCount - 1;
SfxItemSet aSet( pTextForwarder->GetParaAttribs( nPara ) );
xub_StrLen nStart = pTextForwarder->AppendTextPortion( nPara, rText, aSet );
pEditSource->UpdateData();
@@ -2463,7 +2463,7 @@ String SvxDummyTextSource::GetText( const ESelection& ) const
return String();
}
-SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection&, BOOL ) const
+SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection&, sal_Bool ) const
{
// Very dangerous: The former implementation used a SfxItemPool created on the
// fly which of course was deleted again ASAP. Thus, the returned SfxItemSet was using
@@ -2524,7 +2524,7 @@ XubString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_uInt16, s
return XubString();
}
-void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, USHORT, xub_StrLen )
+void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, sal_uInt16, xub_StrLen )
{
}
@@ -2537,32 +2537,32 @@ void SvxDummyTextSource::SetNotifyHdl( const Link& )
{
}
-LanguageType SvxDummyTextSource::GetLanguage( USHORT, USHORT ) const
+LanguageType SvxDummyTextSource::GetLanguage( sal_uInt16, sal_uInt16 ) const
{
return LANGUAGE_DONTKNOW;
}
-USHORT SvxDummyTextSource::GetFieldCount( USHORT ) const
+sal_uInt16 SvxDummyTextSource::GetFieldCount( sal_uInt16 ) const
{
return 0;
}
-EFieldInfo SvxDummyTextSource::GetFieldInfo( USHORT, USHORT ) const
+EFieldInfo SvxDummyTextSource::GetFieldInfo( sal_uInt16, sal_uInt16 ) const
{
return EFieldInfo();
}
-EBulletInfo SvxDummyTextSource::GetBulletInfo( USHORT ) const
+EBulletInfo SvxDummyTextSource::GetBulletInfo( sal_uInt16 ) const
{
return EBulletInfo();
}
-Rectangle SvxDummyTextSource::GetCharBounds( USHORT, USHORT ) const
+Rectangle SvxDummyTextSource::GetCharBounds( sal_uInt16, sal_uInt16 ) const
{
return Rectangle();
}
-Rectangle SvxDummyTextSource::GetParaBounds( USHORT ) const
+Rectangle SvxDummyTextSource::GetParaBounds( sal_uInt16 ) const
{
return Rectangle();
}
@@ -2577,52 +2577,52 @@ OutputDevice* SvxDummyTextSource::GetRefDevice() const
return NULL;
}
-sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, USHORT&, USHORT& ) const
+sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, sal_uInt16&, sal_uInt16& ) const
{
return sal_False;
}
-sal_Bool SvxDummyTextSource::GetWordIndices( USHORT, USHORT, USHORT&, USHORT& ) const
+sal_Bool SvxDummyTextSource::GetWordIndices( sal_uInt16, sal_uInt16, sal_uInt16&, sal_uInt16& ) const
{
return sal_False;
}
-sal_Bool SvxDummyTextSource::GetAttributeRun( USHORT&, USHORT&, USHORT, USHORT ) const
+sal_Bool SvxDummyTextSource::GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_uInt16, sal_uInt16 ) const
{
return sal_False;
}
-USHORT SvxDummyTextSource::GetLineCount( USHORT ) const
+sal_uInt16 SvxDummyTextSource::GetLineCount( sal_uInt16 ) const
{
return 0;
}
-USHORT SvxDummyTextSource::GetLineLen( USHORT, USHORT ) const
+sal_uInt16 SvxDummyTextSource::GetLineLen( sal_uInt16, sal_uInt16 ) const
{
return 0;
}
-void SvxDummyTextSource::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT /*nParagraph*/, USHORT /*nLine*/ ) const
+void SvxDummyTextSource::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 /*nParagraph*/, sal_uInt16 /*nLine*/ ) const
{
rStart = rEnd = 0;
}
-USHORT SvxDummyTextSource::GetLineNumberAtIndex( USHORT /*nPara*/, USHORT /*nIndex*/ ) const
+sal_uInt16 SvxDummyTextSource::GetLineNumberAtIndex( sal_uInt16 /*nPara*/, sal_uInt16 /*nIndex*/ ) const
{
return 0;
}
-sal_Bool SvxDummyTextSource::QuickFormatDoc( BOOL )
+sal_Bool SvxDummyTextSource::QuickFormatDoc( sal_Bool )
{
return sal_False;
}
-sal_Int16 SvxDummyTextSource::GetDepth( USHORT ) const
+sal_Int16 SvxDummyTextSource::GetDepth( sal_uInt16 ) const
{
return -1;
}
-sal_Bool SvxDummyTextSource::SetDepth( USHORT, sal_Int16 nNewDepth )
+sal_Bool SvxDummyTextSource::SetDepth( sal_uInt16, sal_Int16 nNewDepth )
{
return nNewDepth == 0 ? sal_True : sal_False;
}
@@ -2646,7 +2646,7 @@ void SvxDummyTextSource::AppendParagraph()
{
}
-xub_StrLen SvxDummyTextSource::AppendTextPortion( USHORT, const String &, const SfxItemSet & )
+xub_StrLen SvxDummyTextSource::AppendTextPortion( sal_uInt16, const String &, const SfxItemSet & )
{
return 0;
}
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx
index 731aa8cf26..7e94aac3bb 100644..100755
--- a/editeng/source/uno/unotext2.cxx
+++ b/editeng/source/uno/unotext2.cxx
@@ -31,7 +31,7 @@
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uIt16S
#include <svl/svstdarr.hxx>
#include <rtl/uuid.h>
diff --git a/editeng/source/uno/unoviwed.cxx b/editeng/source/uno/unoviwed.cxx
index 2ea5fddd09..161f9bc070 100644..100755
--- a/editeng/source/uno/unoviwed.cxx
+++ b/editeng/source/uno/unoviwed.cxx
@@ -44,7 +44,7 @@ SvxEditEngineViewForwarder::~SvxEditEngineViewForwarder()
{
}
-BOOL SvxEditEngineViewForwarder::IsValid() const
+sal_Bool SvxEditEngineViewForwarder::IsValid() const
{
return sal_True;
}
diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx
index 2117334f09..0f5e2305a6 100644..100755
--- a/editeng/source/uno/unoviwou.cxx
+++ b/editeng/source/uno/unoviwou.cxx
@@ -57,7 +57,7 @@ Point SvxDrawOutlinerViewForwarder::GetTextOffset() const
return aOutputRect.TopLeft() - maTextShapeTopLeft;
}
-BOOL SvxDrawOutlinerViewForwarder::IsValid() const
+sal_Bool SvxDrawOutlinerViewForwarder::IsValid() const
{
return sal_True;
}
diff --git a/editeng/source/xml/editsource.hxx b/editeng/source/xml/editsource.hxx
index e412e99d64..e412e99d64 100644..100755
--- a/editeng/source/xml/editsource.hxx
+++ b/editeng/source/xml/editsource.hxx
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index e4727c0f4f..4a428c98a6 100644..100755
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -449,7 +449,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
/* testcode
const OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "file:///e:/test.xml" ) );
- SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, TRUE );
+ SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, sal_True );
aMedium.IsRemote();
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
*/
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index 760246d82c..dbc293c64f 100644..100755
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -68,10 +68,10 @@ using namespace xmloff::token;
class SvxXMLTextImportContext : public SvXMLImportContext
{
public:
- SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, const uno::Reference< XText >& xText );
+ SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, const uno::Reference< XText >& xText );
virtual ~SvxXMLTextImportContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList );
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList );
// SvxXMLXTableImport& getImport() const { return *(SvxXMLXTableImport*)&GetImport(); }
@@ -81,7 +81,7 @@ private:
///////////////////////////////////////////////////////////////////////
-SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, const uno::Reference< XText >& xText )
+SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, const uno::Reference< XText >& xText )
: SvXMLImportContext( rImport, nPrfx, rLName ), mxText( xText )
{
}
@@ -90,7 +90,7 @@ SvxXMLTextImportContext::~SvxXMLTextImportContext()
{
}
-SvXMLImportContext *SvxXMLTextImportContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList )
+SvXMLImportContext *SvxXMLTextImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList )
{
SvXMLImportContext* pContext = NULL;
if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_BODY ) )
@@ -127,7 +127,7 @@ public:
static sal_Bool load( const rtl::OUString& rUrl, const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xTable ) throw();
protected:
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList );
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList );
private:
const uno::Reference< XText > mxText;
@@ -189,7 +189,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
/* testcode
const OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "file:///e:/test.xml" ) );
- SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, TRUE );
+ SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, sal_True );
aMedium.IsRemote();
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
@@ -242,7 +242,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
}
}
-SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList )
+SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList )
{
SvXMLImportContext* pContext;
if(XML_NAMESPACE_OFFICE == nPrefix && ( IsXMLToken( rLocalName, XML_DOCUMENT ) || IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) ) )
diff --git a/editeng/util/editeng.dxp b/editeng/util/editeng.dxp
index 9630d7e067..f0e1c69934 100644..100755
--- a/editeng/util/editeng.dxp
+++ b/editeng/util/editeng.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/editeng/util/hidother.src b/editeng/util/hidother.src
index 0203afa929..0203afa929 100644..100755
--- a/editeng/util/hidother.src
+++ b/editeng/util/hidother.src