summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-03-14 16:51:14 +0000
committerMichael Meeks <michael.meeks@novell.com>2011-03-14 16:51:14 +0000
commited40f62e64564d2b22c9285cfdc6778aeac8fd68 (patch)
tree1a29a28c991a80ec1f3c6de1ce0cd28d4996fe21 /sw/source/filter/ww8
parent6cd7d7c69ce62fbf788fc4e971cb14ab24d4c5ed (diff)
parent20529755b301c7af2c5ab461329b2d979b2cdbff (diff)
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/README-rtf.txt31
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx6
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx6
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx46
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx121
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx42
-rw-r--r--sw/source/filter/ww8/docxexport.cxx21
-rw-r--r--sw/source/filter/ww8/docxexport.hxx14
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx125
-rw-r--r--sw/source/filter/ww8/docxexportfilter.hxx7
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx1
-rw-r--r--sw/source/filter/ww8/escher.hxx32
-rw-r--r--sw/source/filter/ww8/makefile.mk91
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx112
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx48
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx145
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx37
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx9
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx9
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.cxx10
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.hxx7
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx13
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx9
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx40
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx8
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx18
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx193
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx114
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx137
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx277
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx466
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx364
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx78
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx374
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx50
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx20
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx10
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx296
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx26
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx58
-rw-r--r--sw/source/filter/ww8/ww8par.cxx497
-rw-r--r--sw/source/filter/ww8/ww8par.hxx402
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx332
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx68
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx74
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx50
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx142
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx466
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx636
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx940
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx300
53 files changed, 3667 insertions, 3715 deletions
diff --git a/sw/source/filter/ww8/README-rtf.txt b/sw/source/filter/ww8/README-rtf.txt
index 661813abc95a..6acddaa61eee 100644
--- a/sw/source/filter/ww8/README-rtf.txt
+++ b/sw/source/filter/ww8/README-rtf.txt
@@ -35,7 +35,7 @@ Table of Contents
---------------------------------------------------------------------
-1.Introduction
+1.�Introduction
---------------------------------------------------------------------
@@ -45,7 +45,7 @@ this way much less code can achieve the same set of features,
reducing the amount of duplicated code.
-1.1.Terminology
+1.1.�Terminology
--------------
@@ -56,7 +56,7 @@ reducing the amount of duplicated code.
to the old built-in one.
-1.2.General
+1.2.�General
--------------
@@ -72,7 +72,7 @@ the bug will pop up less frequently.
---------------------------------------------------------------------
-2.List if fixed bugs
+2.�List if fixed bugs
---------------------------------------------------------------------
@@ -101,12 +101,12 @@ the bug will pop up less frequently.
---------------------------------------------------------------------
-3.List of new features
+3.�List of new features
---------------------------------------------------------------------
-3.1.Nested tables
+3.1.�Nested tables
--------------
@@ -114,7 +114,7 @@ This was new in Word2000 and it?s now supported by RtfExport (MSO OK,
OOo KO)
-3.2.Character properties
+3.2.�Character properties
--------------
@@ -125,7 +125,7 @@ The followings are now supported:
* pair kerning (MSO OK, OOo OK)
-3.3.Sections
+3.3.�Sections
--------------
@@ -141,7 +141,7 @@ RtfExport writes:
* line numbering (MSO OK, OOo KO)
-3.4.Graphics
+3.4.�Graphics
--------------
@@ -150,7 +150,7 @@ and OOo can display graphics from the output document, but Wordpad as
well.
-3.5.Bookmarks
+3.5.�Bookmarks
--------------
@@ -160,7 +160,7 @@ the result), this now works as expected. (MSO OK - the importer
previously autocorrected this as well, OO OK)
-3.6.Fields
+3.6.�Fields
--------------
@@ -169,7 +169,7 @@ previously autocorrected this as well, OO OK)
* Postit comments are now exported. (MSO OK, OOo KO)
-3.7.Drawing
+3.7.�Drawing
--------------
@@ -184,7 +184,7 @@ implemented:
(MSO OK, OOo KO)
-3.8.Form fields
+3.8.�Form fields
--------------
@@ -197,7 +197,7 @@ All types supported by the RTF format are exported, namely:
(MSO OK, OOo KO)
-3.9.OLE objects
+3.9.�OLE objects
--------------
@@ -210,7 +210,7 @@ object, too. (MSO OK, OOo KO)
---------------------------------------------------------------------
-4.Changes in the source code outside RTF
+4.�Changes in the source code outside RTF
---------------------------------------------------------------------
@@ -224,3 +224,4 @@ not change the output of other filters from a user?s point of view.
* wwFontHelper::InitFontTable can really load all fonts
* An obvious typo in WW8AttributeOutput::CharTwoLines has been
fixed
+
diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx
index 6d2f1e8d793b..65fa2b6b6cd7 100644
--- a/sw/source/filter/ww8/WW8FFData.cxx
+++ b/sw/source/filter/ww8/WW8FFData.cxx
@@ -89,7 +89,7 @@ void WW8FFData::WriteOUString(SvStream * pDataStrm, const ::rtl::OUString & rStr
void WW8FFData::Write(SvStream * pDataStrm)
{
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
static const sal_uInt8 aHeader[] =
{
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index 07271945430a..3b411a9b4cc9 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -42,7 +42,7 @@ namespace ww8
{
rSt.Seek(nPos);
- mp_data.reset(new BYTE[nSize]);
+ mp_data.reset(new sal_uInt8[nSize]);
rSt.Read(mp_data.get(), nSize);
}
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index 0741a221a248..f4c2e6b08bf6 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -36,7 +36,7 @@
namespace ww8
{
- typedef boost::shared_array<BYTE> DataArray_t;
+ typedef boost::shared_array<sal_uInt8> DataArray_t;
class WW8Struct : public ::sw::ExternalData
{
@@ -73,7 +73,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
ExtrasVector_t m_Extras;
public:
- WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize);
+ WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize);
virtual ~WW8Sttb();
sal_uInt32 getCount() const;
@@ -94,7 +94,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
};
template <class T>
- WW8Sttb<T>::WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize)
+ WW8Sttb<T>::WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize)
: WW8Struct(rSt, nPos, nSize), bDoubleByteCharacters(false)
{
sal_uInt32 nOffset = 0;
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index ce82774132c9..665a73f2721f 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -659,7 +659,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
{
const SwTableLines & rLines = pTable->GetTabLines();
- for (USHORT n = 0; n < rLines.Count(); n++)
+ for (sal_uInt16 n = 0; n < rLines.Count(); n++)
{
const SwTableLine * pLine = rLines[n];
@@ -695,7 +695,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
WW8TableNodeInfo::Pointer_t pTextNodeInfo;
- for (USHORT n = 0; n < rBoxes.Count(); n++)
+ for (sal_uInt16 n = 0; n < rBoxes.Count(); n++)
{
const SwTableBox * pBox = rBoxes[n];
@@ -732,7 +732,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
const SwTableLine * pLine = rLines[n];
const SwTableBoxes & rBoxes = pLine->GetTabBoxes();
- for (USHORT nBox = 0; nBox < rBoxes.Count(); nBox++)
+ for (sal_uInt16 nBox = 0; nBox < rBoxes.Count(); nBox++)
pNodeInfo = processTableBoxLines(rBoxes[nBox], pTable, pBoxToSet, nRow, nCell, nDepth);
}
}
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index d31b66bd450e..25fc96566def 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -133,8 +133,8 @@ class MSWordExportBase;
namespace sw { class Frame; }
namespace msword {
- const BYTE ColumnBreak = 0xE;
- const BYTE PageBreak = 0xC;
+ const sal_uInt8 ColumnBreak = 0xE;
+ const sal_uInt8 PageBreak = 0xC;
}
class AttributeOutputBase
@@ -202,7 +202,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline ) = 0;
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
/// Output FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -210,7 +210,7 @@ public:
virtual void OutputFKP() {}
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle ) = 0;
+ virtual void ParagraphStyle( sal_uInt16 nStyle ) = 0;
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
@@ -244,27 +244,27 @@ public:
virtual void StartStyles() = 0;
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles ) = 0;
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles ) = 0;
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle ) = 0;
+ virtual void DefaultStyle( sal_uInt16 nStyle ) = 0;
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate ) = 0;
/// End of a style in the styles table.
virtual void EndStyle() = 0;
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle ) = 0;
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) = 0;
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp ) = 0;
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -272,7 +272,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
/// Start of the section properties.
virtual void StartSection() = 0;
@@ -284,7 +284,7 @@ public:
virtual void SectionFormProtection( bool bProtected ) = 0;
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
/// Has different headers/footers for the title page.
virtual void SectionTitlePage() = 0;
@@ -298,30 +298,30 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber ) = 0;
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber ) = 0;
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode ) = 0;
+ virtual void SectionType( sal_uInt8 nBreakCode ) = 0;
/// Special header/footer flags, needed for old versions only.
- virtual void SectionWW6HeaderFooterFlags( BYTE /*nHeadFootFlags*/ ) {}
+ virtual void SectionWW6HeaderFooterFlags( sal_uInt8 /*nHeadFootFlags*/ ) {}
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule ) = 0;
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) = 0;
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT /*nId*/ ) {}
+ virtual void StartAbstractNumbering( sal_uInt16 /*nId*/ ) {}
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering() {}
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -534,7 +534,7 @@ protected:
/// Sfx item RES_COL
void FormatColumns( const SwFmtCol& );
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& ) = 0;
@@ -575,7 +575,7 @@ public:
void OutputItem( const SfxPoolItem& rHt );
/// Use OutputItem() on an item set - for styles.
- void OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault );
+ void OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault );
/// Output frames.
void OutputFlyFrame( const sw::Frame& rFmt );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4d3aba513a19..443483f36c59 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -41,7 +41,7 @@
#include "charfmt.hxx"
#include "breakit.hxx"
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/utils.hxx>
#include <oox/export/vmlexport.hxx>
@@ -146,6 +146,7 @@ using rtl::OUString;
using rtl::OUStringBuffer;
using rtl::OUStringToOString;
+using namespace oox;
using namespace docx;
using namespace sax_fastparser;
using namespace nsSwDocInfoSubType;
@@ -307,8 +308,8 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
const SwFrmFmt& rFrmFmt = m_pParentFrame->GetFrmFmt( );
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
m_rExport.SaveData( nStt, nEnd );
@@ -330,7 +331,7 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
// HACK
// msoffice seems to have an internal limitation of 63 columns for tables
// and refuses to load .docx with more, even though the spec seems to allow that;
@@ -596,7 +597,7 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Output the bookmark
- USHORT nId = m_nNextMarkId++;
+ sal_uInt16 nId = m_nNextMarkId++;
m_rOpenedMarksIds[rName] = nId;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkStart,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
@@ -612,10 +613,10 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Get the id of the bookmark
- std::map< OString, USHORT >::iterator pPos = m_rOpenedMarksIds.find( rName );
+ std::map< OString, sal_uInt16 >::iterator pPos = m_rOpenedMarksIds.find( rName );
if ( pPos != m_rOpenedMarksIds.end( ) )
{
- USHORT nId = ( *pPos ).second;
+ sal_uInt16 nId = ( *pPos ).second;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkEnd,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
FSEND );
@@ -674,7 +675,7 @@ void DocxAttributeOutput::StartField_Impl( FieldInfos& rInfos, sal_Bool bWriteRu
if ( rInfos.pField && rInfos.eType == ww::eUNKNOWN )
{
// Expand unsupported fields
- RunText( rInfos.pField->GetCntnt() );
+ RunText( rInfos.pField->GetFieldName() );
}
else if ( rInfos.eType != ww::eNONE ) // HYPERLINK fields are just commands
{
@@ -788,7 +789,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
// Find another way for hyperlinks
- RunText( rInfos.pField->GetCntnt() );
+ RunText( rInfos.pField->GetFieldName() );
m_pSerializer->endElementNS( XML_w, XML_r );
}
@@ -815,7 +816,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
// should be visible
if ( rInfos.pField )
{
- USHORT nSubType = rInfos.pField->GetSubType( );
+ sal_uInt16 nSubType = rInfos.pField->GetSubType( );
bool bIsSetField = rInfos.pField->GetTyp( )->Which( ) == RES_SETEXPFLD;
bool bShowRef = ( !bIsSetField || ( nSubType & nsSwExtendedSubType::SUB_INVISIBLE ) ) ? false : true;
@@ -1090,7 +1091,7 @@ void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, co
StartRunProperties( );
SwWW8AttrIter aAttrIt( m_rExport, rNode );
aAttrIt.OutAttr( nPos, true );
- USHORT nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
OString aStyleId( "style" );
aStyleId += OString::valueOf( sal_Int32( nStyle ) );
m_pSerializer->singleElementNS( XML_w, XML_rStyle,
@@ -1314,12 +1315,12 @@ void DocxAttributeOutput::EndRedline()
m_pRedlineData = NULL;
}
-void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
+void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
{
- OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle )\n" );
}
-void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
+void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OString aStyleId( "style" );
aStyleId += OString::valueOf( sal_Int32( nStyle ) );
@@ -1347,13 +1348,13 @@ static OString impl_ConvertColor( const Color &rColor )
return color;
}
-static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, USHORT nDist )
+static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist )
{
FastAttributeList* pAttr = pSerializer->createAttrList();
- USHORT inW = pBorderLine->GetInWidth();
- USHORT outW = pBorderLine->GetOutWidth();
- USHORT nWidth = inW + outW;
+ sal_uInt16 inW = pBorderLine->GetInWidth();
+ sal_uInt16 outW = pBorderLine->GetOutWidth();
+ sal_uInt16 nWidth = inW + outW;
// Compute val attribute value
// Can be one of:
@@ -1397,8 +1398,8 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
// The unit is the 8th of point
nWidth = sal_Int32( nWidth / 2.5 );
- USHORT nMinWidth = 2;
- USHORT nMaxWidth = 96;
+ sal_uInt16 nMinWidth = 2;
+ sal_uInt16 nMaxWidth = 96;
if ( nWidth > nMaxWidth )
nWidth = nMaxWidth;
@@ -1420,7 +1421,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, bool bUseStartEnd = false )
{
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -1432,7 +1433,7 @@ static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, b
XML_bottom,
bUseStartEnd ? XML_end : XML_right
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -1461,7 +1462,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
if ( nColSpan > 1 )
m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
@@ -1493,7 +1494,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
// Cell margins
m_pSerializer->startElementNS( XML_w, XML_tcMar, FSEND );
const SvxBoxItem& rBox = pFmt->GetBox( );
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -1505,7 +1506,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
XML_bottom,
bEcma ? XML_right : XML_end
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
sal_Int32 nDist = sal_Int32( rBox.GetDistance( *pBrd ) );
@@ -1538,8 +1539,8 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize,
- (USHORT)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
+ (sal_uInt16)nTblSz, false);
}
void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -1830,16 +1831,16 @@ void DocxAttributeOutput::StartStyles()
FSEND );
}
-void DocxAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void DocxAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
m_pSerializer->endElementNS( XML_w, XML_styles );
}
-void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
+void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
// are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
+ OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )- %d\n", nStyle );
#else
(void) nStyle; // to quiet the warning
#endif
@@ -2227,7 +2228,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
}
void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool bAutoUpdate )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate )
{
OString aStyle( "style" );
@@ -2260,7 +2261,7 @@ void DocxAttributeOutput::EndStyle()
m_pSerializer->endElementNS( XML_w, XML_style );
}
-void DocxAttributeOutput::StartStyleProperties( bool bParProp, USHORT /*nStyle*/ )
+void DocxAttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 /*nStyle*/ )
{
if ( bParProp )
{
@@ -2288,7 +2289,7 @@ void DocxAttributeOutput::EndStyleProperties( bool bParProp )
}
}
-void DocxAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void DocxAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel - 1;
@@ -2308,7 +2309,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
FSEND );
}
-void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
switch ( nC )
{
@@ -2420,7 +2421,7 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
FSNS( XML_w, XML_val ), "false", FSEND );
}
-void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
+void DocxAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
{
// see 2.6.8 lnNumType (Line Numbering Settings)
OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
@@ -2463,7 +2464,7 @@ void DocxAttributeOutput::SectionBiDi( bool bBiDi )
m_pSerializer->singleElementNS( XML_w, XML_bidi, FSEND );
}
-static OString impl_NumberingType( USHORT nNumberingType )
+static OString impl_NumberingType( sal_uInt16 nNumberingType )
{
OString aType;
@@ -2487,7 +2488,7 @@ static OString impl_NumberingType( USHORT nNumberingType )
return aType;
}
-void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// FIXME Not called properly with page styles like "First Page"
@@ -2509,7 +2510,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes
OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
}
-void DocxAttributeOutput::SectionType( BYTE nBreakCode )
+void DocxAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
/* break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
@@ -2602,7 +2603,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
FSEND );
}
-void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void DocxAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
// nId is the same both for abstract numbering definition as well as the
// numbering definition itself
@@ -2628,7 +2629,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul
m_pSerializer->endElementNS( XML_w, XML_num );
}
-void DocxAttributeOutput::StartAbstractNumbering( USHORT nId )
+void DocxAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
m_pSerializer->startElementNS( XML_w, XML_abstractNum,
FSNS( XML_w, XML_abstractNumId ), OString::valueOf( sal_Int32( nId ) ).getStr(),
@@ -2640,12 +2641,12 @@ void DocxAttributeOutput::EndAbstractNumbering()
m_pSerializer->endElementNS( XML_w, XML_abstractNum );
}
-void DocxAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE * /*pNumLvlPos*/,
- BYTE nFollow,
+ const sal_uInt8 * /*pNumLvlPos*/,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -3153,7 +3154,7 @@ void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
{
- USHORT nType = rFld.GetTyp( )->Which( );
+ sal_uInt16 nType = rFld.GetTyp( )->Which( );
if ( nType == RES_GETEXPFLD )
{
String sCmd = FieldString( ww::eREF );
@@ -3201,7 +3202,7 @@ void DocxAttributeOutput::WriteExpand( const SwField* pFld )
m_rExport.OutputField( pFld, ww::eUNKNOWN, sCmd );
}
-void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode )
+void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode )
{
struct FieldInfos infos;
infos.pField = pFld;
@@ -3213,8 +3214,8 @@ void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType
if ( pFld )
{
- USHORT nType = pFld->GetTyp( )->Which( );
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nType = pFld->GetTyp( )->Which( );
+ sal_uInt16 nSubType = pFld->GetSubType();
// TODO Any other field types here ?
if ( ( nType == RES_SETEXPFLD ) && ( nSubType & nsSwGetSetExpType::GSE_STRING ) )
@@ -3531,7 +3532,7 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTxtNode* /*pTxtNd*/, sal_Int
void DocxAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nXmlElement = 0;
+ sal_uInt16 nXmlElement = 0;
switch ( rScriptSpace.Which( ) )
{
@@ -3648,7 +3649,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
if ( !m_pSectionSpacingAttrList )
m_pSectionSpacingAttrList = m_pSerializer->createAttrList();
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rExport.HasItem( RES_BOX );
if ( pItem )
{
@@ -3657,8 +3658,8 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLRSpace.GetLeft();
- nRDist = nRDist + (USHORT)rLRSpace.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLRSpace.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLRSpace.GetRight();
m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_left ), OString::valueOf( sal_Int32( nLDist ) ) );
m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_right ), OString::valueOf( sal_Int32( nRDist ) ) );
@@ -3918,7 +3919,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
-void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
// Get the columns attributes
FastAttributeList *pColsAttrList = m_pSerializer->createAttrList();
@@ -3929,7 +3930,7 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const char* pEquals = "false";
if ( bEven )
{
- USHORT nWidth = rCol.GetGutterWidth( true );
+ sal_uInt16 nWidth = rCol.GetGutterWidth( true );
pColsAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
@@ -3948,16 +3949,16 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const SwColumns & rColumns = rCol.GetColumns( );
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
FastAttributeList *pColAttrList = m_pSerializer->createAttrList();
- USHORT nWidth = rCol.CalcPrtColWidth( n, ( USHORT ) nPageSize );
+ sal_uInt16 nWidth = rCol.CalcPrtColWidth( n, ( sal_uInt16 ) nPageSize );
pColAttrList->add( FSNS( XML_w, XML_w ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
if ( n + 1 != nCols )
{
- USHORT nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
+ sal_uInt16 nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
pColAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nSpacing ) ).getStr( ) );
}
@@ -3997,7 +3998,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
}
pGridAttrList->add( FSNS( XML_w, XML_type ), sGridType.getStr( ) );
- UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
pGridAttrList->add( FSNS( XML_w, XML_linePitch ),
OString::valueOf( sal_Int32( nHeight ) ).getStr( ) );
@@ -4014,7 +4015,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
rGrid.GetBaseWidth( );
- INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
pGridAttrList->add( FSNS( XML_w, XML_charSpace ),
OString::valueOf( sal_Int32( nCharSpace ) ).getStr( ) );
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 748b7060fdd9..8eee66c51ad6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -138,10 +138,10 @@ public:
/// End of the tag that encloses the run.
void EndRedline();
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
@@ -162,27 +162,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -190,7 +190,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -202,7 +202,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -216,10 +216,10 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Start the font.
void StartFont( const String& rFamilyName ) const;
@@ -240,21 +240,21 @@ public:
void FontPitchType( FontPitch ePitch ) const;
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT nId );
+ virtual void StartAbstractNumbering( sal_uInt16 nId );
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering();
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -262,7 +262,7 @@ public:
sal_Int16 nListTabPos,
const String &rNumberingString );
- void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode );
+ void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
@@ -485,7 +485,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -560,7 +560,7 @@ private:
std::vector<rtl::OString> m_rMarksEnd;
/// Maps of the bookmarks ids
- std::map<rtl::OString, USHORT> m_rOpenedMarksIds;
+ std::map<rtl::OString, sal_uInt16> m_rOpenedMarksIds;
/// The current table helper
SwWriteTable *m_pTableWrt;
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index fd837264cd56..0bd0908ed9e5 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -35,7 +35,7 @@
#include <com/sun/star/i18n/ScriptType.hdl>
#include <com/sun/star/frame/XModel.hpp>
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/vmlexport.hxx>
#include <oox/export/chartexport.hxx>
@@ -67,6 +67,7 @@
using namespace sax_fastparser;
using namespace ::comphelper;
using namespace ::com::sun::star;
+using namespace ::oox;
using oox::vml::VMLExport;
@@ -87,7 +88,7 @@ MSWordSections& DocxExport::Sections() const
return *m_pSections;
}
-bool DocxExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool DocxExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// TODO FIXME is this actually true for docx? - this is ~copied from WW8
if ( nScript == i18n::ScriptType::ASIAN )
@@ -191,8 +192,8 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt )
return bRet;
}
-void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ )
+void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
// headers
if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN )
@@ -219,7 +220,7 @@ void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
#endif
}
-void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode );
}
@@ -348,7 +349,7 @@ void DocxExport::OutputPageSectionBreaks( const SwTxtNode& )
}
-void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
m_pSections->AppendSection( pPageDesc, pFmt, nLnNum );
@@ -378,7 +379,7 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
if( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if( rNd.IsCntntNode() )
nRstLnNum = const_cast< SwCntntNode* >( rNd.GetCntntNode() )->GetSwAttrSet().GetLineNumber().GetStartValue();
else
@@ -410,7 +411,7 @@ void DocxExport::OutputLinkedOLE( const OUString& )
// Nothing to implement here: WW8 only
}
-ULONG DocxExport::ReplaceCr( BYTE )
+sal_uLong DocxExport::ReplaceCr( sal_uInt8 )
{
// Completely unused for Docx export... only here for code sharing
// purpose with binary export
@@ -426,7 +427,7 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet,
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -681,7 +682,7 @@ XFastAttributeListRef DocxExport::MainXmlNamespaces( FSHelperPtr serializer )
return XFastAttributeListRef( pAttr );
}
-bool DocxExport::ignoreAttributeForStyles( USHORT nWhich ) const
+bool DocxExport::ignoreAttributeForStyles( sal_uInt16 nWhich ) const
{
if( nWhich == RES_TEXTGRID )
return true; // w:docGrid is written only to document.xml, not to styles.xml
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 411346d3c927..4838d55868c4 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -99,10 +99,10 @@ public:
/// Determines if the format is expected to support unicode.
virtual bool SupportsUnicode() const { return true; }
- virtual bool ignoreAttributeForStyles( USHORT nWhich ) const;
+ virtual bool ignoreAttributeForStyles( sal_uInt16 nWhich ) const;
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen );
@@ -118,12 +118,12 @@ public:
virtual bool DisallowInheritingOutlineNumbering( const SwFmt &rFmt );
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode );
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
@@ -137,7 +137,7 @@ public:
virtual void DoFormText(const SwInputField * pFld);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
/// Returns the relationd id
rtl::OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount );
@@ -163,7 +163,7 @@ protected:
virtual void OutputLinkedOLE( const rtl::OUString& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {}
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index ed3d29a08c72..b784e8404b8f 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -35,7 +35,7 @@
#include <pam.hxx>
#include <unotxdoc.hxx>
-#include <cppuhelper/factory.hxx>
+#include <cppuhelper/implementationentry.hxx>
using namespace ::comphelper;
using namespace ::com::sun::star;
@@ -43,8 +43,8 @@ using ::rtl::OUString;
#define S( x ) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
-DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFactory >& rMSF )
- : oox::core::XmlFilterBase( rMSF )
+DocxExportFilter::DocxExportFilter( const uno::Reference< uno::XComponentContext >& xContext )
+ : oox::core::XmlFilterBase( xContext )
{
}
@@ -115,121 +115,48 @@ uno::Sequence< OUString > SAL_CALL DocxExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new DocxExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new DocxExportFilter( xCtx );
}
-#ifdef __cplusplus
extern "C"
{
-#endif
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
-{
- sal_Bool bRet = sal_False;
-
- if( pRegistryKey )
- {
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME "/UNO/SERVICES/" ))) );
- xNewKey1->createKey( DocxExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (docx)!" );
- }
-
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" )) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" );
- }
-
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" )) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
+::cppu::ImplementationEntry entries [] =
{
- OSL_TRACE("%s, pImplName is '%s'", OSL_THIS_FUNC, pImplName);
- uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
-
- if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
{
- const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME)) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- DocxExport_getImplementationName(),
- DocxExport_createInstance,
- DocxExport_getSupportedServiceNames() ) );
- } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) {
- const OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT));
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- RtfExport_getImplementationName(),
- RtfExport_createInstance,
- RtfExport_getSupportedServiceNames() ) );
- } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) {
- const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT )) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- RtfImport_getImplementationName(),
- RtfImport_createInstance,
- RtfImport_getSupportedServiceNames() ) );
- }
-
- if ( xFactory.is() )
+ DocxExport_createInstance, DocxExport_getImplementationName,
+ DocxExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
{
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
+ RtfExport_createInstance, RtfExport_getImplementationName,
+ RtfExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ {
+ RtfImport_createInstance, RtfImport_getImplementationName,
+ RtfImport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, entries );
}
-#ifdef __cplusplus
-}
-#endif
+} // extern "C"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx
index 0d6432a79805..68c11242ea0b 100644
--- a/sw/source/filter/ww8/docxexportfilter.hxx
+++ b/sw/source/filter/ww8/docxexportfilter.hxx
@@ -39,7 +39,7 @@
class DocxExportFilter : public oox::core::XmlFilterBase
{
public:
- DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rMSF );
+ DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
// FIXME these should not even exist for the export-only filter!
// For now, let's just do empty implementations of those.
@@ -57,6 +57,11 @@ private:
/// Implementatio of the filter abstract method.
virtual ::rtl::OUString implGetImplementationName() const;
+
+ virtual ::oox::ole::VbaProject* implCreateVbaProject() const
+ {
+ return NULL; // FIXME: implement me !
+ }
};
#endif // _DOCXEXPORTFILTER_HXX_
diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx
index 1d715e7ff260..300f50b34da8 100644
--- a/sw/source/filter/ww8/docxfootnotes.hxx
+++ b/sw/source/filter/ww8/docxfootnotes.hxx
@@ -31,7 +31,6 @@
#include <fmtftn.hxx>
-#include <oox/core/tokens.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include <sax/fshelper.hxx>
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 9d5ace7a05a0..55de32d362b2 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -106,7 +106,7 @@ protected:
SvStream* pEscherStrm;
long mnEmuMul, mnEmuDiv;
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
void WriteBrushAttr(const SvxBrushItem &rBrush,
EscherPropertyContainer& rPropOpt);
@@ -115,19 +115,19 @@ protected:
sal_uInt32 nShapeId, const com::sun::star::awt::Rectangle* pVisArea );
void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt);
- INT32 DrawModelToEmu(INT32 nVal) const
+ sal_Int32 DrawModelToEmu(sal_Int32 nVal) const
{ return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); }
- INT32 ToFract16(INT32 nVal, UINT32 nMax) const;
+ sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const;
- virtual void SetPicId(const SdrObject &, UINT32, EscherPropertyContainer &);
+ virtual void SetPicId(const SdrObject &, sal_uInt32, EscherPropertyContainer &);
SdrLayerID GetInvisibleHellId() const;
public:
SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt);
- INT32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- INT32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
+ sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
virtual void WriteFrmExtraData(const SwFrmFmt&);
virtual void WritePictures();
virtual ~SwBasicEscherEx();
@@ -145,23 +145,23 @@ private:
WinwordAnchoring aWinwordAnchoring;
WW8_WrPlcTxtBoxes *pTxtBxs;
- UINT32 GetFlyShapeId(const SwFrmFmt& rFmt,
+ sal_uInt32 GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rPVec);
void MakeZOrderArrAndFollowIds(std::vector<DrawObj>& rSrcArr,
DrawObjPointerVector& rDstArr);
- INT32 WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+ sal_Int32 WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec);
- INT32 WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec);
- void WriteOCXControl(const SwFrmFmt& rFmt,UINT32 nShapeId);
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ sal_Int32 WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec);
+ void WriteOCXControl(const SwFrmFmt& rFmt,sal_uInt32 nShapeId);
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
- virtual UINT32 QueryTextID(
+ virtual sal_uInt32 QueryTextID(
const com::sun::star::uno::Reference<
- com::sun::star::drawing::XShape > &,UINT32);
- virtual void SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+ com::sun::star::drawing::XShape > &,sal_uInt32);
+ virtual void SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt);
public:
SwEscherEx( SvStream* pStrm, WW8Export& rWW8Wrt );
diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk
deleted file mode 100644
index 9c9455be8b41..000000000000
--- a/sw/source/filter/ww8/makefile.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ww8
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-MAKING_LIBMSWORD=TRUE
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/WW8FFData.obj \
- $(SLO)$/WW8FibData.obj \
- $(SLO)$/WW8Sttbf.obj \
- $(SLO)$/WW8TableInfo.obj \
- $(SLO)$/docxattributeoutput.obj \
- $(SLO)$/docxexport.obj \
- $(SLO)$/docxexportfilter.obj \
- $(SLO)$/fields.obj \
- $(SLO)$/rtfattributeoutput.obj \
- $(SLO)$/rtfexport.obj \
- $(SLO)$/rtfexportfilter.obj \
- $(SLO)$/rtfimportfilter.obj \
- $(SLO)$/rtfsdrexport.obj \
- $(SLO)$/styles.obj \
- $(SLO)$/tracer.obj \
- $(SLO)$/writerhelper.obj \
- $(SLO)$/writerwordglue.obj \
- $(SLO)$/wrtw8esh.obj \
- $(SLO)$/wrtw8nds.obj \
- $(SLO)$/wrtw8num.obj \
- $(SLO)$/wrtw8sty.obj \
- $(SLO)$/wrtww8.obj \
- $(SLO)$/wrtww8gr.obj \
- $(SLO)$/ww8atr.obj \
- $(SLO)$/ww8glsy.obj \
- $(SLO)$/ww8graf.obj \
- $(SLO)$/ww8graf2.obj \
- $(SLO)$/ww8par.obj \
- $(SLO)$/ww8par2.obj \
- $(SLO)$/ww8par3.obj \
- $(SLO)$/ww8par4.obj \
- $(SLO)$/ww8par5.obj \
- $(SLO)$/ww8par6.obj \
- $(SLO)$/ww8scan.obj \
- $(SLO)$/ww8toolbar.obj
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 64f5aa81f3a9..4b7c86925779 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -203,7 +204,7 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
}
static OString OutBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
- const sal_Char* pStr, USHORT nDist)
+ const sal_Char* pStr, sal_uInt16 nDist)
{
OStringBuffer aRet;
aRet.append(OutTBLBorderLine(rExport, pLine, pStr));
@@ -535,12 +536,12 @@ void RtfAttributeOutput::Redline( const SwRedlineData* pRedline )
m_aRun.append(' ');
}
-void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
+void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
{
OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
}
-void RtfAttributeOutput::ParagraphStyle( USHORT nStyle )
+void RtfAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -594,7 +595,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
// Cell margins
const SvxBoxItem& rBox = pFmt->GetBox( );
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -638,7 +639,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
rLR.GetLeft() - rLR.GetRight();
}
SwTwips nTblSz = pFmt->GetFrmSize().GetWidth();
- for( USHORT i = 0; i < pRow->GetCells().Count(); i++ )
+ for( sal_uInt16 i = 0; i < pRow->GetCells().Count(); i++ )
{
SwWriteTableCell *pCell = pRow->GetCells( )[ i ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
@@ -676,10 +677,10 @@ void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, TRUE, &pItem))
+ if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, sal_True, &pItem))
{
const SvxBoxItem& rBox = (SvxBoxItem&)*pItem;
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -723,7 +724,7 @@ void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_BACKGROUND, TRUE, &pItem ))
+ RES_BACKGROUND, sal_True, &pItem ))
{
const SvxBrushItem& rBack = (SvxBrushItem&)*pItem;
if( !rBack.GetColor().GetTransparency() )
@@ -807,7 +808,7 @@ void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
// vertical alignment
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_VERT_ORIENT, TRUE, &pItem ) )
+ RES_VERT_ORIENT, sal_True, &pItem ) )
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
case text::VertOrientation::CENTER: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALC); break;
@@ -898,8 +899,8 @@ void RtfAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize,
- (USHORT)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
+ (sal_uInt16)nTblSz, false);
}
void RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
@@ -1017,7 +1018,7 @@ void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
if ( pInner->isEndOfCell() )
EndTableCell();
@@ -1043,7 +1044,7 @@ void RtfAttributeOutput::StartStyles()
m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_STYLESHEET);
}
-void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void RtfAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '}';
@@ -1051,7 +1052,7 @@ void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
+void RtfAttributeOutput::DefaultStyle( sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1059,7 +1060,8 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
}
void RtfAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool /*bAutoUpdate*/ )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId,
+ bool /* bAutoUpdate */ )
{
OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC,
OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr());
@@ -1097,7 +1099,7 @@ void RtfAttributeOutput::EndStyle()
m_aStylesheet.append(m_rExport.sNewLine);
}
-void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, USHORT /*nStyle*/ )
+void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
/* noop */
@@ -1109,7 +1111,7 @@ void RtfAttributeOutput::EndStyleProperties( bool /*bParProp*/ )
/* noop */
}
-void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void RtfAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1132,7 +1134,7 @@ void RtfAttributeOutput::PageBreakBefore( bool bBreak )
}
}
-void RtfAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void RtfAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1175,7 +1177,7 @@ void RtfAttributeOutput::SectionFormProtection( bool bProtected )
m_aSectionBreaks.append((sal_Int32)!bProtected);
}
-void RtfAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
+void RtfAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1230,7 +1232,7 @@ void RtfAttributeOutput::SectionBiDi( bool bBiDi )
m_rExport.Strm() << (bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT);
}
-void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void RtfAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1257,7 +1259,7 @@ void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
m_aSectionBreaks.append(pStr);
}
-void RtfAttributeOutput::SectionType( BYTE nBreakCode )
+void RtfAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
OSL_TRACE("%s, nBreakCode = %d", OSL_THIS_FUNC, nBreakCode);
@@ -1279,7 +1281,7 @@ void RtfAttributeOutput::SectionType( BYTE nBreakCode )
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
}
-void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRule*/ )
+void RtfAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &/*rRule*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1291,7 +1293,7 @@ void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRu
m_rExport.OutULong(nId) << '}';
}
-void RtfAttributeOutput::StartAbstractNumbering( USHORT nId )
+void RtfAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1308,12 +1310,12 @@ void RtfAttributeOutput::EndAbstractNumbering()
m_rExport.OutULong( m_nListId ) << '}' << m_rExport.sNewLine;
}
-void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE * pNumLvlPos,
- BYTE /*nFollow*/,
+ const sal_uInt8 * pNumLvlPos,
+ sal_uInt8 /*nFollow*/,
const wwFont * pFont,
const SfxItemSet * pOutSet,
sal_Int16 nIndentAt,
@@ -1329,7 +1331,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTLEVEL;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch( nNumberingType )
{
case SVX_NUM_ROMAN_UPPER: nVal = 1; break;
@@ -1381,7 +1383,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
// write the levelnumbers
m_rExport.Strm() << "{" << OOO_STRING_SVTOOLS_RTF_LEVELNUMBERS;
- for( BYTE i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
+ for( sal_uInt8 i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
{
m_rExport.Strm() << "\\'" << m_rExport.OutHex(pNumLvlPos[ i ], 2).getStr();
}
@@ -1407,7 +1409,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, BYTE /*nMode*/ )
+void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, sal_uInt8 /*nMode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1417,7 +1419,7 @@ void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eTyp
m_aRunText.append(m_rExport.OutString(rFldCmd, m_rExport.eCurrentEncoding));
m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
if (pFld)
- m_aRunText.append(m_rExport.OutString(pFld->GetCntnt(), m_rExport.eDefaultEncoding));
+ m_aRunText.append(m_rExport.OutString(pFld->ExpandField(true), m_rExport.eDefaultEncoding));
m_aRunText.append("}}");
}
@@ -1494,8 +1496,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt( );
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
m_rExport.SaveData( nStt, nEnd );
m_rExport.mpParentFrame = &rFrame;
m_rExport.WriteText( );
@@ -1524,7 +1526,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
if ( pGrfNode )
- FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode);
+ FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode );
break;
case sw::Frame::eDrawing:
{
@@ -2196,7 +2198,7 @@ void RtfAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
- USHORT nType;
+ sal_uInt16 nType;
if( !cStart && !cEnd )
nType = 0;
else if( '{' == cStart || '}' == cEnd )
@@ -2264,7 +2266,7 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL )
m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() ))
{
- USHORT nStyle = m_rExport.GetId( *pFmt );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2276,7 +2278,7 @@ void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- USHORT nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_CS);
m_aStyles.append((sal_Int32)nStyle);
OString* pString = m_rExport.GetStyle(nStyle);
@@ -2384,7 +2386,7 @@ void RtfAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
OSL_TRACE("%s", OSL_THIS_FUNC);
long nOffset = ((SvxLRSpaceItem&)m_rExport.GetItem( RES_LR_SPACE )).GetTxtLeft();
- for( USHORT n = 0; n < rTabStop.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTabStop.Count(); n++ )
{
const SvxTabStop & rTS = rTabStop[ n ];
if( SVX_TAB_ADJUST_DEFAULT != rTS.GetAdjustment() )
@@ -2486,7 +2488,7 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetIndentAt() );
aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
- USHORT nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2713,10 +2715,10 @@ void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
if ( m_rExport.bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax )
{
SwSurround eSurround = rSurround.GetSurround();
- BOOL bGold = SURROUND_IDEAL == eSurround;
+ sal_Bool bGold = SURROUND_IDEAL == eSurround;
if( bGold )
eSurround = SURROUND_PARALLEL;
- RTFSurround aMC( bGold, static_cast< BYTE >(eSurround) );
+ RTFSurround aMC( bGold, static_cast< sal_uInt8 >(eSurround) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYMAINCNT);
m_aRunText.append( (sal_Int32) aMC.GetValue() );
}
@@ -2754,7 +2756,7 @@ void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert
}
else if ( !m_rExport.bRTFFlySyntax )
{
- RTFVertOrient aVO( static_cast< USHORT >(rFlyVert.GetVertOrient()), static_cast< USHORT >(rFlyVert.GetRelationOrient()) );
+ RTFVertOrient aVO( static_cast< sal_uInt16 >(rFlyVert.GetVertOrient()), static_cast< sal_uInt16 >(rFlyVert.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYVERT);
m_aRunText.append((sal_Int32)aVO.GetValue());
}
@@ -2791,8 +2793,8 @@ void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
m_aRunText.append(pS);
} else if ( !m_rExport.bRTFFlySyntax )
{
- RTFHoriOrient aHO( static_cast< USHORT >(rFlyHori.GetHoriOrient()),
- static_cast< USHORT >(rFlyHori.GetRelationOrient()) );
+ RTFHoriOrient aHO( static_cast< sal_uInt16 >(rFlyHori.GetHoriOrient()),
+ static_cast< sal_uInt16 >(rFlyHori.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYHORZ);
m_aRunText.append((sal_Int32)aHO.GetValue());
}
@@ -2804,7 +2806,7 @@ void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( !m_rExport.bRTFFlySyntax )
{
- USHORT nId = static_cast< USHORT >(rAnchor.GetAnchorId());
+ sal_uInt16 nId = static_cast< sal_uInt16 >(rAnchor.GetAnchorId());
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYANCHOR);
m_aRunText.append((sal_Int32)nId);
switch( nId )
@@ -2836,12 +2838,12 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- static USHORT const aBorders[] = {
+ static sal_uInt16 aBorders[] = {
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
static const sal_Char* aBorderNames[] = {
OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR };
- USHORT nDist = rBox.GetDistance();
+ sal_uInt16 nDist = rBox.GetDistance();
if ( m_rExport.bRTFFlySyntax )
return;
@@ -2858,7 +2860,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aSectionBreaks.append(OutBorderLine( m_rExport, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist ));
else
{
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for(int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms)
{
@@ -2870,7 +2872,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for( int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms )
{
@@ -2888,7 +2890,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aStyles.append(m_aSectionBreaks.makeStringAndClear());
}
-void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void RtfAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -2898,12 +2900,12 @@ void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol,
if( bEven )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLSX;
- m_rExport.OutLong( rCol.GetGutterWidth( TRUE ) );
+ m_rExport.OutLong( rCol.GetGutterWidth( sal_True ) );
}
else
{
const SwColumns & rColumns = rCol.GetColumns( );
- for( USHORT n = 0; n < nCols; )
+ for( sal_uInt16 n = 0; n < nCols; )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLNO;
m_rExport.OutLong( n+1 );
@@ -3024,7 +3026,7 @@ RtfAttributeOutput::~RtfAttributeOutput()
OSL_TRACE("%s", OSL_THIS_FUNC);
}
-RtfExport& RtfAttributeOutput::GetExport()
+MSWordExportBase& RtfAttributeOutput::GetExport()
{
return m_rExport;
}
@@ -3104,7 +3106,7 @@ void RtfAttributeOutput::FontPitchType( FontPitch ePitch ) const
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FPRQ;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch (ePitch)
{
case PITCH_FIXED:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index adb0cbc4db4d..fcf43b765543 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,10 +111,10 @@ public:
/// The common attribute that can be among the run properties.
virtual void Redline( const SwRedlineData* pRedline );
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
@@ -134,27 +135,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -162,7 +163,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -174,7 +175,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -188,27 +189,27 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT nId );
+ virtual void StartAbstractNumbering( sal_uInt16 nId );
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering();
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -216,7 +217,7 @@ public:
sal_Int16 nListTabPos,
const String &rNumberingString );
- void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode );
+ void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
void WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr );
@@ -390,7 +391,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -444,11 +445,11 @@ private:
* Current style name and its ID.
*/
String m_rStyleName;
- USHORT m_nStyleId;
+ sal_uInt16 m_nStyleId;
/*
* Current list ID.
*/
- USHORT m_nListId;
+ sal_uInt16 m_nListId;
/*
* This is needed because the call order is: run text, run properties, paragraph properties.
* What we need is the opposite.
@@ -542,8 +543,7 @@ public:
virtual ~RtfAttributeOutput();
/// Return the right export class.
- virtual RtfExport& GetExport();
- const RtfExport& GetExport() const { return const_cast< RtfAttributeOutput* >( this )->GetExport(); }
+ virtual MSWordExportBase& GetExport();
rtl::OStringBuffer m_aTabStop;
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index cc2fd5cc5d30..17dc1c03bb2f 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -119,7 +120,7 @@ RtfSdrExport& RtfExport::SdrExporter() const
return *m_pSdrExport;
}
-bool RtfExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool RtfExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// FIXME is this actually true for rtf? - this is copied from DOCX
if ( nScript == i18n::ScriptType::ASIAN )
@@ -201,15 +202,15 @@ void RtfExport::WriteChar( sal_Unicode )
/* WriteChar() has nothing to do for rtf. */
}
-static bool IsExportNumRule( const SwNumRule& rRule, BYTE* pEnd = 0 )
+static bool IsExportNumRule( const SwNumRule& rRule, sal_uInt8* pEnd = 0 )
{
- BYTE nEnd = MAXLEVEL;
+ sal_uInt8 nEnd = MAXLEVEL;
while( nEnd-- && !rRule.GetNumFmt( nEnd ))
;
++nEnd;
const SwNumFmt* pNFmt;
- BYTE nLvl;
+ sal_uInt8 nLvl;
for( nLvl = 0; nLvl < nEnd; ++nLvl )
if( SVX_NUM_NUMBER_NONE != ( pNFmt = &rRule.Get( nLvl ))
@@ -226,7 +227,7 @@ void RtfExport::BuildNumbering()
{
const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl();
- for( USHORT n = rListTbl.Count()+1; n; )
+ for( sal_uInt16 n = rListTbl.Count()+1; n; )
{
SwNumRule* pRule;
--n;
@@ -275,7 +276,7 @@ void RtfExport::WriteRevTab()
String sUnknown(RTL_CONSTASCII_USTRINGPARAM("Unknown"));
GetRedline(sUnknown);
- for( USHORT i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
{
const SwRedline* pRedl = pDoc->GetRedlineTbl()[ i ];
@@ -284,7 +285,7 @@ void RtfExport::WriteRevTab()
// Now write the table
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' ';
- for(USHORT i = 0; i < m_aRedlineTbl.size(); ++i)
+ for(sal_uInt16 i = 0; i < m_aRedlineTbl.size(); ++i)
{
const String* pAuthor = GetRedline(i);
Strm() << '{';
@@ -295,8 +296,8 @@ void RtfExport::WriteRevTab()
Strm() << '}' << sNewLine;
}
-void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ )
+void RtfExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -321,7 +322,7 @@ void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
WriteHeaderFooter( rFirstPageFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERF );
}
-void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -376,7 +377,7 @@ void RtfExport::DoFormText(const SwInputField* pFld )
m_pAttrOutput->RunText().append( OutString( sResult, eDefaultEncoding )).append( "}}" );
}
-ULONG RtfExport::ReplaceCr( BYTE )
+sal_uLong RtfExport::ReplaceCr( sal_uInt8 )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -451,14 +452,14 @@ void RtfExport::WritePageDescTable()
OSL_TRACE("%s", OSL_THIS_FUNC);
// Write page descriptions (page styles)
- USHORT nSize = pDoc->GetPageDescCnt();
+ sal_uInt16 nSize = pDoc->GetPageDescCnt();
if( !nSize )
return;
Strm() << sNewLine; // a separator
- bOutPageDescs = TRUE;
+ bOutPageDescs = sal_True;
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCTBL;
- for( USHORT n = 0; n < nSize; ++n )
+ for( sal_uInt16 n = 0; n < nSize; ++n )
{
const SwPageDesc& rPageDesc =
const_cast<const SwDoc*>(pDoc)->GetPageDesc( n );
@@ -467,10 +468,10 @@ void RtfExport::WritePageDescTable()
OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE;
OutULong( rPageDesc.ReadUseOn() );
- OutPageDescription( rPageDesc, FALSE, FALSE );
+ OutPageDescription( rPageDesc, sal_False, sal_False );
// search for the next page description
- USHORT i = nSize;
+ sal_uInt16 i = nSize;
while( i )
if( rPageDesc.GetFollow() ==
&const_cast<const SwDoc *>(pDoc)->GetPageDesc( --i ) )
@@ -480,7 +481,7 @@ void RtfExport::WritePageDescTable()
Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding) << ";}";
}
Strm() << '}' << sNewLine;
- bOutPageDescs = FALSE;
+ bOutPageDescs = sal_False;
// reset table infos, otherwise the depth of the cells will be incorrect,
// in case the page style (header or footer) had tables
@@ -530,10 +531,10 @@ void RtfExport::ExportDocument_Impl()
// protected section in the document.
{
const SfxItemPool& rPool = pDoc->GetAttrPool();
- USHORT nMaxItem = rPool.GetItemCount(RES_PROTECT);
- for( USHORT n = 0; n < nMaxItem; ++n )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2(RES_PROTECT);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem(RES_PROTECT, n);
+ const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem2(RES_PROTECT, n);
if (pProtect && pProtect->IsCntntProtected())
{
Strm() << OOO_STRING_SVTOOLS_RTF_FORMPROT;
@@ -566,7 +567,7 @@ void RtfExport::ExportDocument_Impl()
if( pSet )
{
- USHORT nPosInDoc;
+ sal_uInt16 nPosInDoc;
pSttPgDsc = (SwFmtPageDesc*)&pSet->Get( RES_PAGEDESC );
if( !pSttPgDsc->GetPageDesc() )
pSttPgDsc = 0;
@@ -622,7 +623,7 @@ void RtfExport::ExportDocument_Impl()
// All sections are unlocked by default
Strm() << OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED;
OutLong(1);
- OutPageDescription( rPageDesc, FALSE, TRUE ); // Changed bCheckForFirstPage to TRUE so headers
+ OutPageDescription( rPageDesc, sal_False, sal_True ); // Changed bCheckForFirstPage to sal_True so headers
// following title page are correctly added - i13107
if( pSttPgDsc )
{
@@ -707,7 +708,7 @@ void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet,
{
OSL_TRACE("%s", OSL_THIS_FUNC);
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -767,7 +768,7 @@ void RtfExport::OutputTextNode( const SwTxtNode& rNode )
MSWordExportBase::OutputTextNode( rNode );
}
-void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -814,7 +815,7 @@ SvStream& RtfExport::Strm()
return m_pWriter->Strm();
}
-SvStream& RtfExport::OutULong( ULONG nVal )
+SvStream& RtfExport::OutULong( sal_uLong nVal )
{
return m_pWriter->OutULong( Strm(), nVal );
}
@@ -834,7 +835,7 @@ void RtfExport::OutUnicode(const sal_Char *pToken, const String &rContent)
}
}
-OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
+OString RtfExport::OutHex(sal_uLong nHex, sal_uInt8 nLen)
{
sal_Char aNToABuf[] = "0000000000000000";
@@ -844,7 +845,7 @@ OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
// Set pointer to the buffer end
sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -963,20 +964,20 @@ void RtfExport::OutDateTime(const sal_Char* pStr, const util::DateTime& rDT )
OutULong( rDT.Minutes ) << '}';
}
-USHORT RtfExport::GetColor( const Color& rColor ) const
+sal_uInt16 RtfExport::GetColor( const Color& rColor ) const
{
for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rColor) {
OSL_TRACE("%s returning %d (%d,%d,%d)", OSL_THIS_FUNC, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
return (*it).first;
}
- OSL_ENSURE( FALSE, "No such Color in m_aColTbl!" );
+ OSL_ENSURE( sal_False, "No such Color in m_aColTbl!" );
return 0;
}
void RtfExport::InsColor( const Color& rCol )
{
- USHORT n;
+ sal_uInt16 n;
bool bContainsAuto = false;
for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rCol)
@@ -997,7 +998,7 @@ void RtfExport::InsColor( const Color& rCol )
else if (!bContainsAuto)
n++;
}
- m_aColTbl.insert(std::pair<USHORT,Color>( n, rCol ));
+ m_aColTbl.insert(std::pair<sal_uInt16,Color>( n, rCol ));
}
void RtfExport::InsColorLine( const SvxBoxItem& rBox )
@@ -1017,7 +1018,7 @@ void RtfExport::OutColorTable()
{
// Build the table from rPool since the colors provided to
// RtfAttributeOutput callbacks are too late.
- USHORT n, nMaxItem;
+ sal_uInt32 nMaxItem;
const SfxItemPool& rPool = pDoc->GetAttrPool();
// char color
@@ -1028,30 +1029,30 @@ void RtfExport::OutColorTable()
if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem(
RES_CHRATR_COLOR ) ))
InsColor( pCol->GetValue() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR);
- for( n = 0; n < nMaxItem; ++n )
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem(
+ if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2(
RES_CHRATR_COLOR, n ) ) )
InsColor( pCol->GetValue() );
}
const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE );
InsColor( pUnder->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE);
- for( n = 0; n < nMaxItem;n++)
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) )
+ if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) )
InsColor( pUnder->GetColor() );
}
const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE );
InsColor( pOver->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE);
- for( n = 0; n < nMaxItem;n++)
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) )
+ if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) )
InsColor( pOver->GetColor() );
}
@@ -1059,10 +1060,10 @@ void RtfExport::OutColorTable()
}
// background color
- static const USHORT aBrushIds[] = {
+ static const sal_uInt16 aBrushIds[] = {
RES_BACKGROUND, RES_CHRATR_BACKGROUND, 0 };
- for( const USHORT* pIds = aBrushIds; *pIds; ++pIds )
+ for( const sal_uInt16* pIds = aBrushIds; *pIds; ++pIds )
{
const SvxBrushItem* pBkgrd = (const SvxBrushItem*)GetDfltAttr( *pIds );
InsColor( pBkgrd->GetColor() );
@@ -1071,14 +1072,16 @@ void RtfExport::OutColorTable()
{
InsColor( pBkgrd->GetColor() );
}
- nMaxItem = rPool.GetItemCount( *pIds );
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem(
+ nMaxItem = rPool.GetItemCount2( *pIds );
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2(
*pIds , n ) ))
{
InsColor( pBkgrd->GetColor() );
}
}
+ }
// shadow color
{
@@ -1090,14 +1093,16 @@ void RtfExport::OutColorTable()
{
InsColor( pShadow->GetColor() );
}
- nMaxItem = rPool.GetItemCount(RES_SHADOW);
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem(
+ nMaxItem = rPool.GetItemCount2(RES_SHADOW);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2(
RES_SHADOW, n ) ) )
{
InsColor( pShadow->GetColor() );
}
}
+ }
// frame border color
{
@@ -1105,13 +1110,15 @@ void RtfExport::OutColorTable()
if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem(
RES_BOX ) ))
InsColorLine( *pBox );
- nMaxItem = rPool.GetItemCount(RES_BOX);
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) ))
+ nMaxItem = rPool.GetItemCount2(RES_BOX);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) ))
InsColorLine( *pBox );
}
+ }
- for( n = 0; n < m_aColTbl.size(); n++ )
+ for (size_t n = 0; n < m_aColTbl.size(); ++n)
{
const Color& rCol = m_aColTbl[ n ];
if( n || COL_AUTO != rCol.GetColor() )
@@ -1125,41 +1132,41 @@ void RtfExport::OutColorTable()
}
}
-void RtfExport::InsStyle( USHORT nId, const OString& rStyle )
+void RtfExport::InsStyle( sal_uInt16 nId, const OString& rStyle )
{
- m_aStyTbl.insert(std::pair<USHORT,OString>(nId, rStyle) );
+ m_aStyTbl.insert(std::pair<sal_uInt16,OString>(nId, rStyle) );
}
-OString* RtfExport::GetStyle( USHORT nId )
+OString* RtfExport::GetStyle( sal_uInt16 nId )
{
- std::map<USHORT,OString>::iterator i = m_aStyTbl.find(nId);
+ std::map<sal_uInt16,OString>::iterator i = m_aStyTbl.find(nId);
if (i != m_aStyTbl.end())
return &i->second;
return NULL;
}
-USHORT RtfExport::GetRedline( const String& rAuthor )
+sal_uInt16 RtfExport::GetRedline( const String& rAuthor )
{
- std::map<String,USHORT>::iterator i = m_aRedlineTbl.find(rAuthor);
+ std::map<String,sal_uInt16>::iterator i = m_aRedlineTbl.find(rAuthor);
if (i != m_aRedlineTbl.end())
return i->second;
else
{
int nId = m_aRedlineTbl.size();
- m_aRedlineTbl.insert(std::pair<String,USHORT>(rAuthor,nId));
+ m_aRedlineTbl.insert(std::pair<String,sal_uInt16>(rAuthor,nId));
return nId;
}
}
-const String* RtfExport::GetRedline( USHORT nId )
+const String* RtfExport::GetRedline( sal_uInt16 nId )
{
- for(std::map<String,USHORT>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
+ for(std::map<String,sal_uInt16>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
if ((*aIter).second == nId)
return &(*aIter).first;
return NULL;
}
-void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage )
+void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage )
{
OSL_TRACE("%s start", OSL_THIS_FUNC);
const SwPageDesc *pSave = pAktPageDesc;
@@ -1187,10 +1194,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
// normal header / footer (without a style)
const SfxPoolItem* pItem;
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, true);
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, false);
@@ -1200,10 +1207,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
pAktPageDesc = &rPgDsc;
Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG;
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_HEADER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, true);
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_FOOTER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, false);
}
@@ -1263,7 +1270,7 @@ class SwRTFWriter : public Writer
public:
SwRTFWriter( const String& rFilterName, const String& rBaseURL );
virtual ~SwRTFWriter();
- virtual ULONG WriteStream();
+ virtual sal_uLong WriteStream();
};
SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
@@ -1276,7 +1283,7 @@ SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
SwRTFWriter::~SwRTFWriter()
{}
-ULONG SwRTFWriter::WriteStream()
+sal_uLong SwRTFWriter::WriteStream()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this, bOutOutlineOnly );
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 5b14c1d3f436..60b6c347ae0c 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,9 +41,9 @@
class RtfAttributeOutput;
class RtfExportFilter;
class RtfSdrExport;
-typedef std::map<USHORT,Color> RtfColorTbl;
-typedef std::map<USHORT,rtl::OString> RtfStyleTbl;
-typedef std::map<String,USHORT> RtfRedlineTbl;
+typedef std::map<sal_uInt16,Color> RtfColorTbl;
+typedef std::map<sal_uInt16,rtl::OString> RtfStyleTbl;
+typedef std::map<String,sal_uInt16> RtfRedlineTbl;
class SwNode;
class SwEndNode;
class SwTableNode;
@@ -86,7 +87,7 @@ public:
virtual bool SupportsUnicode() const { return true; }
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen );
@@ -102,12 +103,12 @@ public:
virtual void WriteRevTab();
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode );
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
@@ -121,7 +122,7 @@ public:
virtual void DoFormText(const SwInputField * pFld);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
protected:
/// Format-dependant part of the actual export.
@@ -149,7 +150,7 @@ protected:
virtual void OutputLinkedOLE(const rtl::OUString&);
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
public:
/// Pass the pDocument, pCurrentPam and pOriginalPam to the base class.
@@ -171,26 +172,26 @@ public:
/// This is used by OutputFlyFrame_Impl() to control the written syntax
bool bRTFFlySyntax;
- BOOL m_bOutStyleTab : 1;
+ sal_Bool m_bOutStyleTab : 1;
SvStream& Strm();
- SvStream& OutULong( ULONG nVal );
+ SvStream& OutULong( sal_uLong nVal );
SvStream& OutLong( long nVal );
void OutUnicode(const sal_Char *pToken, const String &rContent);
void OutDateTime(const sal_Char* pStr, const util::DateTime& rDT );
static rtl::OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc);
static rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc);
- static rtl::OString OutHex(ULONG nHex, BYTE nLen);
- void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage );
+ static rtl::OString OutHex(sal_uLong nHex, sal_uInt8 nLen);
+ void OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage );
- USHORT GetColor( const Color& rColor ) const;
+ sal_uInt16 GetColor( const Color& rColor ) const;
void InsColor( const Color& rCol );
void InsColorLine( const SvxBoxItem& rBox );
void OutColorTable();
- USHORT GetRedline( const String& rAuthor );
- const String* GetRedline( USHORT nId );
+ sal_uInt16 GetRedline( const String& rAuthor );
+ const String* GetRedline( sal_uInt16 nId );
- void InsStyle( USHORT nId, const rtl::OString& rStyle );
- rtl::OString* GetStyle( USHORT nId );
+ void InsStyle( sal_uInt16 nId, const rtl::OString& rStyle );
+ rtl::OString* GetStyle( sal_uInt16 nId );
private:
/// No copying.
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 891542908425..0aedd4add7f8 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,8 +44,8 @@ using namespace ::comphelper;
using namespace ::com::sun::star;
using ::rtl::OUString;
-RtfExportFilter::RtfExportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) :
+ m_xCtx( xCtx )
{
}
@@ -129,9 +130,9 @@ uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfExportFilter( xCtx );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index 2a8705e399c1..de7c94cf80ac 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +41,7 @@
class RtfWriter : public Writer
{
protected:
- ULONG WriteStream() { return 0; }
+ sal_uLong WriteStream() { return 0; }
};
/// The physical access to the RTF document (for writing).
@@ -51,11 +52,11 @@ class RtfExportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc;
SvStream* m_pStream;
public:
- RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfExportFilter();
// XFilter
@@ -76,7 +77,7 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfExport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport"
diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx
index 52b4ae845710..980c96fd8974 100644
--- a/sw/source/filter/ww8/rtfimportfilter.cxx
+++ b/sw/source/filter/ww8/rtfimportfilter.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,6 +41,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
using namespace ::comphelper;
@@ -47,8 +49,8 @@ using namespace ::com::sun::star;
using ::rtl::OUString;
using rtl::OUStringToOString;
-RtfImportFilter::RtfImportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfImportFilter::RtfImportFilter( const uno::Reference< uno::XComponentContext > &xCtx ) :
+ m_xCtx( xCtx )
{
}
@@ -129,9 +131,9 @@ uno::Sequence< OUString > SAL_CALL RtfImport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfImportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfImportFilter( xCtx );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfimportfilter.hxx b/sw/source/filter/ww8/rtfimportfilter.hxx
index 60532895f9ef..9782dae31300 100644
--- a/sw/source/filter/ww8/rtfimportfilter.hxx
+++ b/sw/source/filter/ww8/rtfimportfilter.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,10 +45,10 @@ class RtfImportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xDstDoc;
public:
- RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfImportFilter();
// XFilter
@@ -66,7 +67,7 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfImport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFIMPORT "com.sun.star.comp.Writer.RtfImport"
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index f18ebfd3c25b..99a166196d09 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -89,7 +90,7 @@ RtfSdrExport::~RtfSdrExport()
delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = NULL;
}
-void RtfSdrExport::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
+void RtfSdrExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -122,7 +123,7 @@ void RtfSdrExport::CloseContainer()
EscherEx::CloseContainer();
}
-UINT32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
+sal_uInt32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -136,7 +137,7 @@ void RtfSdrExport::LeaveGroup()
/* noop */
}
-void RtfSdrExport::AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 /*nShapeId*/ )
+void RtfSdrExport::AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 /*nShapeId*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -521,10 +522,10 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj)
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX );
- USHORT nPara = rEditObj.GetParagraphCount();
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHPTXT).append(' ');
- for (USHORT n = 0; n < nPara; ++n)
+ for (sal_uInt16 n = 0; n < nPara; ++n)
{
if( n )
aAttrIter.NextPara( n );
@@ -578,7 +579,7 @@ void RtfSdrExport::EndShape( sal_Int32 nShapeElement )
}
}
-UINT32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
+sal_uInt32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
{
m_pSdrObject = &rObj;
return EscherEx::AddSdrObject(rObj);
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index b25f5196de4c..f461357e5c61 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,7 +69,7 @@ public:
/// Export the sdr object as Sdr.
///
/// Call this when you need to export the object as Sdr in RTF.
- UINT32 AddSdrObject( const SdrObject& rObj );
+ sal_uInt32 AddSdrObject( const SdrObject& rObj );
protected:
/// Add an attribute to the generated shape element.
@@ -93,14 +94,14 @@ protected:
private:
- virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 );
+ virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 );
virtual void CloseContainer();
using EscherEx::EnterGroup;
- virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
+ virtual sal_uInt32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
virtual void LeaveGroup();
- virtual void AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 nShapeId = 0 );
+ virtual void AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0 );
private:
/// Add starting and ending point of a line to the m_pShapeAttrList.
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 97f6316c9be4..cb1471fa88ab 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -117,7 +117,7 @@ namespace
};
// <--
- bool IsValidSlotWhich(USHORT nSlotId, USHORT nWhichId)
+ bool IsValidSlotWhich(sal_uInt16 nSlotId, sal_uInt16 nWhichId)
{
return (nSlotId != 0 && nWhichId != 0 && nSlotId != nWhichId);
}
@@ -132,8 +132,8 @@ namespace
sw::Frames SwPosFlyFrmsToFrames(const SwPosFlyFrms &rFlys)
{
sw::Frames aRet;
- USHORT nEnd = rFlys.Count();
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = rFlys.Count();
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
{
const SwFrmFmt &rEntry = rFlys[nI]->GetFmt();
if (const SwPosition* pAnchor = rEntry.GetAnchor().GetCntntAnchor())
@@ -153,9 +153,9 @@ namespace
class anchoredto: public std::unary_function<const sw::Frame&, bool>
{
private:
- ULONG mnNode;
+ sal_uLong mnNode;
public:
- anchoredto(ULONG nNode) : mnNode(nNode) {}
+ anchoredto(sal_uLong nNode) : mnNode(nNode) {}
bool operator()(const sw::Frame &rFrame) const
{
return (mnNode == rFrame.GetPosition().nNode.GetNode().GetIndex());
@@ -252,10 +252,10 @@ namespace sw
namespace hack
{
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich)
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich)
{
- USHORT nSlotId = rSrcPool.GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rSrcPool.GetSlotId(nWhich);
if (IsValidSlotWhich(nSlotId, nWhich))
nWhich = rDestPool.GetWhich(nSlotId);
else
@@ -263,8 +263,8 @@ namespace sw
return nWhich;
}
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich)
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich)
{
if (RES_WHICHHINT_END < *(rSet.GetRanges()))
{
@@ -404,8 +404,8 @@ namespace sw
{
if( bExportParentItemSet )
{
- USHORT nTotal = rSet.TotalCount();
- for( USHORT nItem =0; nItem < nTotal; ++nItem )
+ sal_uInt16 nTotal = rSet.TotalCount();
+ for( sal_uInt16 nItem =0; nItem < nTotal; ++nItem )
{
const SfxPoolItem* pItem = 0;
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) )
@@ -459,7 +459,7 @@ namespace sw
mysizet nCount = pColls ? pColls->Count() : 0;
aStyles.reserve(nCount);
for (mysizet nI = 0; nI < nCount; ++nI)
- aStyles.push_back((*pColls)[ static_cast< USHORT >(nI) ]);
+ aStyles.push_back((*pColls)[ static_cast< sal_uInt16 >(nI) ]);
return aStyles;
}
@@ -507,7 +507,7 @@ namespace sw
SwPosFlyFrms aFlys;
rDoc.GetAllFlyFmts(aFlys, pPaM, true);
sw::Frames aRet(SwPosFlyFrmsToFrames(aFlys));
- for (USHORT i = aFlys.Count(); i > 0;)
+ for (sal_uInt16 i = aFlys.Count(); i > 0;)
delete aFlys[--i];
return aRet;
}
@@ -528,7 +528,7 @@ namespace sw
0 != (pRule = rTxtNode.GetNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
OSL_ENSURE(rTxtNode.GetDoc(), "No document for node?, suspicious");
@@ -540,7 +540,7 @@ namespace sw
0 != (pRule = rTxtNode.GetDoc()->GetOutlineNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
return 0;
@@ -764,16 +764,16 @@ namespace sw
std::for_each(maStack.begin(), maStack.end(), SetInDocAndDelete(mrDoc));
}
- USHORT WrtRedlineAuthor::AddName( const String& rNm )
+ sal_uInt16 WrtRedlineAuthor::AddName( const String& rNm )
{
- USHORT nRet;
+ sal_uInt16 nRet;
typedef std::vector<String>::iterator myiter;
myiter aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm);
if (aIter != maAuthors.end())
- nRet = static_cast< USHORT >(aIter - maAuthors.begin());
+ nRet = static_cast< sal_uInt16 >(aIter - maAuthors.begin());
else
{
- nRet = static_cast< USHORT >(maAuthors.size());
+ nRet = static_cast< sal_uInt16 >(maAuthors.size());
maAuthors.push_back(rNm);
}
return nRet;
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index efbc231ffb3f..2f16b06f770f 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -819,8 +819,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich);
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich);
/** Map a SwDoc WhichId to the equivalent Id for a given SfxItemSet
@@ -849,8 +849,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich);
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich);
/** Make inserting an OLE object into a Writer document easy
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index bdd3b705c663..878286ccbb23 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -757,26 +757,26 @@ namespace sw
DateTime aDateTime(Date( 0 ), Time( 0 ));
if( lDTTM )
{
- USHORT lMin = (USHORT)(lDTTM & 0x0000003F);
+ sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
lDTTM >>= 6;
- USHORT lHour= (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lHour= (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lDay = (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lDay = (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lMon = (USHORT)(lDTTM & 0x0000000F);
+ sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
lDTTM >>= 4;
- USHORT lYear= (USHORT)(lDTTM & 0x000001FF) + 1900;
+ sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900;
aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin));
}
return aDateTime;
}
- ULONG MSDateTimeFormatToSwFormat(String& rParams,
- SvNumberFormatter *pFormatter, USHORT &rLang, bool bHijri,
- USHORT nDocLang)
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams,
+ SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri,
+ sal_uInt16 nDocLang)
{
// tell the Formatter about the new entry
- UINT16 nCheckPos = 0;
+ sal_uInt16 nCheckPos = 0;
short nType = NUMBERFORMAT_DEFINED;
sal_uInt32 nKey = 0;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index e3cd3c0424c2..336ef5cee40d 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -202,19 +202,19 @@ void WW8Export::DoComboBox(const rtl::OUString &rName,
OutputField(0, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(), sizeof(aArr1), aArr1);
@@ -249,18 +249,18 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
OutputField(0, ww::eFORMCHECKBOX, FieldString(ww::eFORMCHECKBOX),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -309,18 +309,18 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, FieldString(ww::eFORMTEXT),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x02, 0x08, 0x81, // sprmCFFldVanish
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01 // sprmCFSpec
};
- BYTE* pDataAdr = aArr1 + 5;
+ sal_uInt8* pDataAdr = aArr1 + 5;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -336,9 +336,10 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END);
- SwWW8Writer::WriteString16(Strm(), pFld->Expand(), false);
+ String const fieldStr( pFld->ExpandField(true) );
+ SwWW8Writer::WriteString16(Strm(), fieldStr, false);
- static BYTE aArr2[] = {
+ static sal_uInt8 aArr2[] = {
0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation
0x55, 0x08, 0x01, // sprmCFSpec
0x75, 0x08, 0x01 // ???
@@ -542,7 +543,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
}
// <--
- INT32 nThick = aIter->mnThick;
+ sal_Int32 nThick = aIter->mnThick;
//If we are being exported as an inline hack, set
//corner to 0 and forget about border thickness for positioning
@@ -570,7 +571,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
SwWW8Writer::WriteLong(*rWrt.pTableStrm,aRect.Bottom() - nThick);
//fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock
- USHORT nFlags=0;
+ sal_uInt16 nFlags=0;
//If nFlags isn't 0x14 its overridden by the escher properties
if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId())
nFlags = 0x0000;
@@ -578,7 +579,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
nFlags = 0x0014; // x-rel to text, y-rel to text
const SwFmtSurround& rSurr = rFmt.GetSurround();
- USHORT nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
+ sal_uInt16 nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
SwSurround eSurround = rSurr.GetSurround();
/*
@@ -699,7 +700,7 @@ bool PlcDrawObj::Append( WW8Export& rWrt, WW8_CP nCp, const sw::Frame& rFmt,
return bRet;
}
-void DrawObj::SetShapeDetails(UINT32 nId, INT32 nThick)
+void DrawObj::SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
{
mnShapeId = nId;
mnThick = nThick;
@@ -725,7 +726,7 @@ bool WW8_WrPlcTxtBoxes::WriteTxt( WW8Export& rWrt )
return bRet;
}
-void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, UINT32 nShapeId )
+void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, sal_uInt32 nShapeId )
{
void* p = (void*)&rObj;
aCntnt.Insert( p, aCntnt.Count() );
@@ -739,9 +740,9 @@ const SvULongs* WW8_WrPlcTxtBoxes::GetShapeIdArr() const
/* */
-UINT32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
+sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
{
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
const SdrObject* pObj = rFmt.FindRealSdrObject();
if( pObj )
nOrdNum = pObj->GetOrdNum();
@@ -805,7 +806,7 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt,
}
MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
- const EditTextObject& rEditObj, BYTE nTyp )
+ const EditTextObject& rEditObj, sal_uInt8 nTyp )
: MSWordAttrIter( rWr ), pEditObj(&rEditObj), pEditPool(0),
aTxtAtrArr( 0, 4 ), aChrTxtAtrArr( 0, 4 ), aChrSetArr( 0, 4 ),
mnTyp(nTyp)
@@ -813,7 +814,7 @@ MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
NextPara( 0 );
}
-void MSWord_SdrAttrIter::NextPara( USHORT nPar )
+void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
{
nPara = nPar;
// Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen
@@ -888,7 +889,7 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart)
if( p )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( bStart )
{
nPos = aChrSetArr.Count();
@@ -909,7 +910,7 @@ void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt)
const SvxFieldData *pFld = rField.GetField();
if (pFld && pFld->ISA(SvxURLField))
{
- BYTE nOldTxtTyp = m_rExport.nTxtTyp;
+ sal_uInt8 nOldTxtTyp = m_rExport.nTxtTyp;
m_rExport.nTxtTyp = mnTyp;
const SvxURLField *pURL = (const SvxURLField *)pFld;
m_rExport.AttrOutput().StartURL( pURL->GetURL(), pURL->GetTargetFrame() );
@@ -935,7 +936,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
const SfxItemPool& rDstPool = m_rExport.pDoc->GetAttrPool();
nTmpSwPos = nSwPos;
- USHORT i, nWhich, nSlotId;
+ sal_uInt16 i, nWhich, nSlotId;
for( i = 0; i < aTxtAtrArr.Count(); i++ )
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
@@ -981,7 +982,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
if (nSwPos >= rHt.nStart && nSwPos < rHt.nEnd)
@@ -1004,14 +1005,14 @@ bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
+const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = 0;
nWhich = sw::hack::TransformWhichBetweenPools(*pEditPool,
m_rExport.pDoc->GetAttrPool(), nWhich);
if (nWhich)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[i];
if (
@@ -1029,7 +1030,7 @@ const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
return pRet;
}
-const SfxPoolItem& MSWord_SdrAttrIter::GetItem( USHORT nWhich ) const
+const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
{
using sw::hack::GetSetWhichFromSwDocWhich;
const SfxPoolItem* pRet = HasTextItem(nWhich);
@@ -1058,7 +1059,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
* pDstPool = &m_rExport.pDoc->GetAttrPool();
do {
- USHORT nWhich = pItem->Which(),
+ sal_uInt16 nWhich = pItem->Which(),
nSlotId = pSrcPool->GetSlotId( nWhich );
if ( nSlotId && nWhich != nSlotId &&
@@ -1079,7 +1080,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
}
}
-void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
+void WW8Export::WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp)
{
const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, &rObj);
OSL_ENSURE(pTxtObj, "That is no SdrTextObj!");
@@ -1112,15 +1113,15 @@ void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
}
}
-void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
+void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp)
{
bool bAnyWrite = false;
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp );
- USHORT nPara = rEditObj.GetParagraphCount();
- BYTE bNul = 0;
- for( USHORT n = 0; n < nPara; ++n )
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
+ sal_uInt8 bNul = 0;
+ for( sal_uInt16 n = 0; n < nPara; ++n )
{
if( n )
aAttrIter.NextPara( n );
@@ -1171,7 +1172,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
aAttrIter.OutParaAttr(false);
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( Strm().Tell(),
pO->Count(), pO->GetData() );
pO->Remove( 0, pO->Count() ); // leeren
@@ -1194,19 +1195,19 @@ void WinwordAnchoring::WriteData( EscherEx& rEx ) const
if (mbInline)
{
rEx.AddAtom(18, DFF_msofbtUDefProp, 3, 3); //Prop id is 0xF122
- rSt << (UINT16)0x0390 << sal_uInt32(3);
- rSt << (UINT16)0x0392 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0390 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0392 << sal_uInt32(3);
//This sub property is required to be in the dummy inline frame as
//well
- rSt << (UINT16)0x053F << nInlineHack;
+ rSt << (sal_uInt16)0x053F << nInlineHack;
}
else
{
rEx.AddAtom(24, DFF_msofbtUDefProp, 3, 4 ); //Prop id is 0xF122
- rSt << (UINT16)0x038F << mnXAlign;
- rSt << (UINT16)0x0390 << mnXRelTo;
- rSt << (UINT16)0x0391 << mnYAlign;
- rSt << (UINT16)0x0392 << mnYRelTo;
+ rSt << (sal_uInt16)0x038F << mnXAlign;
+ rSt << (sal_uInt16)0x0390 << mnXRelTo;
+ rSt << (sal_uInt16)0x0391 << mnYAlign;
+ rSt << (sal_uInt16)0x0392 << mnYRelTo;
}
}
}
@@ -1231,7 +1232,7 @@ void WW8Export::WriteEscher()
{
if (pEscher)
{
- ULONG nStart = pTableStrm->Tell();
+ sal_uLong nStart = pTableStrm->Tell();
pEscher->WritePictures();
pEscher->FinishEscher();
@@ -1247,7 +1248,7 @@ void SwEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = rWrt.Strm().Tell();
+ sal_Int32 nEndPos = rWrt.Strm().Tell();
mxGlobal->SetNewBlipStreamOffset( nEndPos );
pPicStrm->Seek( 0 );
@@ -1292,7 +1293,7 @@ void SwBasicEscherEx::WriteFrmExtraData(const SwFrmFmt&)
GetStream() << (sal_uInt32)0x80000000;
}
-void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
OpenContainer(ESCHER_SpContainer);
AddShape(ESCHER_ShpInst_PictureFrame, 0xa00, nShapeId);
@@ -1300,12 +1301,12 @@ void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
WriteFrmExtraData(rFmt);
AddAtom(6, DFF_msofbtUDefProp, 3, 1); //Prop id is 0xF122
- GetStream() << (UINT16)0x053F << nInlineHack;
+ GetStream() << (sal_uInt16)0x053F << nInlineHack;
CloseContainer(); // ESCHER_SpContainer
}
-UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
+sal_uInt32 AddMirrorFlags(sal_uInt32 nFlags, const SwMirrorGrf &rMirror)
{
switch (rMirror.GetValue())
{
@@ -1327,9 +1328,9 @@ UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
return nFlags;
}
-INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt);
SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : 0;
OSL_ENSURE(pGrfNd, "No SwGrfNode ?, suspicious");
@@ -1344,7 +1345,7 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
EscherPropertyContainer aPropOpt;
- UINT32 nFlags = ESCHER_BlipFlagDefault;
+ sal_uInt32 nFlags = ESCHER_BlipFlagDefault;
if (pGrfNd->IsLinkedFile())
{
@@ -1355,8 +1356,8 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
SwWW8Writer::InsAsString16( aBuf, sURL );
SwWW8Writer::InsUInt16( aBuf, 0 );
- USHORT nArrLen = aBuf.Count();
- BYTE* pArr = new BYTE[ nArrLen ];
+ sal_uInt16 nArrLen = aBuf.Count();
+ sal_uInt8* pArr = new sal_uInt8[ nArrLen ];
memcpy( pArr, aBuf.GetData(), nArrLen );
aPropOpt.AddOpt(ESCHER_Prop_pibName, true, nArrLen, pArr, nArrLen);
@@ -1486,7 +1487,7 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
true, &pItem))
{
const Size aSz( rNd.GetTwipSize() );
- INT32 nVal;
+ sal_Int32 nVal;
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetLeft() ) )
rPropOpt.AddOpt( ESCHER_Prop_cropFromLeft, ToFract16( nVal, aSz.Width()) );
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetRight() ) )
@@ -1498,23 +1499,23 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
}
}
-void SwBasicEscherEx::SetPicId(const SdrObject &, UINT32,
+void SwBasicEscherEx::SetPicId(const SdrObject &, sal_uInt32,
EscherPropertyContainer &)
{
}
-void SwEscherEx::SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+void SwEscherEx::SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt)
{
pTxtBxs->Append(rSdrObj, nShapeId);
- UINT32 nPicId = pTxtBxs->Count();
+ sal_uInt32 nPicId = pTxtBxs->Count();
nPicId *= 0x10000;
rPropOpt.AddOpt( ESCHER_Prop_pictureId, nPicId );
}
-INT32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
SwNodeIndex aIdx(*rFmt.GetCntnt().GetCntntIdx(), 1);
@@ -1613,7 +1614,7 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
else
{
- UINT32 nFillColor = GetColor(rBrush.GetColor(), false);
+ sal_uInt32 nFillColor = GetColor(rBrush.GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_fillColor, nFillColor );
rPropOpt.AddOpt( ESCHER_Prop_fillBackColor, nFillColor ^ 0xffffff );
rPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100010 );
@@ -1630,27 +1631,27 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
}
-INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
+sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth=0;
+ sal_Int32 nLineWidth=0;
const SfxPoolItem* pItem;
bool bFirstLine = true;
if (SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem))
{
- static const UINT16 aExhperProp[4] =
+ static const sal_uInt16 aExhperProp[4] =
{
ESCHER_Prop_dyTextTop, ESCHER_Prop_dyTextBottom,
ESCHER_Prop_dxTextLeft, ESCHER_Prop_dxTextRight
};
const SvxBorderLine* pLine;
- for( USHORT n = 0; n < 4; ++n )
+ for( sal_uInt16 n = 0; n < 4; ++n )
if( 0 != ( pLine = ((SvxBoxItem*)pItem)->GetLine( n )) )
{
if( bFirstLine )
{
- UINT32 nLineColor = GetColor(pLine->GetColor(), false);
+ sal_uInt32 nLineColor = GetColor(pLine->GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_lineColor, nLineColor );
rPropOpt.AddOpt( ESCHER_Prop_lineBackColor,
nLineColor ^ 0xffffff );
@@ -1730,10 +1731,10 @@ INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
return nLineWidth;
}
-INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
+ sal_Int32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
rPropOpt);
/*
@@ -1815,7 +1816,7 @@ INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
//PropOpt wants to own the buffer
aPolyDump.ObjectOwnsMemory(false);
rPropOpt.AddOpt(DFF_Prop_pWrapPolygonVertices, false,
- nArrLen, static_cast<BYTE *>(pArr), nArrLen);
+ nArrLen, static_cast<sal_uInt8 *>(pArr), nArrLen);
}
}
}
@@ -1845,11 +1846,11 @@ void SwBasicEscherEx::Init()
SetHellLayerId(rWrt.pDoc->GetHellId());
}
-INT32 SwBasicEscherEx::ToFract16(INT32 nVal, UINT32 nMax) const
+sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const
{
if (nMax)
{
- INT32 nMSVal = (nVal / 65536) * nMax;
+ sal_Int32 nMSVal = (nVal / 65536) * nMax;
nMSVal += (nVal * 65536 ) / nMax;
return nMSVal;
}
@@ -1866,7 +1867,7 @@ void SwBasicEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = pPicStrm->Tell();
+ sal_Int32 nEndPos = pPicStrm->Tell();
mxGlobal->WriteBlibStoreEntry(*pEscherStrm, 1, sal_True, nEndPos);
pPicStrm->Seek(0);
@@ -1892,7 +1893,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
CloseContainer(); // ESCHER_DggContainer
- BYTE i = 2; // for header/footer and the other
+ sal_uInt8 i = 2; // for header/footer and the other
PlcDrawObj *pSdrObjs = rWrt.pHFSdrObjs;
pTxtBxs = rWrt.pHFTxtBxs;
@@ -1913,7 +1914,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
EnterGroup( 0 );
- ULONG nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
+ sal_uLong nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
// write now all Writer-/DrawObjects
DrawObjPointerVector aSorted;
@@ -1923,7 +1924,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
DrawObjPointerIter aEnd = aSorted.end();
for (DrawObjPointerIter aIter = aSorted.begin(); aIter != aEnd; ++aIter)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
DrawObj *pObj = (*aIter);
OSL_ENSURE(pObj, "impossible");
if (!pObj)
@@ -2480,13 +2481,13 @@ void SwEscherEx::WriteFrmExtraData( const SwFrmFmt& rFmt )
GetStream() << 1L;
}
-INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
// check for textflyframe and if it is the first in a Chain
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
const SwNodeIndex* pNdIdx = rFmt.GetCntnt().GetCntntIdx();
if( pNdIdx )
{
@@ -2503,8 +2504,8 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
if (const SdrObject* pObj = rFmt.FindRealSdrObject())
{
// check for the first in a Chain
- UINT32 nTxtId;
- USHORT nOff = 0;
+ sal_uInt32 nTxtId;
+ sal_uInt16 nOff = 0;
const SwFrmFmt* pFmt = &rFmt, *pPrev;
while( 0 != ( pPrev = pFmt->GetChain().GetPrev() ))
{
@@ -2532,7 +2533,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
nTxtId = pTxtBxs->GetPos( p );
if( USHRT_MAX == nTxtId )
{
- UINT32 nPrevShapeId =
+ sal_uInt32 nPrevShapeId =
GetFlyShapeId(*pFmt, rObj.mnHdFtIndex, rPVec);
pTxtBxs->Append( *pPrevObj, nPrevShapeId );
nTxtId = pTxtBxs->Count();
@@ -2550,7 +2551,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
return nBorderThick;
}
-USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
+sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
DrawObjPointerVector &rPVec)
{
DrawObjPointerIter aEnd = rPVec.end();
@@ -2565,19 +2566,19 @@ USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
&rFmt == (&pObj->maCntnt.GetFrmFmt())
)
{
- return static_cast< USHORT >(aIter - rPVec.begin());
+ return static_cast< sal_uInt16 >(aIter - rPVec.begin());
}
}
return USHRT_MAX;
}
-INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec)
+sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
short nDirection = rObj.mnDirection;
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
OpenContainer( ESCHER_SpContainer );
AddShape( ESCHER_ShpInst_TextBox, 0xa00, nShapeId );
@@ -2585,7 +2586,7 @@ INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
aPropOpt.AddOpt(ESCHER_Prop_lTxid, nTxtBox);
if (const SwFrmFmt *pNext = rFmt.GetChain().GetNext())
{
- USHORT nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
+ sal_uInt16 nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
if (USHRT_MAX != nPos && aFollowShpIds[nPos])
aPropOpt.AddOpt(ESCHER_Prop_hspNext, aFollowShpIds[nPos]);
}
@@ -2646,7 +2647,7 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt,
rPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 );
}
-void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
+void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId )
{
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
@@ -2679,15 +2680,15 @@ void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
void SwEscherEx::MakeZOrderArrAndFollowIds(
std::vector<DrawObj>& rSrcArr, std::vector<DrawObj*>&rDstArr)
{
- USHORT n, nCnt = static_cast< USHORT >(rSrcArr.size());
+ sal_uInt16 n, nCnt = static_cast< sal_uInt16 >(rSrcArr.size());
SvULongsSort aSort( 255 < nCnt ? 255 : nCnt, 255 );
rDstArr.clear();
rDstArr.reserve(nCnt);
for (n = 0; n < nCnt; ++n)
{
const SwFrmFmt &rFmt = rSrcArr[n].maCntnt.GetFrmFmt();
- ULONG nOrdNum = rWrt.GetSdrOrdNum(rFmt);
- USHORT nPos;
+ sal_uLong nOrdNum = rWrt.GetSdrOrdNum(rFmt);
+ sal_uInt16 nPos;
//returns what will be the index in rDstArr of p as nPos
aSort.Insert(nOrdNum, nPos);
DrawObj &rObj = rSrcArr[n];
@@ -2709,17 +2710,17 @@ void SwEscherEx::MakeZOrderArrAndFollowIds(
bNeedsShapeId = true;
}
- ULONG nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
+ sal_uLong nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
aFollowShpIds.Insert(nShapeId, n);
}
}
-UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
+sal_uInt32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rpVec)
{
- USHORT nPos = FindPos(rFmt, nHdFtIndex, rpVec);
- UINT32 nShapeId;
+ sal_uInt16 nPos = FindPos(rFmt, nHdFtIndex, rpVec);
+ sal_uInt32 nShapeId;
if (USHRT_MAX != nPos)
{
if (0 == (nShapeId = aFollowShpIds[nPos]))
@@ -2733,10 +2734,10 @@ UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
return nShapeId;
}
-UINT32 SwEscherEx::QueryTextID(
- const uno::Reference< drawing::XShape>& xXShapeRef, UINT32 nShapeId )
+sal_uInt32 SwEscherEx::QueryTextID(
+ const uno::Reference< drawing::XShape>& xXShapeRef, sal_uInt32 nShapeId )
{
- UINT32 nId = 0;
+ sal_uInt32 nId = 0;
if (SdrObject* pObj = GetSdrObjectFromXShape(xXShapeRef))
{
pTxtBxs->Append( *pObj, nShapeId );
@@ -2783,7 +2784,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
if (!WriteOCXStream(xOleStg,xControlModel,aSize,sName))
return false;
- BYTE aSpecOLE[] =
+ sal_uInt8 aSpecOLE[] =
{
0x03, 0x6a, 0xFF, 0xFF, 0xFF, 0xFF, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
@@ -2791,7 +2792,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
0x56, 0x08, 1 // sprmCFObj
};
//Set the obj id into the sprmCPicLocation
- BYTE *pData = aSpecOLE+2;
+ sal_uInt8 *pData = aSpecOLE+2;
Set_UInt32(pData,(sal_uInt32)(sal_uIntPtr)pObj);
String sFld(FieldString(ww::eCONTROL));
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 1cd6be0f80c8..d9f8c318ba0a 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -415,7 +415,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
//The hard formatting properties that affect the entire paragraph
if (rNd.HasSwAttrSet())
{
- BOOL bDeep = FALSE;
+ sal_Bool bDeep = sal_False;
// only copy hard attributes - bDeep = false
aExportSet.Set(rNd.GetSwAttrSet(), bDeep);
// get the current font item. Use rNd.GetSwAttrSet instead of aExportSet:
@@ -449,7 +449,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
sal_uInt16 nWhichId = aIter.FirstWhich();
while( nWhichId )
{
- if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, sal_False, &pItem ))
{
if (nWhichId == nFontId)
pFont = &(item_cast<SvxFontItem>(*pItem));
@@ -550,7 +550,7 @@ bool SwWW8AttrIter::IsTxtAttr( xub_StrLen nSwPos )
// search for attrs with CH_TXTATR
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- for (USHORT i = 0; i < pTxtAttrs->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( pHt->HasDummyChar() && (*pHt->GetStart() == nSwPos) )
@@ -585,7 +585,7 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
SwImplBookmarksIter bkmkIterEnd = m_rExport.maImplicitBookmarks.end();
for ( SwImplBookmarksIter aIter = m_rExport.maImplicitBookmarks.begin(); aIter != bkmkIterEnd; ++aIter )
{
- ULONG sample = aIter->second;
+ sal_uLong sample = aIter->second;
if ( sample == rNd.GetIndex() )
return true;
@@ -599,7 +599,7 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
+const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pRet = 0;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
@@ -607,7 +607,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
if (pTxtAttrs && m_rExport.m_aCurrentCharPropStarts.size())
{
xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top();
- for (USHORT i = 0; i < pTxtAttrs->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -628,12 +628,12 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
void WW8Export::GetCurrentItems(WW8Bytes& rItems) const
{
- USHORT nEnd = pO ? pO->Count() : 0;
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = pO ? pO->Count() : 0;
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
rItems.Insert((*pO)[nI], rItems.Count());
}
-const SfxPoolItem& SwWW8AttrIter::GetItem(USHORT nWhich) const
+const SfxPoolItem& SwWW8AttrIter::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = HasTextItem(nWhich);
return pRet ? *pRet : rNd.SwCntntNode::GetAttr(nWhich);
@@ -679,7 +679,7 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/,
other, so we make a guess based upon the first character of the text,
defaulting to asian.
*/
- USHORT nRubyScript;
+ sal_uInt16 nRubyScript;
if( pBreakIt->GetBreakIter().is() )
nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
else
@@ -869,20 +869,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
m_rWW8Export.OutputField( 0, ww::eHYPERLINK, sURL, WRITEFIELD_START | WRITEFIELD_CMD_START );
// write the refence to the "picture" structure
- ULONG nDataStt = m_rWW8Export.pDataStrm->Tell();
+ sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell();
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell() );
// WinWord 2000 doesn't write this - so its a temp solution by W97 ?
m_rWW8Export.WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -895,7 +895,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
//all links end up in the data stream as absolute references.
bool bAbsolute = !bBookMarkOnly;
- static BYTE const aURLData1[] = {
+ static sal_uInt8 aURLData1[] = {
0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure!
@@ -904,20 +904,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // |
0,0,0,0, // /
};
- static BYTE const MAGIC_A[] = {
+ static sal_uInt8 MAGIC_A[] = {
// start of "next" data
0xD0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
m_rWW8Export.pDataStrm->Write( aURLData1, sizeof( aURLData1 ) );
- BYTE nAnchor = 0x00;
+ sal_uInt8 nAnchor = 0x00;
if ( sMark.Len() )
nAnchor = 0x08;
m_rWW8Export.pDataStrm->Write( &nAnchor, 1 );
m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) );
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002);
- UINT32 nFlag = bBookMarkOnly ? 0 : 0x01;
+ sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01;
if ( bAbsolute )
nFlag |= 0x02;
if ( sMark.Len() )
@@ -929,13 +929,13 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
{
// version 1 (for a document)
- static BYTE const MAGIC_C[] = {
+ static sal_uInt8 MAGIC_C[] = {
0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
0x00, 0x00
};
- static BYTE const MAGIC_D[] = {
+ static sal_uInt8 MAGIC_D[] = {
0xFF, 0xFF, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -984,7 +984,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
// what the data mean, except for the URL.
// The First piece is the WW8_PIC structure.
//
- static BYTE const MAGIC_B[] = {
+ static sal_uInt8 MAGIC_B[] = {
0xE0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
@@ -1049,7 +1049,7 @@ void WW8AttributeOutput::FieldVanish( const String& rTxt, ww::eField /*eType*/ )
aItems.Insert( 67, aItems.Count() );
aItems.Insert( 1, aItems.Count() );
- USHORT nStt_sprmCFSpec = aItems.Count();
+ sal_uInt16 nStt_sprmCFSpec = aItems.Count();
// sprmCFSpec -- fSpec-Attribut true
if ( m_rWW8Export.bWrtWW8 )
@@ -1113,7 +1113,7 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
{
eType = ww::eTC;
sTxt.InsertAscii( " TC \"", 0 );
- USHORT nLvl = rAttr.GetLevel();
+ sal_uInt16 nLvl = rAttr.GetLevel();
if (nLvl > WW8ListManager::nMaxLevel)
nLvl = WW8ListManager::nMaxLevel;
@@ -1137,7 +1137,7 @@ int SwWW8AttrIter::OutAttrWithRange(xub_StrLen nPos)
{
m_rExport.m_aCurrentCharPropStarts.push( nPos );
const xub_StrLen* pEnd;
- for ( USHORT i = 0; i < pTxtAttrs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -1195,7 +1195,7 @@ bool SwWW8AttrIter::IsRedlineAtEnd( xub_StrLen nEnd ) const
{
bool bRet = false;
// search next Redline
- for( USHORT nPos = nCurRedlinePos;
+ for( sal_uInt16 nPos = nCurRedlinePos;
nPos < m_rExport.pDoc->GetRedlineTbl().Count(); ++nPos )
{
const SwPosition* pEnd = m_rExport.pDoc->GetRedlineTbl()[ nPos ]->End();
@@ -1474,8 +1474,8 @@ String SwWW8AttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
*/
static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const SwTxtNode* pTxtNode )
{
- USHORT nPos = 0;
- USHORT nMax = rExport.pDoc->GetRedlineTbl().Count();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rExport.pDoc->GetRedlineTbl().Count();
while( nPos < nMax )
{
const SwRedline* pRedl = rExport.pDoc->GetRedlineTbl()[ nPos++ ];
@@ -1496,7 +1496,7 @@ static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const S
return static_cast<SwTxtFmtColl&>( pTxtNode->GetAnyFmtColl() );
}
-void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, USHORT nStyle,
+void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle,
ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner )
{
short nDropLines = rSwFmtDrop.GetLines();
@@ -1505,7 +1505,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1517,7 +1517,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.InsUInt16( NS_sprm::LN_PDcs ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaFromText ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1525,7 +1525,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if ( rNode.GetDropSize( rFontHeight, rDropHeight, rDropDescent ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaLine ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1539,7 +1539,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.pO->Insert( 46, m_rWW8Export.pO->Count() ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1547,7 +1547,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if (rNode.GetDropSize(rFontHeight, rDropHeight, rDropDescent))
{
m_rWW8Export.pO->Insert( 20, m_rWW8Export.pO->Count() ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1578,10 +1578,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.InsUInt16( NS_sprm::LN_CHpsPos ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_CHps ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
else
{
@@ -1593,10 +1593,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.pO->Insert( 101, m_rWW8Export.pO->Count() ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.pO->Insert( 99, m_rWW8Export.pO->Count() ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
}
@@ -1631,7 +1631,7 @@ bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt,
xub_StrLen nEnd, IMarkVector& rArr )
{
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- ULONG nNd = rNd.GetIndex( );
+ sal_uLong nNd = rNd.GetIndex( );
const sal_Int32 nMarks = pMarkAccess->getMarksCount();
for ( sal_Int32 i = 0; i < nMarks; i++ )
@@ -1753,7 +1753,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// nStyleBeforeFly may change when we recurse into another node, so we
// have to remember it in nStyle
- USHORT nStyle = nStyleBeforeFly;
+ sal_uInt16 nStyle = nStyleBeforeFly;
SwWW8AttrIter aAttrIter( *this, rNode );
rtl_TextEncoding eChrSet = aAttrIter.GetCharSet();
@@ -1924,9 +1924,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName(), false );
}
- nLen -= static_cast< USHORT >( ofs );
+ nLen -= static_cast< sal_uInt16 >( ofs );
- String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< USHORT >( ofs ), nLen ) );
+ String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< sal_uInt16 >( ofs ), nLen ) );
if ( ( nTxtTyp == TXT_EDN || nTxtTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 )
{
// Insert tab for aesthetic puposes #i24762#
@@ -2045,7 +2045,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !bFlyInTable )
{
SfxItemSet* pTmpSet = 0;
- const BYTE nPrvNxtNd = rNode.HasPrevNextLayNode();
+ const sal_uInt8 nPrvNxtNd = rNode.HasPrevNextLayNode();
if( (ND_HAS_PREV_LAYNODE|ND_HAS_NEXT_LAYNODE ) != nPrvNxtNd )
{
@@ -2075,16 +2075,16 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
- BOOL bParaRTL = FALSE;
+ sal_Bool bParaRTL = sal_False;
const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*)
rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR);
if ( aAttrIter.IsParaRTL())
- bParaRTL = TRUE;
+ bParaRTL = sal_True;
if( rNode.IsNumbered())
{
const SwNumRule* pRule = rNode.GetNumRule();
- BYTE nLvl = static_cast< BYTE >( rNode.GetActualListLevel() );
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >( rNode.GetActualListLevel() );
const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl );
if( !pFmt )
pFmt = &pRule->Get( nLvl );
@@ -2191,7 +2191,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// create new LRSpace item, based on the current (if present)
const SfxPoolItem* pPoolItem = NULL;
- pTmpSet->GetItemState(RES_LR_SPACE, TRUE, &pPoolItem);
+ pTmpSet->GetItemState(RES_LR_SPACE, sal_True, &pPoolItem);
SvxLRSpaceItem aLRSpace(
( pPoolItem == NULL )
? SvxLRSpaceItem(0, 0, 0, 0, RES_LR_SPACE)
@@ -2199,7 +2199,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// new left margin = old left + label space
const SwNumRule* pRule = rNode.GetNumRule();
- const SwNumFmt& rNumFmt = pRule->Get( static_cast< USHORT >(rNode.GetActualListLevel()) );
+ const SwNumFmt& rNumFmt = pRule->Get( static_cast< sal_uInt16 >(rNode.GetActualListLevel()) );
// #i86652#
if ( rNumFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2296,7 +2296,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !pTmpSet )
pTmpSet = new SfxItemSet(rNode.GetSwAttrSet());
- const SvxFmtKeepItem aKeepItem( TRUE, RES_KEEP );
+ const SvxFmtKeepItem aKeepItem( sal_True, RES_KEEP );
pTmpSet->Put( aKeepItem );
}
}
@@ -2355,7 +2355,7 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
{
TableRowEnd( pInner->getDepth() );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -2427,7 +2427,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
// Bug 74245 - if the first Node inside the section has an own
// PageDesc or PageBreak attribut, then dont write
// here the section break
- ULONG nRstLnNum = 0;
+ sal_uLong nRstLnNum = 0;
const SfxItemSet* pSet;
if ( rNd.IsTableNode() )
pSet = &rNd.GetTableNode()->GetTable().GetFrmFmt()->GetAttrSet();
@@ -2465,7 +2465,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
}
-void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFmt, nLnNum);
}
@@ -2484,7 +2484,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- for( USHORT n=0; n < pTxtAttrs->Count(); ++n )
+ for( sal_uInt16 n=0; n < pTxtAttrs->Count(); ++n )
{
const SwTxtAttr* pAttr = (*pTxtAttrs)[ n ];
if( RES_TXTATR_FLYCNT == pAttr->Which() )
@@ -2496,7 +2496,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if( pNodeIndex )
{
- ULONG nStt = pNodeIndex->GetIndex()+1,
+ sal_uLong nStt = pNodeIndex->GetIndex()+1,
nEnd = pNodeIndex->GetNode().EndOfSectionIndex();
if( (nStt < nEnd) && !pDoc->GetNodes()[ nStt ]->IsNoTxtNode() )
@@ -2566,8 +2566,8 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
// Hole vom Node und vom letzten Node die Position in der Section
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
if( nStt >= nEnd ) // kein Bereich, also kein gueltiger Node
return;
@@ -2589,7 +2589,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
{
/* Munge flys in fly into absolutely positioned elements for word 6 */
const SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
- const SwRect aPageRect = pParTxtNode->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pParTxtNode->FindPageFrmRect( sal_False, 0, sal_False );
aOffset = rFrmFmt.FindLayoutRect().Pos();
aOffset -= aPageRect.Pos();
@@ -2666,7 +2666,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
if ( pRedline->Next() )
Redline( pRedline->Next() );
- static USHORT const aSprmIds[ 2 * 2 * 3 ] =
+ static sal_uInt16 aSprmIds[ 2 * 2 * 3 ] =
{
// Ids for insert
NS_sprm::LN_CFRMark, NS_sprm::LN_CIbstRMark, NS_sprm::LN_CDttmRMark, // for WW8
@@ -2676,7 +2676,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
0x0041, 0x0045, 0x0046 // for WW6
};
- const USHORT* pSprmIds = 0;
+ const sal_uInt16* pSprmIds = 0;
switch( pRedline->GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 8e61e2c1dc5f..5afc0075ca4e 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star;
using namespace sw::types;
using namespace sw::util;
-USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal )
+sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal )
{
- USHORT nNumId = USHRT_MAX;
+ sal_uInt16 nNumId = USHRT_MAX;
String sPrefix( CREATE_CONST_ASC( "WW8TempExport" ) );
sPrefix += String::CreateFromInt32( nUniqueList++ );
SwNumRule* pMyNumRule =
@@ -63,7 +63,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
pUsedNumTbl->Insert( pMyNumRule, pUsedNumTbl->Count() );
- for ( USHORT i = 0; i < MAXLEVEL; i++ )
+ for ( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
const SwNumFmt& rSubRule = pRule->Get(i);
pMyNumRule->Set( i, rSubRule );
@@ -81,7 +81,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
return nNumId;
}
-USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
+sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
{
if ( !pUsedNumTbl )
{
@@ -90,7 +90,7 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// Check, if the outline rule is already inserted into <pUsedNumTbl>.
// If yes, do not insert it again.
bool bOutlineRuleAdded( false );
- for ( USHORT n = pUsedNumTbl->Count(); n; )
+ for ( sal_uInt16 n = pUsedNumTbl->Count(); n; )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( --n );
if ( !pDoc->IsUsed( rRule ) )
@@ -112,11 +112,11 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// <--
}
SwNumRule* p = (SwNumRule*)&rNumRule;
- USHORT nRet = pUsedNumTbl->GetPos(p);
+ sal_uInt16 nRet = pUsedNumTbl->GetPos(p);
//Is this list now duplicated into a new list which we should use
// #i77812# - perform 'deep' search in duplication map
- ::std::map<USHORT,USHORT>::const_iterator aResult = aRuleDuplicates.end();
+ ::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
do {
aResult = aRuleDuplicates.find(nRet);
if ( aResult != aRuleDuplicates.end() )
@@ -166,7 +166,7 @@ void WW8Export::WriteNumbering()
OutListNamesTab();
}
-void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
@@ -175,7 +175,7 @@ void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule
for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
- BYTE nFlags = 0, nDummy = 0;
+ sal_uInt8 nFlags = 0, nDummy = 0;
if ( rRule.IsContinusNum() )
nFlags |= 0x1;
@@ -187,10 +187,10 @@ void MSWordExportBase::NumberingDefinitions()
if ( !pUsedNumTbl )
return; // no numbering is used
- USHORT nCount = pUsedNumTbl->Count();
+ sal_uInt16 nCount = pUsedNumTbl->Count();
// Write static data of SwNumRule - LSTF
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
@@ -198,12 +198,12 @@ void MSWordExportBase::NumberingDefinitions()
}
}
-void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
- USHORT nStart,
- USHORT nNumberingType,
+void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -219,7 +219,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
*m_rWW8Export.pTableStrm << WW8Export::GetNumId( nNumberingType );
// Justification
- BYTE nAlign;
+ sal_uInt8 nAlign;
switch ( eAdjust )
{
case SVX_ADJUST_CENTER: nAlign = 1; break;
@@ -246,7 +246,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = &aCharAtrs;
if ( pFont )
{
- USHORT nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
+ sal_uInt16 nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -263,21 +263,21 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = pOldpO;
}
- *m_rWW8Export.pTableStrm << BYTE( aCharAtrs.Count() );
+ *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.Count() );
// cbGrpprlPapx
- BYTE aPapSprms [] = {
+ sal_uInt8 aPapSprms [] = {
0x5e, 0x84, 0, 0, // sprmPDxaLeft
0x60, 0x84, 0, 0, // sprmPDxaLeft1
0x15, 0xc6, 0x05, 0x00, 0x01, 0, 0, 0x06
};
- *m_rWW8Export.pTableStrm << BYTE( sizeof( aPapSprms ) );
+ *m_rWW8Export.pTableStrm << sal_uInt8( sizeof( aPapSprms ) );
// reserved
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0 );
// pap sprms
- BYTE* pData = aPapSprms + 2;
+ sal_uInt8* pData = aPapSprms + 2;
Set_UInt16( pData, nIndentAt );
pData += 2;
Set_UInt16( pData, nFirstLineIndex );
@@ -297,8 +297,8 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
void MSWordExportBase::AbstractNumberingDefinitions()
{
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
// prepare the NodeNum to generate the NumString
SwNumberTree::tNumberVector aNumVector;
@@ -311,17 +311,17 @@ void MSWordExportBase::AbstractNumberingDefinitions()
AttrOutput().StartAbstractNumbering( n + 1 );
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
- BYTE nLvl;
- BYTE nLevels = static_cast< BYTE >(rRule.IsContinusNum() ?
+ sal_uInt8 nLvl;
+ sal_uInt8 nLevels = static_cast< sal_uInt8 >(rRule.IsContinusNum() ?
WW8ListManager::nMinLevel : WW8ListManager::nMaxLevel);
for( nLvl = 0; nLvl < nLevels; ++nLvl )
{
// write the static data of the SwNumFmt of this level
- BYTE aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
+ sal_uInt8 aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
const SwNumFmt& rFmt = rRule.Get( nLvl );
- BYTE nFollow = 0;
+ sal_uInt8 nFollow = 0;
// #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -400,20 +400,20 @@ void MSWordExportBase::AbstractNumberingDefinitions()
{
if (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType())
{
- BYTE* pLvlPos = aNumLvlPos;
+ sal_uInt8* pLvlPos = aNumLvlPos;
// the numbering string has to be restrict
// to the level currently working on.
sNumStr = rRule.MakeNumString(aNumVector, false, true, nLvl);
// <--
// now search the nums in the string
- for( BYTE i = 0; i <= nLvl; ++i )
+ for( sal_uInt8 i = 0; i <= nLvl; ++i )
{
String sSrch( String::CreateFromInt32( i ));
xub_StrLen nFnd = sNumStr.Search( sSrch );
if( STRING_NOTFOUND != nFnd )
{
- *pLvlPos = (BYTE)(nFnd + rFmt.GetPrefix().Len() + 1 );
+ *pLvlPos = (sal_uInt8)(nFnd + rFmt.GetPrefix().Len() + 1 );
++pLvlPos;
sNumStr.SetChar( nFnd, (char)i );
}
@@ -505,8 +505,8 @@ void WW8Export::OutOverrideListTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
pFib->fcPlfLfo = pTableStrm->Tell();
SwWW8Writer::WriteLong( *pTableStrm, nCount );
@@ -529,7 +529,7 @@ void WW8Export::OutListNamesTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nNms = 0, nCount = pUsedNumTbl->Count();
+ sal_uInt16 nNms = 0, nCount = pUsedNumTbl->Count();
pFib->fcSttbListNames = pTableStrm->Tell();
SwWW8Writer::WriteShort( *pTableStrm, -1 );
@@ -561,52 +561,52 @@ void WW8Export::OutputOlst( const SwNumRule& rRule )
if ( bWrtWW8 )
return;
- static BYTE const aAnlvBase[] = { // Defaults
+ static sal_uInt8 aAnlvBase[] = { // Defaults
1,0,0, // Upper Roman
0x0C, // Hanging Indent, fPrev
0,0,1,0x80,0,0,1,0,0x1b,1,0,0 };
- static BYTE const aSprmOlstHdr[] = { 133, 212 };
+ static sal_uInt8 aSprmOlstHdr[] = { 133, 212 };
pO->Insert( aSprmOlstHdr, sizeof( aSprmOlstHdr ), pO->Count() );
WW8_OLST aOlst;
memset( &aOlst, 0, sizeof(aOlst) );
- BYTE* pC = aOlst.rgch;
- BYTE* pChars = (BYTE*)pC;
- USHORT nCharLen = 64;
+ sal_uInt8* pC = aOlst.rgch;
+ sal_uInt8* pChars = (sal_uInt8*)pC;
+ sal_uInt16 nCharLen = 64;
- for (USHORT j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
+ for (sal_uInt16 j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
{
memcpy( &aOlst.rganlv[j], aAnlvBase, sizeof( WW8_ANLV ) ); // Defaults
const SwNumFmt* pFmt = rRule.GetNumFmt( j );
if( pFmt )
BuildAnlvBase( aOlst.rganlv[j], pChars, nCharLen, rRule,
- *pFmt, (BYTE)j );
+ *pFmt, (sal_uInt8)j );
}
- pO->Insert( (BYTE*)&aOlst, sizeof( aOlst ), pO->Count() );
+ pO->Insert( (sal_uInt8*)&aOlst, sizeof( aOlst ), pO->Count() );
}
-void WW8Export::Out_WwNumLvl( BYTE nWwLevel )
+void WW8Export::Out_WwNumLvl( sal_uInt8 nWwLevel )
{
pO->Insert( 13, pO->Count() );
pO->Insert( nWwLevel, pO->Count() );
}
-void WW8Export::Out_SwNumLvl( BYTE nSwLevel )
+void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel )
{
OSL_ENSURE( nSwLevel < MAXLEVEL, "numbered?");
Out_WwNumLvl( nSwLevel + 1 );
}
-void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumFmt& rFmt)
+void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumFmt& rFmt)
{
ByteToSVBT8(11, rAnlv.nfc);
- BYTE nb = 0; // Zahlentyp
+ sal_uInt8 nb = 0; // Zahlentyp
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -642,7 +642,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
rtl_TextEncoding eChrSet = rFont.GetCharSet();
String sFontName = rFont.GetName();
- USHORT nFontId;
+ sal_uInt16 nFontId;
if (sw::util::IsStarSymbol(sFontName))
{
/*
@@ -671,7 +671,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
if ( (eChrSet == RTL_TEXTENCODING_SYMBOL) && (cChar >= 0xF000) && (
cChar <= 0xF0FF) )
{
- *rpCh = static_cast< BYTE >(cChar - 0xF000);
+ *rpCh = static_cast< sal_uInt8 >(cChar - 0xF000);
}
else
*rpCh = ByteString::ConvertFromUnicode(cChar, eChrSet);
@@ -703,6 +703,9 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
if (!bSubstituteBullets)
return;
+ if (!bSubstituteBullets)
+ return;
+
if (!pConvert)
{
pConvert = CreateStarSymbolToMSMultiFont();
@@ -741,17 +744,17 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
delete pConvert;
}
-static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
- USHORT& rCharLen, SVBT8& r8Len )
+static void SwWw8_InsertAnlText( const String& rStr, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, SVBT8& r8Len )
{
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
WW8Bytes aO;
SwWW8Writer::InsAsString8( aO, rStr, RTL_TEXTENCODING_MS_1252 );
- USHORT nCnt = aO.Count();
+ sal_uInt16 nCnt = aO.Count();
if( nCnt && nCnt < rCharLen )
{
- nb = (BYTE)nCnt;
+ nb = (sal_uInt8)nCnt;
memcpy( rpCh, aO.GetData(), nCnt );
rpCh += nCnt;
rCharLen = rCharLen - nCnt;
@@ -759,13 +762,13 @@ static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
ByteToSVBT8( nb, r8Len );
}
-void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel)
+void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
+ sal_uInt8 nSwLevel)
{
ByteToSVBT8(WW8Export::GetNumId(rFmt.GetNumberingType()), rAnlv.nfc);
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -797,7 +800,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
&& (nSwLevel<= WW8ListManager::nMaxLevel )
&& (rFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // UEberhaupt Nummerierung ?
{ // -> suche, ob noch Zahlen davor
- BYTE nUpper = rFmt.GetIncludeUpperLevels();
+ sal_uInt8 nUpper = rFmt.GetIncludeUpperLevels();
if( (nUpper <= WW8ListManager::nMaxLevel) &&
(rRul.Get(nUpper).GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // Nummerierung drueber ?
{
@@ -832,21 +835,21 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
}
void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel )
+ sal_uInt8 nSwLevel )
{
- static BYTE const aSprmAnldDefault[54] = {
+ static sal_uInt8 aSprmAnldDefault[54] = {
12, 52,
1,0,0,0x0c,0,0,1,0x80,0,0,1,0,0x1b,1,0,0,0x2e,
0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
- BYTE aSprmAnld[54];
+ sal_uInt8 aSprmAnld[54];
memcpy( aSprmAnld, aSprmAnldDefault, sizeof( aSprmAnld ) );
WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2); // handlicher Pointer
- BYTE* pChars = (BYTE*)(pA->rgchAnld);
- USHORT nCharLen = 31;
+ sal_uInt8* pChars = (sal_uInt8*)(pA->rgchAnld);
+ sal_uInt16 nCharLen = 31;
if( nSwLevel == 11 )
BuildAnlvBulletBase( pA->eAnlv, pChars, nCharLen, rFmt );
@@ -854,7 +857,7 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel );
// ... und raus damit
- OutSprmBytes( (BYTE*)&aSprmAnld, sizeof( aSprmAnld ) );
+ OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) );
}
@@ -865,12 +868,12 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
if (nLevel < 0 || nLevel >= MAXLEVEL)
{
- OSL_ENSURE(FALSE, "Invalid level");
+ OSL_ENSURE(sal_False, "Invalid level");
return false;
}
- BYTE nSwLevel = static_cast< BYTE >(nLevel);
+ sal_uInt8 nSwLevel = static_cast< sal_uInt8 >(nLevel);
const SwNumRule* pRul = pNd->GetNumRule();
if( !pRul || nSwLevel == WW8ListManager::nMaxLevel)
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index b6822d915e52..83cece4881dc 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -101,15 +101,15 @@ class WW8_WrPlc0
{
private:
SvULongs aPos; // PTRARR von CPs / FCs
- ULONG nOfs;
+ sal_uLong nOfs;
//No copying
WW8_WrPlc0(const WW8_WrPlc0&);
WW8_WrPlc0 &operator=(const WW8_WrPlc0&);
public:
- WW8_WrPlc0( ULONG nOffset );
- USHORT Count() const { return aPos.Count(); }
- void Append( ULONG nStartCpOrFc );
+ WW8_WrPlc0( sal_uLong nOffset );
+ sal_uInt16 Count() const { return aPos.Count(); }
+ void Append( sal_uLong nStartCpOrFc );
void Write( SvStream& rStrm );
};
@@ -121,17 +121,17 @@ public:
// GetId( SwCharFmt ) zur Benutzung im Text -> nil verboten,
// "Default Char Style" stattdessen
-USHORT MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
+sal_uInt16 MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
{
- USHORT nRet = pStyles->GetSlot( rFmt );
+ sal_uInt16 nRet = pStyles->GetSlot( rFmt );
return ( nRet != 0x0fff ) ? nRet : 10; // Default Char Style
}
// GetId( SwTxtFmtColl ) zur Benutzung an TextNodes -> nil verboten,
// "Standard" stattdessen
-USHORT MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
+sal_uInt16 MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
{
- USHORT nRet = pStyles->GetSlot( rColl );
+ sal_uInt16 nRet = pStyles->GetSlot( rColl );
return ( nRet != 0xfff ) ? nRet : 0; // Default TxtFmtColl
}
@@ -150,7 +150,7 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport )
m_rExport.pDoc->GetFtnInfo().GetAnchorCharFmt( *m_rExport.pDoc );
m_rExport.pDoc->GetFtnInfo().GetCharFmt( *m_rExport.pDoc );
}
- USHORT nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
+ sal_uInt16 nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
m_rExport.pDoc->GetTxtFmtColls()->Count() - 1;
// etwas grosszuegig ( bis zu 15 frei )
@@ -166,18 +166,18 @@ MSWordStyles::~MSWordStyles()
}
// Sty_SetWWSlot() fuer Abhaengigkeiten der Styles -> nil ist erlaubt
-USHORT MSWordStyles::GetSlot( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetSlot( const SwFmt& rFmt ) const
{
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
if ( pFmtA[n] == &rFmt )
return n;
return 0xfff; // 0xfff: WW: nil
}
-USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
+sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch ( nRet = rFmt.GetPoolFmtId() )
{
case RES_POOLCOLL_STANDARD:
@@ -203,24 +203,24 @@ USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
return nRet;
}
-USHORT MSWordStyles::GetWWId( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) const
{
- USHORT nRet = ww::stiUser; // User-Style als default
- USHORT nPoolId = rFmt.GetPoolFmtId();
+ sal_uInt16 nRet = ww::stiUser; // User-Style als default
+ sal_uInt16 nPoolId = rFmt.GetPoolFmtId();
if( nPoolId == RES_POOLCOLL_STANDARD )
nRet = 0;
else if( nPoolId >= RES_POOLCOLL_HEADLINE1 &&
nPoolId <= RES_POOLCOLL_HEADLINE9 )
- nRet = static_cast< USHORT >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
else if( nPoolId >= RES_POOLCOLL_TOX_IDX1 &&
nPoolId <= RES_POOLCOLL_TOX_IDX3 )
- nRet = static_cast< USHORT >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT1 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT5 )
- nRet = static_cast< USHORT >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT6 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT9 )
- nRet = static_cast< USHORT >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
else
switch( nPoolId )
{
@@ -277,7 +277,7 @@ void MSWordStyles::BuildStylesTable()
nUsedSlots = WW8_RESERVED_SLOTS; // soviele sind reserviert fuer
// Standard und HeadingX u.a.
SwFmt* pFmt;
- USHORT n;
+ sal_uInt16 n;
const SvPtrarr& rArr = *m_rExport.pDoc->GetCharFmts(); // erst CharFmt
// das Default-ZeichenStyle ( 0 ) wird nicht mit ausgegeben !
for( n = 1; n < rArr.Count(); n++ )
@@ -299,7 +299,7 @@ void MSWordStyles::BuildStylesTable()
static void impl_SkipOdd( WW8Bytes* pO, sal_Size nTableStrmTell )
{
if ( ( nTableStrmTell + pO->Count() ) & 1 ) // Start auf gerader
- pO->Insert( (BYTE)0, pO->Count() ); // Adresse
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Adresse
}
void WW8AttributeOutput::EndStyle()
@@ -307,23 +307,23 @@ void WW8AttributeOutput::EndStyle()
impl_SkipOdd( m_rWW8Export.pO, m_rWW8Export.pTableStrm->Tell() );
short nLen = m_rWW8Export.pO->Count() - 2; // Laenge des Styles
- BYTE* p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
+ sal_uInt8* p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
ShortToSVBT16( nLen, p ); // nachtragen
- p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
+ p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
ShortToSVBT16( nLen, p ); // dito
m_rWW8Export.pTableStrm->Write( m_rWW8Export.pO->GetData(), m_rWW8Export.pO->Count() ); // ins File damit
m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren fuer naechsten
}
-void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT nWwBase,
- USHORT nWwNext, USHORT nWwId, USHORT /*nId*/, bool bAutoUpdate )
+void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt16 nWwBase,
+ sal_uInt16 nWwNext, sal_uInt16 nWwId, sal_uInt16 /*nId*/, bool bAutoUpdate )
{
- BYTE aWW8_STD[ sizeof( WW8_STD ) ];
- BYTE* pData = aWW8_STD;
+ sal_uInt8 aWW8_STD[ sizeof( WW8_STD ) ];
+ sal_uInt8* pData = aWW8_STD;
memset( &aWW8_STD, 0, sizeof( WW8_STD ) );
- UINT16 nBit16 = 0x1000; // fInvalHeight
+ sal_uInt16 nBit16 = 0x1000; // fInvalHeight
nBit16 |= (ww::stiNil & nWwId);
Set_UInt16( pData, nBit16 );
@@ -335,7 +335,7 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
nBit16 |= bPapFmt ? 2 : 1; // cupx
Set_UInt16( pData, nBit16 );
- pData += sizeof( UINT16 ); // bchUpe
+ pData += sizeof( sal_uInt16 ); // bchUpe
if( m_rWW8Export.bWrtWW8 )
{
@@ -343,19 +343,19 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
Set_UInt16( pData, nBit16 );
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- //UINT16 fHidden : 1; /* hidden from UI? */
- //UINT16 : 14; /* unused bits */
+ //sal_uInt16 fHidden : 1; /* hidden from UI? */
+ //sal_uInt16 : 14; /* unused bits */
}
- UINT16 nLen = static_cast< UINT16 >( ( pData - aWW8_STD ) + 1 +
+ sal_uInt16 nLen = static_cast< sal_uInt16 >( ( pData - aWW8_STD ) + 1 +
((m_rWW8Export.bWrtWW8 ? 2 : 1 ) * (rName.Len() + 1)) ); // vorlaeufig
WW8Bytes* pO = m_rWW8Export.pO;
nPOPosStdLen1 = pO->Count(); // Adr1 zum nachtragen der Laenge
SwWW8Writer::InsUInt16( *pO, nLen );
- pO->Insert( aWW8_STD, static_cast< USHORT >( pData - aWW8_STD ), pO->Count() );
+ pO->Insert( aWW8_STD, static_cast< sal_uInt16 >( pData - aWW8_STD ), pO->Count() );
nPOPosStdLen2 = nPOPosStdLen1 + 8; // Adr2 zum nachtragen von "end of upx"
@@ -367,18 +367,18 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
}
else
{
- pO->Insert( (BYTE)rName.Len(), pO->Count() ); // Laenge
+ pO->Insert( (sal_uInt8)rName.Len(), pO->Count() ); // Laenge
SwWW8Writer::InsAsString8( *pO, rName, RTL_TEXTENCODING_MS_1252 );
}
- pO->Insert( (BYTE)0, pO->Count() ); // Trotz P-String 0 am Ende!
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Trotz P-String 0 am Ende!
}
void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
{
const SwModify* pOldMod = m_rExport.pOutFmtNode;
m_rExport.pOutFmtNode = &rFmt;
- bool aFlags[ static_cast< USHORT >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
- USHORT nStt, nEnd, n;
+ bool aFlags[ static_cast< sal_uInt16 >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
+ sal_uInt16 nStt, nEnd, n;
if( bPap )
nStt = RES_PARATR_BEGIN, nEnd = RES_FRMATR_END;
else
@@ -392,8 +392,8 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
// static defaults, that differs between WinWord and SO
if( bPap )
{
- aFlags[ static_cast< USHORT >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
- aFlags[ static_cast< USHORT >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
}
else
{
@@ -425,13 +425,13 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
m_rExport.pOutFmtNode = pOldMod;
}
-void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
+void WW8AttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 nStyle )
{
WW8Bytes* pO = m_rWW8Export.pO;
impl_SkipOdd( pO, m_rWW8Export.pTableStrm->Tell() );
- UINT16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
+ sal_uInt16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
m_nStyleLenPos = pO->Count(); // Laenge zum Nachtragen
// Keinen Pointer merken, da sich bei
// _grow der Pointer aendert !
@@ -444,7 +444,7 @@ void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
SwWW8Writer::InsUInt16( *pO, nStyle ); // Style-Nummer
}
-void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, USHORT nPos,
+void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16 nPos,
bool bInsDefCharSiz )
{
m_rExport.AttrOutput().StartStyleProperties( bParProp, nPos );
@@ -468,12 +468,12 @@ void WW8AttributeOutput::EndStyleProperties( bool /*bParProp*/ )
{
WW8Bytes* pO = m_rWW8Export.pO;
- UINT16 nLen = pO->Count() - m_nStyleStartSize;
- BYTE* pUpxLen = (BYTE*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
+ sal_uInt16 nLen = pO->Count() - m_nStyleStartSize;
+ sal_uInt8* pUpxLen = (sal_uInt8*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
ShortToSVBT16( nLen, pUpxLen ); // Default-Laenge eintragen
}
-void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext )
+void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext )
{
bFmtColl = pFmt->Which() == RES_TXTFMTCOLL || pFmt->Which() == RES_CONDTXTFMTCOLL;
@@ -493,13 +493,13 @@ void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USH
nNext = GetSlot( *pNext );
}
-void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
+void WW8AttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
if ( nStyle == 10 ) // Default Char-Style ( nur WW )
{
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE const aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x42, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x42, 0x00,
0x00, 0x00, 0x19, 0x00, 0x41, 0x00, 0x62, 0x00,
@@ -514,7 +514,7 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- static BYTE const aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x26, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x26, 0x00,
0x19, 0x41, 0x62, 0x73, 0x61, 0x74, 0x7A, 0x2D,
@@ -526,20 +526,20 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- UINT16 n = 0;
+ sal_uInt16 n = 0;
m_rWW8Export.pTableStrm->Write( &n , 2 ); // leerer Style
}
}
// OutputStyle geht fuer TxtFmtColls und CharFmts
-void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
+void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos )
{
if ( !pFmt )
m_rExport.AttrOutput().DefaultStyle( nPos );
else
{
bool bFmtColl;
- USHORT nBase, nWwNext;
+ sal_uInt16 nBase, nWwNext;
GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
@@ -564,7 +564,7 @@ void WW8AttributeOutput::StartStyles()
{
WW8Fib& rFib = *m_rWW8Export.pFib;
- ULONG nCurPos = m_rWW8Export.pTableStrm->Tell();
+ sal_uLong nCurPos = m_rWW8Export.pTableStrm->Tell();
if ( nCurPos & 1 ) // Start auf gerader
{
*m_rWW8Export.pTableStrm << (char)0; // Adresse
@@ -575,7 +575,7 @@ void WW8AttributeOutput::StartStyles()
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE const aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x12, 0x00,
0x0F, 0x00, 0x0A, 0x00, 0x01, 0x00, 0x5B, 0x00,
0x0F, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -585,7 +585,7 @@ void WW8AttributeOutput::StartStyles()
}
else
{
- static BYTE const aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x0E, 0x00,
0x0F, 0x00, 0x08, 0x00, 0x01, 0x00, 0x4B, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x00, 0x00 };
@@ -593,7 +593,7 @@ void WW8AttributeOutput::StartStyles()
}
}
-void WW8AttributeOutput::EndStyles( USHORT nNumberOfStyles )
+void WW8AttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles )
{
WW8Fib& rFib = *m_rWW8Export.pFib;
@@ -607,7 +607,7 @@ void MSWordStyles::OutputStylesTable()
m_rExport.AttrOutput().StartStyles();
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
OutputStyle( pFmtA[n], n );
@@ -636,18 +636,18 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
if (bWrtWW8)
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
}
else
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 1 + msFamilyNm.Len() );
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 1 + msFamilyNm.Len() );
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 1 + msAltNm.Len());
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 1 + msAltNm.Len());
}
- BYTE aB = 0;
+ sal_uInt8 aB = 0;
switch(ePitch)
{
case PITCH_VARIABLE:
@@ -695,7 +695,7 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
rtl_getBestWindowsCharsetFromTextEncoding(eChrSet);
if (mbAlt)
- maWW8_FFN[5] = static_cast< BYTE >(msFamilyNm.Len() + 1);
+ maWW8_FFN[5] = static_cast< sal_uInt8 >(msFamilyNm.Len() + 1);
}
bool wwFont::Write(SvStream *pTableStrm) const
@@ -765,15 +765,15 @@ bool operator<(const wwFont &r1, const wwFont &r2)
}
-USHORT wwFontHelper::GetId(const wwFont &rFont)
+sal_uInt16 wwFontHelper::GetId(const wwFont &rFont)
{
- USHORT nRet;
- ::std::map<wwFont, USHORT>::const_iterator aIter = maFonts.find(rFont);
+ sal_uInt16 nRet;
+ ::std::map<wwFont, sal_uInt16>::const_iterator aIter = maFonts.find(rFont);
if (aIter != maFonts.end())
nRet = aIter->second;
else
{
- nRet = static_cast< USHORT >(maFonts.size());
+ nRet = static_cast< sal_uInt16 >(maFonts.size());
maFonts[rFont] = nRet;
}
return nRet;
@@ -807,28 +807,30 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc)
if (!bLoadAllFonts)
return;
- const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
- for (const USHORT* pId = aTypes; *pId; ++pId)
+ const sal_uInt16 aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
+ for (const sal_uInt16* pId = aTypes; *pId; ++pId)
{
- USHORT nMaxItem = rPool.GetItemCount( *pId );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem(
- *pId, nGet )) )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2( *pId );
+ for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet)
+ {
+ pFont = (const SvxFontItem*)rPool.GetItem2( *pId, nGet );
+ if (0 != pFont)
{
GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(),
pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8));
}
+ }
}
}
-USHORT wwFontHelper::GetId(const Font& rFont)
+sal_uInt16 wwFontHelper::GetId(const Font& rFont)
{
wwFont aFont(rFont.GetName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
return GetId(aFont);
}
-USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
+sal_uInt16 wwFontHelper::GetId(const SvxFontItem& rFont)
{
wwFont aFont(rFont.GetFamilyName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
@@ -839,7 +841,7 @@ USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
{
::std::vector<const wwFont *> aFontList( maFonts.size() );
- typedef ::std::map<wwFont, USHORT>::const_iterator myiter;
+ typedef ::std::map<wwFont, sal_uInt16>::const_iterator myiter;
myiter aEnd = maFonts.end();
for ( myiter aIter = maFonts.begin(); aIter != aEnd; ++aIter )
aFontList[aIter->second] = &aIter->first;
@@ -879,7 +881,7 @@ void wwFontHelper::WriteFontTable(SvStream *pTableStream, WW8Fib& rFib)
else
{
SwWW8Writer::WriteShort( *pTableStream, rFib.fcSttbfffn,
- (INT16)rFib.lcbSttbfffn );
+ (sal_Int16)rFib.lcbSttbfffn );
}
}
@@ -899,20 +901,21 @@ void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput )
::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) );
}
-WW8_WrPlc0::WW8_WrPlc0( ULONG nOffset )
+
+WW8_WrPlc0::WW8_WrPlc0( sal_uLong nOffset )
: aPos( 4, 4 ), nOfs( nOffset )
{
}
-void WW8_WrPlc0::Append( ULONG nStartCpOrFc )
+void WW8_WrPlc0::Append( sal_uLong nStartCpOrFc )
{
aPos.Insert( nStartCpOrFc - nOfs, aPos.Count() );
}
void WW8_WrPlc0::Write( SvStream& rStrm )
{
- USHORT nLen = aPos.Count();
- for( USHORT i = 0; i < nLen; ++i )
+ sal_uInt16 nLen = aPos.Count();
+ for( sal_uInt16 i = 0; i < nLen; ++i )
{
SVBT32 nP;
UInt32ToSVBT32( aPos[i], nP );
@@ -938,7 +941,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
const SwNode* pNd = rExport.pCurPam->GetCntntNode();
const SfxItemSet* pSet = pNd ? &((SwCntntNode*)pNd)->GetSwAttrSet() : 0;
- ULONG nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
+ sal_uLong nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
const SwTableNode* pTblNd = rExport.pCurPam->GetNode()->FindTableNode();
const SwSectionNode* pSectNd;
@@ -985,7 +988,7 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
{
// to be in sync with the AppendSection() call in the MSWordSections
// constructor
- aCps.Insert( ULONG( 0 ), aCps.Count() );
+ aCps.Insert( sal_uLong( 0 ), aCps.Count() );
}
MSWordSections::~MSWordSections()
@@ -994,7 +997,7 @@ MSWordSections::~MSWordSections()
WW8_WrPlcSepx::~WW8_WrPlcSepx()
{
- USHORT nLen = aSects.Count();
+ sal_uInt16 nLen = aSects.Count();
if( pAttrs )
{
while( nLen )
@@ -1047,7 +1050,7 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo()
}
void MSWordSections::AppendSection( const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
aSects.Insert( WW8_SepInfo( pPd, pSectionFmt, nLnNumRestartNo ),
aSects.Count() );
@@ -1055,7 +1058,7 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
if ( !bNoMoreSections )
{
@@ -1066,7 +1069,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
}
void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFmt, nLnNumRestartNo,
rPD.GetNumOffset(), &rNd );
@@ -1075,7 +1078,7 @@ void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
if ( !bNoMoreSections )
{
@@ -1096,14 +1099,14 @@ void MSWordSections::SetNum( const SwTxtNode* pNumNd )
rInfo.pNumNd = pNumNd;
}
-void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
+void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt )
{
- BYTE nInfoFlags = 0;
+ sal_uInt8 nInfoFlags = 0;
const SwFtnInfo& rInfo = rWrt.pDoc->GetFtnInfo();
if( rInfo.aErgoSum.Len() ) nInfoFlags |= 0x02;
if( rInfo.aQuoVadis.Len() ) nInfoFlags |= 0x04;
- BYTE nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
+ sal_uInt8 nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
if( nInfoFlags )
{
if( rWrt.bWrtWW8 )
@@ -1159,8 +1162,8 @@ void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
rDop.epc = rWrt.bEndAtTxtEnd ? 3 : 0;
}
-void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_HEADER, true, &pItem)
@@ -1169,8 +1172,8 @@ void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
rHeadFootFlags |= nFlag;
}
-void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_FOOTER, true, &pItem)
@@ -1180,8 +1183,8 @@ void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
}
void WW8_WrPlcSepx::OutHeaderFooter( WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags,
- BYTE nFlag, BYTE nBreakCode)
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags,
+ sal_uInt8 nFlag, sal_uInt8 nBreakCode)
{
if ( nFlag & nHFFlags )
{
@@ -1231,7 +1234,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const
// 2 Werte werden gesetzt
// Dop.fFacingPages == Kopf-/Fusszeilen unterschiedlich
// Dop.fSwapBordersFacingPgs == gespiegelte Raender
- for( USHORT i = 0, nEnde = 0; i < aSects.Count(); ++i )
+ for( sal_uInt16 i = 0, nEnde = 0; i < aSects.Count(); ++i )
{
WW8_SepInfo& rSepInfo = aSects[i];
if( !rSepInfo.pSectionFmt )
@@ -1307,21 +1310,21 @@ void WW8AttributeOutput::SectionFormProtection( bool bProtected )
}
}
-void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo )
+void WW8AttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
{
// sprmSNLnnMod - activate Line Numbering and define Modulo
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNLnnMod );
else
m_rWW8Export.pO->Insert( 154, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetCountBy() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetCountBy() );
// sprmSDxaLnn - xPosition of Line Number
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SDxaLnn );
else
m_rWW8Export.pO->Insert( 155, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetPosFromLeft() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetPosFromLeft() );
// sprmSLnc - restart number: 0 per page, 1 per section, 2 never restart
if ( nRestartNo || !rLnNumInfo.IsRestartEachPage() )
@@ -1340,7 +1343,7 @@ void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNum
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SLnnMin );
else
m_rWW8Export.pO->Insert( 160, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)nRestartNo - 1 );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)nRestartNo - 1 );
}
}
@@ -1358,7 +1361,7 @@ void WW8AttributeOutput::SectionPageBorders( const SwFrmFmt* pPdFmt, const SwFrm
{
if ( m_rWW8Export.bWrtWW8 ) // Seitenumrandung schreiben
{
- USHORT nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
+ sal_uInt16 nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
if ( pPdFmt != pPdFirstPgFmt )
{
if ( MSWordSections::HasBorderItem( *pPdFirstPgFmt ) )
@@ -1394,10 +1397,10 @@ void WW8AttributeOutput::SectionBiDi( bool bBiDi )
}
}
-void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// sprmSNfcPgn
- BYTE nb = WW8Export::GetNumId( nNumType );
+ sal_uInt8 nb = WW8Export::GetNumId( nNumType );
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNfcPgn );
else
@@ -1422,7 +1425,7 @@ void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
}
}
-void WW8AttributeOutput::SectionType( BYTE nBreakCode )
+void WW8AttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
if ( 2 != nBreakCode ) // new page is the default
{
@@ -1434,11 +1437,11 @@ void WW8AttributeOutput::SectionType( BYTE nBreakCode )
}
}
-void WW8AttributeOutput::SectionWW6HeaderFooterFlags( BYTE nHeadFootFlags )
+void WW8AttributeOutput::SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags )
{
if ( nHeadFootFlags && !m_rWW8Export.bWrtWW8 )
{
- BYTE nTmpFlags = nHeadFootFlags;
+ sal_uInt8 nTmpFlags = nHeadFootFlags;
if ( m_rWW8Export.pDop->fFacingPages )
{
if ( !(nTmpFlags & WW8_FOOTER_EVEN) && (nTmpFlags & WW8_FOOTER_ODD ) )
@@ -1462,7 +1465,7 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
if ( pO->Count() )
{ // waren Attrs vorhanden ?
pA->nLen = pO->Count();
- pA->pData = new BYTE [pO->Count()];
+ pA->pData = new sal_uInt8 [pO->Count()];
memcpy( pA->pData, pO->GetData(), pO->Count() ); // -> merken
pO->Remove( 0, pO->Count() ); // leeren fuer HdFt-Text
}
@@ -1473,10 +1476,10 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
}
}
-void WW8Export::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode )
+void WW8Export::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode )
{
- ULONG nCpPos = Fc2Cp( Strm().Tell() );
+ sal_uLong nCpPos = Fc2Cp( Strm().Tell() );
IncrementHdFtIndex();
if ( !(nHeadFootFlags & WW8_HEADER_EVEN) && pDop->fFacingPages )
@@ -1529,7 +1532,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
/* sprmSBkc, break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
*/
- BYTE nBreakCode = 2; // default neue Seite beginnen
+ sal_uInt8 nBreakCode = 2; // default neue Seite beginnen
bool bOutPgDscSet = true, bLeftRightPgChain = false;
const SwFrmFmt* pPdFmt = &pPd->GetMaster();
const SwFrmFmt* pPdFirstPgFmt = pPdFmt;
@@ -1687,7 +1690,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
}
// Header oder Footer
- BYTE nHeadFootFlags = 0;
+ sal_uInt8 nHeadFootFlags = 0;
const SwFrmFmt* pPdLeftFmt = bLeftRightPgChain
? &pPd->GetFollow()->GetMaster()
@@ -1747,7 +1750,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
{
pAttrs = new WW8_PdAttrDesc[ aSects.Count() ];
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
OSL_ENSURE( !pTxtPos, "wer hat den Pointer gesetzt?" );
pTxtPos = new WW8_WrPlc0( nCpStart );
@@ -1757,7 +1760,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
unsigned int nOldIndex = rWrt.GetHdFtIndex();
rWrt.SetHdFtIndex( 0 );
- for ( USHORT i = 0; i < aSects.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aSects.Count(); ++i )
{
WW8_PdAttrDesc* pA = pAttrs + i;
pA->pData = 0;
@@ -1774,7 +1777,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
if ( pTxtPos->Count() )
{
// HdFt vorhanden ?
- ULONG nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos->Append( nCpEnd ); // Ende letzter Hd/Ft fuer PlcfHdd
if ( nCpEnd > nCpStart )
@@ -1795,7 +1798,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aSects.Count(); i++ ) // ueber alle Sections
{
WW8_PdAttrDesc* pA = pAttrs + i;
@@ -1813,13 +1816,13 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const
{
OSL_ENSURE( aCps.Count() == aSects.Count() + 1, "WrPlcSepx: DeSync" );
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uInt16 i;
// ( ueber alle Sections )
for( i = 0; i <= aSects.Count(); i++ )
{
- UINT32 nP = aCps[i];
+ sal_uInt32 nP = aCps[i];
SVBT32 nPos;
UInt32ToSVBT32( nP, nPos );
rWrt.pTableStrm->Write( nPos, 4 );
@@ -1874,8 +1877,8 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader )
{
SwNodeIndex aIdx( *pSttIdx, 1 ),
aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
// Bereich also gueltiger Node
if ( nStart < nEnd )
@@ -1957,20 +1960,20 @@ bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline )
WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations()
{
- for( USHORT n=0; n < aCntnt.Count(); n++ )
+ for( sal_uInt16 n=0; n < aCntnt.Count(); n++ )
delete (WW8_Annotation*)aCntnt[n];
}
-bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
+bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_CP& rCount )
{
- USHORT nLen = aCntnt.Count();
+ sal_uInt16 nLen = aCntnt.Count();
if ( !nLen )
return false;
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos = new WW8_WrPlc0( nCpStart );
- USHORT i;
+ sal_uInt16 i;
switch ( nTTyp )
{
@@ -2006,7 +2009,7 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
const SdrObject& rObj = *(SdrObject*)aCntnt[ i ];
if (rObj.GetObjInventor() == FmFormInventor)
{
- BYTE nOldTyp = rWrt.nTxtTyp;
+ sal_uInt8 nOldTyp = rWrt.nTxtTyp;
rWrt.nTxtTyp = nTTyp;
rWrt.GetOCXExp().ExportControl(rWrt,&rObj);
rWrt.nTxtTyp = nOldTyp;
@@ -2087,13 +2090,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
return ( rCount != 0 );
}
-void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
+void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_FC& rTxtStart, sal_Int32& rTxtCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const
{
typedef ::std::vector<String>::iterator myiter;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT nLen = aCps.Count();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 nLen = aCps.Count();
if ( !nLen )
return;
@@ -2101,7 +2104,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
::std::vector<String> aStrArr;
WW8Fib& rFib = *rWrt.pFib; // n+1-te CP-Pos nach Handbuch
- USHORT i;
+ sal_uInt16 i;
bool bWriteCP = true;
switch ( nTTyp )
@@ -2135,7 +2138,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
for ( i = 0; i < aStrArr.size(); ++i )
{
const String& rStr = aStrArr[i];
- *rWrt.pTableStrm << (BYTE)rStr.Len();
+ *rWrt.pTableStrm << (sal_uInt8)rStr.Len();
SwWW8Writer::WriteString8(*rWrt.pTableStrm, rStr, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -2181,7 +2184,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
// write textbox story - FTXBXS
// is it an writer or sdr - textbox?
const SdrObject* pObj = (SdrObject*)aCntnt[ i ];
- INT32 nCnt = 1;
+ sal_Int32 nCnt = 1;
if ( !pObj->ISA( SdrTextObj ) )
{
// find the "highest" SdrObject of this
@@ -2240,7 +2243,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
"Impossible");
sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin());
String sAuthor(*aIter);
- BYTE nNameLen = (BYTE)sAuthor.Len();
+ sal_uInt8 nNameLen = (sal_uInt8)sAuthor.Len();
if ( nNameLen > 9 )
{
sAuthor.Erase( 9 );
@@ -2274,7 +2277,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
}
else
{
- USHORT nNo = 0;
+ sal_uInt16 nNo = 0;
for ( i = 0; i < nLen; ++i ) // Schreibe Flags
{
const SwFmtFtn* pFtn = (SwFmtFtn*)aCntnt[ i ];
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0619a8185166..9f63574adfd5 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -111,6 +111,8 @@
#include "dbgoutsw.hxx"
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <svl/stritem.hxx>
#include <unotools/tempfile.hxx>
#include <filter/msfilter/mscodec.hxx>
@@ -127,42 +129,42 @@ using namespace sw::types;
*/
class WW8_WrFkp
{
- BYTE* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
- BYTE* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
+ sal_uInt8* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
+ sal_uInt8* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
ePLCFT ePlc;
short nStartGrp; // ab hier grpprls
short nOldStartGrp;
- BYTE nItemSize;
- BYTE nIMax; // Anzahl der Eintrags-Paare
- BYTE nOldVarLen;
- BYTE nMark;
+ sal_uInt8 nItemSize;
+ sal_uInt8 nIMax; // Anzahl der Eintrags-Paare
+ sal_uInt8 nOldVarLen;
+ sal_uInt8 nMark;
bool bCombined; // true : Einfuegen verboten
- BYTE SearchSameSprm( USHORT nVarLen, const BYTE* pSprms );
+ sal_uInt8 SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms );
public:
WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8);
~WW8_WrFkp();
- bool Append( WW8_FC nEndFc, USHORT nVarLen = 0, const BYTE* pSprms = 0 );
+ bool Append( WW8_FC nEndFc, sal_uInt16 nVarLen = 0, const sal_uInt8* pSprms = 0 );
bool Combine();
void Write( SvStream& rStrm, SwWW8WrGrf& rGrf );
bool IsEqualPos(WW8_FC nEndFc) const
- { return !bCombined && nIMax && nEndFc == ((INT32*)pFkp)[nIMax]; }
- void MergeToNew( short& rVarLen, BYTE *& pNewSprms );
+ { return !bCombined && nIMax && nEndFc == ((sal_Int32*)pFkp)[nIMax]; }
+ void MergeToNew( short& rVarLen, sal_uInt8 *& pNewSprms );
bool IsEmptySprm() const
{ return !bCombined && nIMax && !nOldVarLen; }
void SetNewEnd( WW8_FC nEnd )
- { ((INT32*)pFkp)[nIMax] = nEnd; }
+ { ((sal_Int32*)pFkp)[nIMax] = nEnd; }
#ifdef __WW8_NEEDS_COPY
WW8_FC GetStartFc() const;
WW8_FC GetEndFc() const;
#else
- WW8_FC GetStartFc() const { return ((INT32*)pFkp)[0]; };
- WW8_FC GetEndFc() const { return ((INT32*)pFkp)[nIMax]; };
+ WW8_FC GetStartFc() const { return ((sal_Int32*)pFkp)[0]; };
+ WW8_FC GetEndFc() const { return ((sal_Int32*)pFkp)[nIMax]; };
#endif // defined __WW8_NEEDS_COPY
- BYTE *CopyLastSprms(BYTE &rLen, bool bVer8);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen, bool bVer8);
};
@@ -174,7 +176,7 @@ class WW8_WrPc
{
WW8_CP nStartCp; // Start ZeichenPosition vom Text
WW8_FC nStartFc; // Start File Position vom Text
- USHORT nStatus; // Absatzende im Piece ?
+ sal_uInt16 nStatus; // Absatzende im Piece ?
public:
WW8_WrPc(WW8_FC nSFc, WW8_CP nSCp )
@@ -182,7 +184,7 @@ public:
{}
void SetStatus() { nStatus = 0x0050; }
- USHORT GetStatus() const { return nStatus; }
+ sal_uInt16 GetStatus() const { return nStatus; }
WW8_CP GetStartCp() const { return nStartCp; }
WW8_FC GetStartFc() const { return nStartFc; }
};
@@ -192,11 +194,11 @@ class WW8_WrtBookmarks
private:
//! Holds information about a single bookmark.
struct BookmarkInfo {
- ULONG startPos; //!< Starting character position.
- ULONG endPos; //!< Ending character position.
+ sal_uLong startPos; //!< Starting character position.
+ sal_uLong endPos; //!< Ending character position.
bool isField; //!< True if the bookmark is in a field result.
String name; //!< Name of this bookmark.
- inline BookmarkInfo(ULONG start, ULONG end, bool isFld, const String& bkName) : startPos(start), endPos(end), isField(isFld), name(bkName) {};
+ inline BookmarkInfo(sal_uLong start, sal_uLong end, bool isFld, const String& bkName) : startPos(start), endPos(end), isField(isFld), name(bkName) {};
//! Operator < is defined purely for sorting.
inline bool operator<(const BookmarkInfo &other) const { return startPos < other.startPos; }
};
@@ -218,7 +220,7 @@ public:
//! Write out bookmarks to file.
void Write( WW8Export& rWrt );
//! Move existing field marks from one position to another.
- void MoveFieldMarks(ULONG nFrom,ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom,sal_uLong nTo);
};
@@ -229,7 +231,7 @@ public:
#define sCompObj CREATE_CONST_ASC("\1CompObj")
-SV_IMPL_VARARR( WW8Bytes, BYTE )
+SV_IMPL_VARARR( WW8Bytes, sal_uInt8 )
SV_IMPL_PTRARR( WW8_WrFkpPtrs, WW8_FkpPtr )
typedef WW8_WrPc* WW8_WrPcPtr;
@@ -250,7 +252,7 @@ static void WriteDop( WW8Export& rWrt )
// default TabStop schreiben
const SvxTabStopItem& rTabStop =
DefaultItemGet<SvxTabStopItem>(*rWrt.pDoc, RES_PARATR_TABSTOP);
- rDop.dxaTab = (USHORT)rTabStop[0].GetTabPos();
+ rDop.dxaTab = (sal_uInt16)rTabStop[0].GetTabPos();
// Werte aus der DocStatistik (werden aufjedenfall fuer die
@@ -260,7 +262,7 @@ static void WriteDop( WW8Export& rWrt )
const SwDocStat& rDStat = rWrt.pDoc->GetDocStat();
rDop.cWords = rDStat.nWord;
rDop.cCh = rDStat.nChar;
- rDop.cPg = static_cast< INT16 >(rDStat.nPage);
+ rDop.cPg = static_cast< sal_Int16 >(rDStat.nPage);
rDop.cParas = rDStat.nPara;
rDop.cLines = rDStat.nPara;
@@ -316,7 +318,7 @@ static void WriteDop( WW8Export& rWrt )
// und noch fuer die Header und Footers
rDop.cWordsFtnEnd = rDStat.nWord;
rDop.cChFtnEdn = rDStat.nChar;
- rDop.cPgFtnEdn = (INT16)rDStat.nPage;
+ rDop.cPgFtnEdn = (sal_Int16)rDStat.nPage;
rDop.cParasFtnEdn = rDStat.nPara;
rDop.cLinesFtnEdn = rDStat.nPara;
@@ -450,7 +452,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
const i18n::ForbiddenCharacters *pForbidden = 0;
const i18n::ForbiddenCharacters *pUseMe = 0;
- BYTE nUseReserved=0;
+ sal_uInt8 nUseReserved=0;
int nNoNeeded=0;
/*
Now we have some minor difficult issues, to wit...
@@ -553,7 +555,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
// Es kann nur etwas gefunden werden, wenn diese Methode innerhalb
// der aufgerufenen Methoden WW8_SwAttrIter::OutAttr() und
// WW8Export::OutputItemSet() benutzt wird.
-const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
+const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pItem=0;
if (pISet)
@@ -575,7 +577,7 @@ const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
return pItem;
}
-const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
+const SfxPoolItem& MSWordExportBase::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pItem;
if (pISet)
@@ -599,11 +601,11 @@ const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
//------------------------------------------------------------------------------
-WW8_WrPlc1::WW8_WrPlc1( USHORT nStructSz )
+WW8_WrPlc1::WW8_WrPlc1( sal_uInt16 nStructSz )
: aPos( 16, 16 ), nStructSiz( nStructSz )
{
nDataLen = 16 * nStructSz;
- pData = new BYTE[ nDataLen ];
+ pData = new sal_uInt8[ nDataLen ];
}
WW8_WrPlc1::~WW8_WrPlc1()
@@ -613,18 +615,18 @@ WW8_WrPlc1::~WW8_WrPlc1()
WW8_CP WW8_WrPlc1::Prev() const
{
- USHORT nLen = aPos.Count();
+ sal_uInt16 nLen = aPos.Count();
OSL_ENSURE(nLen,"Prev called on empty list");
return nLen ? aPos[nLen-1] : 0;
}
void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
{
- ULONG nInsPos = aPos.Count() * nStructSiz;
+ sal_uLong nInsPos = aPos.Count() * nStructSiz;
aPos.Insert( nCp, aPos.Count() );
if( nDataLen < nInsPos + nStructSiz )
{
- BYTE* pNew = new BYTE[ 2 * nDataLen ];
+ sal_uInt8* pNew = new sal_uInt8[ 2 * nDataLen ];
memmove( pNew, pData, nDataLen );
delete[] pData;
pData = pNew;
@@ -633,13 +635,13 @@ void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
memcpy( pData + nInsPos, pNewData, nStructSiz );
}
-void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
+void WW8_WrPlc1::Finish( sal_uLong nLastCp, sal_uLong nSttCp )
{
if( aPos.Count() )
{
aPos.Insert( nLastCp, aPos.Count() );
if( nSttCp )
- for( USHORT n = 0; n < aPos.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPos.Count(); ++n )
aPos[ n ] -= nSttCp;
}
}
@@ -647,7 +649,7 @@ void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
void WW8_WrPlc1::Write( SvStream& rStrm )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aPos.Count(); ++i )
SwWW8Writer::WriteLong( rStrm, aPos[i] );
if( i )
@@ -709,7 +711,7 @@ bool WW8_WrPlcFld::Write( WW8Export& rWrt )
if( pfc && plc )
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
*pfc = nFcStart;
*plc = rWrt.pTableStrm->Tell() - nFcStart;
@@ -721,14 +723,14 @@ bool WW8_WrMagicTable::Write( WW8Export& rWrt )
{
if( WW8_WrPlc1::Count() <= 1 )
return false;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
rWrt.pFib->fcPlcfTch = nFcStart;
rWrt.pFib->lcbPlcfTch = rWrt.pTableStrm->Tell() - nFcStart;
return true;
}
-void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
+void WW8_WrMagicTable::Append( WW8_CP nCp, sal_uLong nData)
{
SVBT32 nLittle;
/*
@@ -745,9 +747,9 @@ void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
//--------------------------------------------------------------------------
-void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
+void SwWW8Writer::FillCount( SvStream& rStrm, sal_uLong nCount )
{
- static const UINT32 aNulls[16] =
+ static const sal_uInt32 aNulls[16] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 // 64 Byte
};
@@ -760,9 +762,9 @@ void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
rStrm.Write( aNulls, nCount ); // Rest ( 0 .. 64 Bytes ) schreiben
}
-ULONG SwWW8Writer::FillUntil( SvStream& rStrm, ULONG nEndPos )
+sal_uLong SwWW8Writer::FillUntil( SvStream& rStrm, sal_uLong nEndPos )
{
- ULONG nCurPos = rStrm.Tell();
+ sal_uLong nCurPos = rStrm.Tell();
if( !nEndPos ) // nEndPos == 0 -> next Page
nEndPos = (nCurPos + 0x1ff) & ~0x1ffUL;
@@ -791,22 +793,22 @@ WW8_WrPlcPn::~WW8_WrPlcPn()
aFkps.DeleteAndDestroy( 0, aFkps.Count() );
}
-BYTE *WW8_WrPlcPn::CopyLastSprms(BYTE &rLen)
+sal_uInt8 *WW8_WrPlcPn::CopyLastSprms(sal_uInt8 &rLen)
{
WW8_FkpPtr pF = aFkps.GetObject(aFkps.Count() - 1);
return pF->CopyLastSprms(rLen, rWrt.bWrtWW8);
}
-void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
+void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const sal_uInt8* pSprms)
{
WW8_FkpPtr pF = aFkps.GetObject( aFkps.Count() - 1 );
// big sprm? build the sprmPHugePapx
- BYTE* pNewSprms = (BYTE*)pSprms;
- BYTE aHugePapx[ 8 ];
+ sal_uInt8* pNewSprms = (sal_uInt8*)pSprms;
+ sal_uInt8 aHugePapx[ 8 ];
if( rWrt.bWrtWW8 && PAP == ePlc && 488 < nVarLen )
{
- BYTE* p = aHugePapx;
+ sal_uInt8* p = aHugePapx;
*p++ = *pSprms++; // set style Id
*p++ = *pSprms++;
nVarLen -= 2;
@@ -850,9 +852,9 @@ void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
void WW8_WrPlcPn::WriteFkps()
{
- nFkpStartPage = (USHORT) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
+ nFkpStartPage = (sal_uInt16) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
- for( USHORT i = 0; i < aFkps.Count(); i++ )
+ for( sal_uInt16 i = 0; i < aFkps.Count(); i++ )
aFkps.GetObject( i )->Write( rWrt.Strm(), *rWrt.pGrf );
if( CHP == ePlc )
@@ -869,8 +871,8 @@ void WW8_WrPlcPn::WriteFkps()
void WW8_WrPlcPn::WritePlc()
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 i;
for( i = 0; i < aFkps.Count(); i++ )
SwWW8Writer::WriteLong( *rWrt.pTableStrm,
@@ -907,25 +909,25 @@ WW8_WrFkp::WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8)
nItemSize( ( CHP == ePl ) ? 1 : ( bWrtWW8 ? 13 : 7 )),
nIMax(0), nOldVarLen(0), nMark(0), bCombined(false)
{
- pFkp = (BYTE*)new INT32[128]; // 512 Byte
- pOfs = (BYTE*)new INT32[128]; // 512 Byte
+ pFkp = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
+ pOfs = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
memset( pFkp, 0, 4 * 128 );
memset( pOfs, 0, 4 * 128 );
- ( (INT32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
+ ( (sal_Int32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
}
WW8_WrFkp::~WW8_WrFkp()
{
- delete[] (INT32 *)pFkp;
- delete[] (INT32 *)pOfs;
+ delete[] (sal_Int32 *)pFkp;
+ delete[] (sal_Int32 *)pOfs;
}
-BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
+sal_uInt8 WW8_WrFkp::SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
if( 3 < nVarLen )
{
// if the sprms contained picture-references then never equal!
- for( BYTE n = static_cast< BYTE >(nVarLen - 1); 3 < n; --n )
+ for( sal_uInt8 n = static_cast< sal_uInt8 >(nVarLen - 1); 3 < n; --n )
if( pSprms[ n ] == GRF_MAGIC_3 &&
pSprms[ n-1 ] == GRF_MAGIC_2 &&
pSprms[ n-2 ] == GRF_MAGIC_1 )
@@ -935,13 +937,13 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
short i;
for( i = 0; i < nIMax; i++ )
{
- BYTE nStart = pOfs[i * nItemSize];
+ sal_uInt8 nStart = pOfs[i * nItemSize];
if( nStart )
{ // Hat Sprms
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if( ( CHP == ePlc
? (*p++ == nVarLen)
- : (((USHORT)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
+ : (((sal_uInt16)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
&& !memcmp( p, pSprms, nVarLen ) )
return nStart; // gefunden
}
@@ -949,19 +951,19 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
return 0; // nicht gefunden
}
-BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
+sal_uInt8 *WW8_WrFkp::CopyLastSprms(sal_uInt8 &rLen, bool bVer8)
{
rLen=0;
- BYTE *pStart=0,*pRet=0;
+ sal_uInt8 *pStart=0,*pRet=0;
if (!bCombined)
pStart = pOfs;
else
pStart = pFkp + ( nIMax + 1 ) * 4;
- BYTE nStart = *(pStart + (nIMax-1) * nItemSize);
+ sal_uInt8 nStart = *(pStart + (nIMax-1) * nItemSize);
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if (!*p && bVer8)
p++;
@@ -971,13 +973,13 @@ BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
rLen = *p++;
if (PAP == ePlc)
rLen *= 2;
- pRet = new BYTE[rLen];
+ pRet = new sal_uInt8[rLen];
memcpy(pRet,p,rLen);
}
return pRet;
}
-bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
+bool WW8_WrFkp::Append( WW8_FC nEndFc, sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
OSL_ENSURE( !nVarLen || pSprms, "Item-Pointer fehlt" );
OSL_ENSURE( nVarLen < ( ( ePlc == PAP ) ? 497U : 502U ), "Sprms zu lang !" );
@@ -987,7 +989,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
OSL_ENSURE( !this, "Fkp::Append: Fkp is already combined" );
return false;
}
- INT32 n = ((INT32*)pFkp)[nIMax]; // letzter Eintrag
+ sal_Int32 n = ((sal_Int32*)pFkp)[nIMax]; // letzter Eintrag
if( nEndFc <= n )
{
OSL_ENSURE( nEndFc >= n, "+Fkp: FC rueckwaerts" );
@@ -998,7 +1000,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
return true; // ignorieren, keinen neuen Fkp anlegen
}
- BYTE nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
+ sal_uInt8 nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
// Kombinieren gleicher Eintraege
short nOffset=0, nPos = nStartGrp;
if (nVarLen && !nOldP)
@@ -1014,22 +1016,22 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
nPos &= 0xFFFE; // Pos fuer Sprms ( gerade Pos )
}
- if( (USHORT)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
+ if( (sal_uInt16)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
// Passt hinter CPs und Offsets ?
return false; // Nein
- ((INT32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
+ ((sal_Int32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
- nOldVarLen = (BYTE)nVarLen;
+ nOldVarLen = (sal_uInt8)nVarLen;
if( nVarLen && !nOldP )
{ // echt eintragen
nOldStartGrp = nStartGrp;
nStartGrp = nPos;
- pOfs[nIMax * nItemSize] = (BYTE)( nStartGrp >> 1 );
+ pOfs[nIMax * nItemSize] = (sal_uInt8)( nStartGrp >> 1 );
// ( DatenAnfg >> 1 ) eintragen
- BYTE nCnt = static_cast< BYTE >(CHP == ePlc
- ? ( nVarLen < 256 ) ? (BYTE) nVarLen : 255
+ sal_uInt8 nCnt = static_cast< sal_uInt8 >(CHP == ePlc
+ ? ( nVarLen < 256 ) ? (sal_uInt8) nVarLen : 255
: ( ( nVarLen + 1 ) >> 1 ));
pFkp[ nOffset ] = nCnt; // DatenLaenge eintragen
@@ -1053,14 +1055,14 @@ bool WW8_WrFkp::Combine()
memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize );
delete[] pOfs;
pOfs = 0;
- ((BYTE*)pFkp)[511] = nIMax;
+ ((sal_uInt8*)pFkp)[511] = nIMax;
bCombined = true;
#if defined OSL_BIGENDIAN // Hier werden nur die FCs gedreht, die
- USHORT i; // Sprms muessen an anderer Stelle gedreht
+ sal_uInt16 i; // Sprms muessen an anderer Stelle gedreht
// werden
- UINT32* p;
- for( i = 0, p = (UINT32*)pFkp; i <= nIMax; i++, p++ )
+ sal_uInt32* p;
+ for( i = 0, p = (sal_uInt32*)pFkp; i <= nIMax; i++, p++ )
*p = SWAPLONG( *p );
#endif // ifdef OSL_BIGENDIAN
@@ -1071,8 +1073,8 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
{
Combine(); // Falls noch nicht Combined
- BYTE* p; // Suche Magic fuer nPicLocFc
- BYTE* pEnd = pFkp + nStartGrp;
+ sal_uInt8* p; // Suche Magic fuer nPicLocFc
+ sal_uInt8* pEnd = pFkp + nStartGrp;
for( p = pFkp + 511 - 4; p >= pEnd; p-- )
{
if( *p != GRF_MAGIC_1 ) // Suche nach Signatur 0x12 0x34 0x56 0xXX
@@ -1089,23 +1091,23 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
rStrm.Write( pFkp, 512 );
}
-void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
+void WW8_WrFkp::MergeToNew( short& rVarLen, sal_uInt8 *& rpNewSprms )
{
- BYTE nStart = pOfs[ (nIMax-1) * nItemSize ];
+ sal_uInt8 nStart = pOfs[ (nIMax-1) * nItemSize ];
if( nStart )
{ // Hat Sprms
- BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
// old and new equal? Then copy only one into the new sprms
if( nOldVarLen == rVarLen && !memcmp( p+1, rpNewSprms, nOldVarLen ))
{
- BYTE* pNew = new BYTE[ nOldVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen ];
memcpy( pNew, p+1, nOldVarLen );
rpNewSprms = pNew;
}
else
{
- BYTE* pNew = new BYTE[ nOldVarLen + rVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen + rVarLen ];
memcpy( pNew, p+1, nOldVarLen );
memcpy( pNew + nOldVarLen, rpNewSprms, rVarLen );
@@ -1115,7 +1117,7 @@ void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
--nIMax;
// if this sprms dont used from others, remove it
bool bFnd = false;
- for (USHORT n = 0; n < nIMax; ++n)
+ for (sal_uInt16 n = 0; n < nIMax; ++n)
{
if (nStart == pOfs[n * nItemSize])
{
@@ -1140,14 +1142,14 @@ WW8_FC WW8_WrFkp::GetStartFc() const
// zurueckgedreht werden.
if( bCombined )
return SVBT32ToUInt32( pFkp ); // 0. Element
- return ((INT32*)pFkp)[0];
+ return ((sal_Int32*)pFkp)[0];
}
WW8_FC WW8_WrFkp::GetEndFc() const
{
if( bCombined )
return SVBT32ToUInt32( &(pFkp[nIMax*4]) ); // nIMax-tes SVBT32-Element
- return ((INT32*)pFkp)[nIMax];
+ return ((sal_Int32*)pFkp)[nIMax];
}
#endif // defined __WW8_NEEDS_COPY
@@ -1206,9 +1208,9 @@ void WW8_WrPct::AppendPc(WW8_FC nStartFc, bool bIsUnicode)
void WW8_WrPct::WritePc( WW8Export& rWrt )
{
- ULONG nPctStart;
- ULONG nOldPos, nEndPos;
- USHORT i;
+ sal_uLong nPctStart;
+ sal_uLong nOldPos, nEndPos;
+ sal_uInt16 i;
nPctStart = rWrt.pTableStrm->Tell(); // Beginn Piece-Table
*rWrt.pTableStrm << ( char )0x02; // Statusbyte PCT
@@ -1220,7 +1222,7 @@ void WW8_WrPct::WritePc( WW8Export& rWrt )
// die letzte Pos noch errechnen
- ULONG nStartCp = rWrt.pFib->fcMac - nOldFc;
+ sal_uLong nStartCp = rWrt.pFib->fcMac - nOldFc;
if( bIsUni )
nStartCp >>= 1; // Bei Unicode Anzahl der Zeichen / 2
nStartCp += pPcts->GetObject( i-1 )->GetStartCp();
@@ -1253,9 +1255,9 @@ void WW8_WrPct::SetParaBreak()
pPcts->GetObject( pPcts->Count() - 1)->SetStatus();
}
-WW8_CP WW8_WrPct::Fc2Cp( ULONG nFc ) const
+WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const
{
- OSL_ENSURE( nFc >= (ULONG)nOldFc, "FilePos liegt vorm letzten Piece" );
+ OSL_ENSURE( nFc >= (sal_uLong)nOldFc, "FilePos liegt vorm letzten Piece" );
OSL_ENSURE( pPcts->Count(), "Fc2Cp noch kein Piece vorhanden" );
nFc -= nOldFc;
@@ -1323,7 +1325,7 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
//before that we need a lookup table (sorted by start position) to link
//start and end positions.
// Start by sorting the end positions.
- std::vector<ULONG> aEndSortTab;
+ std::vector<sal_uLong> aEndSortTab;
aEndSortTab.reserve(aBookmarks.size());
for (BkmIter bIt = aBookmarks.begin(); bIt < aBookmarks.end(); ++bIt)
aEndSortTab.push_back(bIt->endPos);
@@ -1331,10 +1333,10 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
//Now write out the lookups.
//Note that in most cases, the positions in both vectors will be very close.
- for( ULONG i = 0; i < aBookmarks.size(); ++i )
+ for( sal_uLong i = 0; i < aBookmarks.size(); ++i )
{
- ULONG nEndCP = aBookmarks[ i ].endPos;
- USHORT nPos = i;
+ sal_uLong nEndCP = aBookmarks[ i ].endPos;
+ sal_uInt16 nPos = i;
if( aEndSortTab[ nPos ] > nEndCP )
{
while( aEndSortTab[ --nPos ] != nEndCP )
@@ -1349,7 +1351,7 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
// Finally, the actual Bookmark end positions.
rWrt.pFib->fcPlcfbkl = rStrm.Tell();
- for(ULONG i = 0; i < aEndSortTab.size(); ++i )
+ for(sal_uLong i = 0; i < aEndSortTab.size(); ++i )
SwWW8Writer::WriteLong( rStrm, aEndSortTab[ i ] );
SwWW8Writer::WriteLong(rStrm, rWrt.pFib->ccpText + rWrt.pFib->ccpTxbx);
rWrt.pFib->lcbPlcfbkl = rStrm.Tell() - rWrt.pFib->fcPlcfbkl;
@@ -1365,7 +1367,7 @@ WW8_WrtBookmarks::BkmIter WW8_WrtBookmarks::GetPos( const String& rNm )
return aBookmarks.end();
}
-void WW8_WrtBookmarks::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8_WrtBookmarks::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
for (BkmIter i = aBookmarks.begin(); i < aBookmarks.end(); ++i)
{
@@ -1385,12 +1387,12 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
xub_StrLen nAktPos, xub_StrLen nLen )
{
SvPtrarr aArr( 8, 8 );
- USHORT nCntnt;
+ sal_uInt16 nCntnt;
xub_StrLen nAktEnd = nAktPos + nLen;
if( GetWriter().GetBookmarks( rNd, nAktPos, nAktEnd, aArr ))
{
- ULONG nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ sal_uLong nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
::sw::mark::IMark& rBkmk = *(::sw::mark::IMark*)aArr[ n ];
if(dynamic_cast< ::sw::mark::IFieldmark *>(&rBkmk))
@@ -1411,28 +1413,28 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
( nCntnt = pPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd ) )
{
- ULONG nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
if( pOPos && nNd == pOPos->nNode.GetIndex() &&
( nCntnt = pOPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd )
{
- ULONG nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
}
}
}
-void WW8Export::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8Export::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
pBkmks->MoveFieldMarks(nFrom, nTo);
}
void WW8Export::AppendBookmark( const rtl::OUString& rName, bool bSkip )
{
- ULONG nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
+ sal_uLong nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
pBkmks->Append( nSttCP, rName );
}
@@ -1452,7 +1454,7 @@ void WW8_WrtRedlineAuthor::Write( Writer& rWrt )
rWW8Wrt.pFib->lcbSttbfRMark, rWW8Wrt.bWrtWW8 ? 0 : 2);
}
-USHORT WW8Export::AddRedlineAuthor( USHORT nId )
+sal_uInt16 WW8Export::AddRedlineAuthor( sal_uInt16 nId )
{
if( !pRedlAuthors )
{
@@ -1466,9 +1468,9 @@ USHORT WW8Export::AddRedlineAuthor( USHORT nId )
/* */
void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
- INT32& rfcSttbf, INT32& rlcbSttbf, USHORT nExtraLen)
+ sal_Int32& rfcSttbf, sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen)
{
- USHORT n, nCount = static_cast< USHORT >(rStrings.size());
+ sal_uInt16 n, nCount = static_cast< sal_uInt16 >(rStrings.size());
if( nCount )
{
// we have some Redlines found in the document -> the
@@ -1494,7 +1496,7 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
for( n = 0; n < nCount; ++n )
{
const String aNm(rStrings[n].Copy(0, 255));
- rStrm << (BYTE)aNm.Len();
+ rStrm << (sal_uInt8)aNm.Len();
SwWW8Writer::WriteString8(rStrm, aNm, false,
RTL_TEXTENCODING_MS_1252);
if (nExtraLen)
@@ -1503,23 +1505,23 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
}
rlcbSttbf = rStrm.Tell() - rfcSttbf;
if( !bWrtWW8 )
- SwWW8Writer::WriteShort( rStrm, rfcSttbf, (USHORT)rlcbSttbf );
+ SwWW8Writer::WriteShort( rStrm, rfcSttbf, (sal_uInt16)rlcbSttbf );
}
}
// WriteShort() traegt an FilePos nPos den Wert nVal ein und seekt auf die
// alte FilePos zurueck. Benutzt zum Nachtragen von Laengen.
-void SwWW8Writer::WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal )
+void SwWW8Writer::WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteShort( rStrm, nVal );
rStrm.Seek( nOldPos );
}
-void SwWW8Writer::WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal )
+void SwWW8Writer::WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteLong( rStrm, nVal );
rStrm.Seek( nOldPos );
@@ -1563,13 +1565,13 @@ void SwWW8Writer::InsAsString8(ww::bytes &rO, const String& rStr,
#ifdef __WW8_NEEDS_COPY
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
SVBT16 nL;
ShortToSVBT16( n, nL );
rO.Insert( nL, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
SVBT32 nL;
UInt32ToSVBT32( n, nL );
@@ -1578,13 +1580,13 @@ void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
#else
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
- rO.Insert( (BYTE*)&n, 2, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
- rO.Insert( (BYTE*)&n, 4, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 4, rO.Count() );
}
#endif // defined __WW8_NEEDS_COPY
@@ -1600,7 +1602,7 @@ void SwWW8Writer::InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet )
{
ByteString sTmp( rStr, eCodeSet );
- rO.Insert( (BYTE*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
+ rO.Insert( (sal_uInt8*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
}
void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
@@ -1640,7 +1642,7 @@ void SwWW8Writer::WriteString8(SvStream& rStrm, const String& rStr,
rStrm.Write(&aBytes[0], aBytes.size());
}
-void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
+void WW8Export::WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId )
{
if( rTxt.Len() )
OutSwString( rTxt, 0, rTxt.Len(), IsUnicode(), RTL_TEXTENCODING_MS_1252 );
@@ -1658,14 +1660,14 @@ void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
aArr.Insert( 1, aArr.Count() );
}
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( nPos, aArr.Count(), aArr.GetData() );
pChpPlc->AppendFkpEntry( nPos );
}
-void MSWordExportBase::WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp )
+void MSWordExportBase::WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp )
{
- BYTE nOldTyp = nTxtTyp;
+ sal_uInt8 nOldTyp = nTxtTyp;
nTxtTyp = nTTyp;
SwPaM* pOldPam = pCurPam; //!! Einfaches Umsetzen des PaM ohne
SwPaM* pOldEnd = pOrigPam; // Wiederherstellen muesste es auch tun
@@ -1752,10 +1754,10 @@ void WW8Export::WriteChar( sal_Unicode c )
if( pPiece->IsUnicode() )
Strm() << c;
else
- Strm() << (BYTE)c;
+ Strm() << (sal_uInt8)c;
}
-void MSWordExportBase::SaveData( ULONG nStt, ULONG nEnd )
+void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordSaveData aData;
@@ -1823,7 +1825,7 @@ void MSWordExportBase::RestoreData()
maSaveData.pop();
}
-void WW8Export::SaveData( ULONG nStt, ULONG nEnd )
+void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordExportBase::SaveData( nStt, nEnd );
@@ -1876,14 +1878,14 @@ void WW8AttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pT
{
/* Cell */
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
m_rWW8Export.InsUInt32( nDepth );
if ( nDepth > 1 && pTableTextNodeInfoInner->isEndOfCell() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
}
}
@@ -1898,12 +1900,12 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( pTableTextNodeInfoInner->isEndOfLine() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
if ( nDepth == 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFTtp );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
@@ -1912,9 +1914,9 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( nDepth > 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PRow );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
TableDefinition( pTableTextNodeInfoInner );
@@ -1973,8 +1975,8 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrmFmt ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TTextFlow );
- m_rWW8Export.pO->Insert( BYTE(n), m_rWW8Export.pO->Count() ); //start range
- m_rWW8Export.pO->Insert( BYTE(n + 1), m_rWW8Export.pO->Count() ); //end range
+ m_rWW8Export.pO->Insert( sal_uInt8(n), m_rWW8Export.pO->Count() ); //start range
+ m_rWW8Export.pO->Insert( sal_uInt8(n + 1), m_rWW8Export.pO->Count() ); //end range
m_rWW8Export.InsUInt16( 5 ); //Equals vertical writing
}
}
@@ -1993,7 +1995,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT
*/
const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit();
- BYTE nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
+ sal_uInt8 nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TFCantSplit );
@@ -2045,7 +2047,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab
m_rWW8Export.InsUInt16( NS_sprm::LN_TDyaRowHeight );
else
m_rWW8Export.pO->Insert( 189, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)nHeight );
+ m_rWW8Export.InsUInt16( (sal_uInt16)nHeight );
}
}
@@ -2146,7 +2148,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nSprmSize ); // length
// number of boxes
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes), m_rWW8Export.pO->Count() );
/* cellxs */
/*
@@ -2195,7 +2197,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
for ( ww8::GridCols::const_iterator it = pGridCols->begin(),
end = pGridCols->end(); it != end; ++it )
{
- m_rWW8Export.InsUInt16( static_cast<USHORT>( *it ) + nTblOffset );
+ m_rWW8Export.InsUInt16( static_cast<sal_uInt16>( *it ) + nTblOffset );
}
/* TCs */
@@ -2229,7 +2231,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nFlags );
}
- static BYTE aNullBytes[] = { 0x0, 0x0 };
+ static sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy
if (pBoxFmt != NULL)
@@ -2328,7 +2330,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
//Set Default, just taken from the first cell of the first
//row
- static USHORT aBorders[] =
+ static sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT
@@ -2337,11 +2339,11 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
for ( int i = 0; i < 4; ++i )
{
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, 0xD634 );
- m_rWW8Export.pO->Insert( BYTE(6), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(0), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1 << i), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(3), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(6), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(0), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1 << i), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(3), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO,
pFrmFmt->GetBox().GetDistance( aBorders[i] ) );
@@ -2358,8 +2360,8 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTableShd );
else
- m_rWW8Export.pO->Insert( (BYTE)191, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( (BYTE)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
+ m_rWW8Export.pO->Insert( (sal_uInt8)191, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
for ( sal_uInt8 n = 0; n < nBoxes; n++ )
{
@@ -2390,7 +2392,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
for (sal_uInt32 m = 0; m < 2; m++)
{
m_rWW8Export.InsUInt16( aSprmIds[m] );
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes0 * 10),
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes0 * 10),
m_rWW8Export.pO->Count() );
for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
@@ -2494,7 +2496,7 @@ void MSWordExportBase::WriteText()
if ( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if ( aIdx.GetNode().IsCntntNode() )
nRstLnNum = ((SwCntntNode&)aIdx.GetNode()).GetSwAttrSet().
GetLineNumber().GetStartValue();
@@ -2524,7 +2526,7 @@ void MSWordExportBase::WriteText()
else
pCurPam->GetPoint()->nNode++;
- ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex();
::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() );
}
@@ -2571,7 +2573,7 @@ void WW8Export::WriteFkpPlcUsw()
{
if( !bWrtWW8 )
{
- static const BYTE aSpec[2] =
+ static const sal_uInt8 aSpec[2] =
{
117, 1
};
@@ -2733,8 +2735,8 @@ void WW8Export::StoreDoc1()
SwWW8Writer::FillUntil( Strm(), pFib->fcMin );
WriteMainText(); // HauptText
- BYTE nSprmsLen;
- BYTE *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
+ sal_uInt8 nSprmsLen;
+ sal_uInt8 *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
bNeedsFinalPara |= pFtn->WriteTxt( *this ); // Footnote-Text
bNeedsFinalPara |= pSepx->WriteKFTxt( *this ); // K/F-Text
@@ -2790,7 +2792,7 @@ void MSWordExportBase::AddLinkTarget(const String& rURL)
// node index number of where it points to
if( pDoc->GotoOutline( aPos, aOutline ) )
{
- ULONG nIdx = aPos.nNode.GetIndex();
+ sal_uLong nIdx = aPos.nNode.GetIndex();
aBookmarkPair aImplicitBookmark;
aImplicitBookmark.first = aOutline;
aImplicitBookmark.second = nIdx;
@@ -2805,10 +2807,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -2819,17 +2821,17 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
}
const SwFmtURL *pURL;
- nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_URL );
+ nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem2(
RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
const ImageMap *pIMap = pURL->GetMap();
if( pIMap )
{
- for( USHORT i=0; i<pIMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0; i<pIMap->GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = pIMap->GetIMapObject( i );
if( pObj )
@@ -2844,18 +2846,18 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
namespace
{
- const ULONG WW_BLOCKSIZE = 0x200;
+ const sal_uLong WW_BLOCKSIZE = 0x200;
void EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(0);
sal_uInt8 in[WW_BLOCKSIZE];
- for (ULONG nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
+ for (sal_uLong nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
{
- ULONG nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
+ sal_uLong nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
rIn.Read(in, nBS);
rCtx.InitCipher(nBlock);
rCtx.Encode(in, nBS, in, nBS);
@@ -2891,7 +2893,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
if ( !pOLEExp )
{
- UINT32 nSvxMSDffOLEConvFlags = 0;
+ sal_uInt32 nSvxMSDffOLEConvFlags = 0;
const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
if ( pOpt->IsMath2MathType() )
nSvxMSDffOLEConvFlags |= OLE_STARMATH_2_MATHTYPE;
@@ -2936,20 +2938,54 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
pDoc->SetRedlineMode( (RedlineMode_t)(mnRedlineMode) );
}
-String SwWW8Writer::GetPassword()
+bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec )
{
- String sUniPassword;
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+
if ( mpMedium )
{
- SfxItemSet* pSet = mpMedium->GetItemSet();
+ SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionDataItem && ( pEncryptionDataItem->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ {
+ OSL_ENSURE( false, "Unexpected EncryptionData!" );
+ aEncryptionData.realloc( 0 );
+ }
+
+ if ( !aEncryptionData.getLength() )
+ {
+ // try to generate the encryption data based on password
+ SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False );
+ if ( pPasswordItem && pPasswordItem->GetValue().Len() && pPasswordItem->GetValue().Len() <= 15 )
+ {
+ // Generate random number with a seed of time as salt.
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool ();
+ rtl_random_addBytes ( aRandomPool, &aTime, 8 );
- const SfxPoolItem* pPasswordItem = NULL;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pPasswordItem ) )
- if( pPasswordItem != NULL )
- sUniPassword = ( (const SfxStringItem*)pPasswordItem )->GetValue();
+ sal_uInt8 pDocId[ 16 ];
+ rtl_random_getBytes( aRandomPool, pDocId, 16 );
+
+ rtl_random_destroyPool( aRandomPool );
+
+ sal_Unicode aPassword[16];
+ memset( aPassword, 0, sizeof( aPassword ) );
+ for ( xub_StrLen nChar = 0; nChar < pPasswordItem->GetValue().Len(); ++nChar )
+ aPassword[nChar] = pPasswordItem->GetValue().GetChar(nChar);
+
+ rCodec.InitKey( aPassword, pDocId );
+ aEncryptionData = rCodec.GetEncryptionData();
+
+ mpMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
+ }
+ }
+
+ if ( aEncryptionData.getLength() )
+ mpMedium->GetItemSet()->ClearItem( SID_PASSWORD );
}
- return sUniPassword;
+ // nonempty encryption data means hier that the codec was successfuly initialized
+ return ( aEncryptionData.getLength() != 0 );
}
void WW8Export::ExportDocument_Impl()
@@ -2983,8 +3019,6 @@ void WW8Export::ExportDocument_Impl()
Strm().SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- String sUniPassword( GetWriter().GetPassword() );
-
utl::TempFile aTempMain;
aTempMain.EnableKillingFile();
utl::TempFile aTempTable;
@@ -2992,13 +3026,10 @@ void WW8Export::ExportDocument_Impl()
utl::TempFile aTempData;
aTempData.EnableKillingFile();
- bool bEncrypt = false;
-
- xub_StrLen nLen = sUniPassword.Len();
- if ( nLen > 0 && nLen <= 15) // Password has been set
+ msfilter::MSCodec_Std97 aCtx;
+ bool bEncrypt = m_pWriter ? m_pWriter->InitStd97CodecUpdateMedium( aCtx ) : false;
+ if ( bEncrypt )
{
- bEncrypt =true;
-
GetWriter().SetStream(
aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) );
@@ -3062,24 +3093,6 @@ void WW8Export::ExportDocument_Impl()
if ( bEncrypt )
{
- // Generate random number with a seed of time as salt.
- TimeValue aTime;
- osl_getSystemTime( &aTime );
- rtlRandomPool aRandomPool = rtl_random_createPool ();
- rtl_random_addBytes ( aRandomPool, &aTime, 8 );
-
- sal_uInt8 aDocId[ 16 ] = {0};
- rtl_random_getBytes( aRandomPool, aDocId, 16 );
-
- rtl_random_destroyPool( aRandomPool );
-
- sal_Unicode aPassword[16] = {0};
- for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
- aPassword[nChar] = sUniPassword.GetChar(nChar);
-
- msfilter::MSCodec_Std97 aCtx;
- aCtx.InitKey(aPassword, aDocId);
-
SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp;
pStrmTemp = &xWwStrm;
pTableStrmTemp = &xTableStrm;
@@ -3096,11 +3109,14 @@ void WW8Export::ExportDocument_Impl()
sal_uInt32 nEncType = 0x10001;
*pTableStrmTemp << nEncType;
- sal_uInt8 pSaltData[16] = {0};
- sal_uInt8 pSaltDigest[16] = {0};
- aCtx.GetEncryptKey( aDocId, pSaltData, pSaltDigest );
+ sal_uInt8 pDocId[16];
+ aCtx.GetDocId( pDocId );
+
+ sal_uInt8 pSaltData[16];
+ sal_uInt8 pSaltDigest[16];
+ aCtx.GetEncryptKey( pDocId, pSaltData, pSaltDigest );
- pTableStrmTemp->Write( aDocId, 16 );
+ pTableStrmTemp->Write( pDocId, 16 );
pTableStrmTemp->Write( pSaltData, 16 );
pTableStrmTemp->Write( pSaltDigest, 16 );
@@ -3172,15 +3188,15 @@ void WW8Export::ExportDocument_Impl()
void WW8Export::PrepareStorage()
{
- ULONG nLen;
- const BYTE* pData;
+ sal_uLong nLen;
+ const sal_uInt8* pData;
const char* pName;
- UINT32 nId1;
+ sal_uInt32 nId1;
if (bWrtWW8)
{
static const char aUserName[] = "Microsoft Word-Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x09, 0x02, 0x00,
@@ -3206,7 +3222,7 @@ void WW8Export::PrepareStorage()
else
{
static const char aUserName[] = "Microsoft Word 6.0 Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x09, 0x02, 0x00,
@@ -3261,7 +3277,7 @@ void WW8Export::PrepareStorage()
}
}
-ULONG SwWW8Writer::WriteStorage()
+sal_uLong SwWW8Writer::WriteStorage()
{
// #i34818# - update layout (if present), for SwWriteTable
ViewShell* pViewShell = NULL;
@@ -3292,16 +3308,16 @@ ULONG SwWW8Writer::WriteStorage()
return 0;
}
-ULONG SwWW8Writer::WriteMedium( SfxMedium& )
+sal_uLong SwWW8Writer::WriteMedium( SfxMedium& )
{
return WriteStorage();
}
-ULONG SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
+sal_uLong SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
const String* pFileName )
{
mpMedium = &rMed;
- ULONG nRet = StgWriter::Write( rPaM, rMed, pFileName );
+ sal_uLong nRet = StgWriter::Write( rPaM, rMed, pFileName );
mpMedium = NULL;
return nRet;
}
@@ -3372,7 +3388,7 @@ SwWW8Writer::~SwWW8Writer()
{
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
{
SvxImportMSVBasic aTmp( rDoc, rStor );
return aTmp.SaveOrDelMSVBAStorage( bSaveInto, rStorageName );
@@ -3384,7 +3400,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const String& rFltName,
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
{
return SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS );
}
@@ -3527,11 +3543,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
if(pNameParameter != rFieldmark.GetParameters()->end())
pNameParameter->second >>= ffname;
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry(Strm().Tell());
WriteChar(0x01);
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
@@ -3539,7 +3555,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32(pDataAdr, nDataStt);
pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -3685,7 +3701,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2,
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2,
m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry
@@ -3703,7 +3719,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
#endif
m_rWW8Export.WriteCR(pNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3724,7 +3740,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3741,7 +3757,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
TableRowEnd(pNodeInfoInner->getDepth());
ShortToSVBT16(0, nStyle);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 0676f51e0610..a3a42d923386 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -54,6 +54,11 @@
// einige Forward Deklarationen
class SwWW8AttrIter;
+namespace msfilter
+{
+ class MSCodec_Std97;
+}
+
class AttributeOutputBase;
class DocxAttributeOutput;
class RtfAttributeOutput;
@@ -131,7 +136,7 @@ class SvxBrushItem;
#define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+
-typedef BYTE FieldFlags;
+typedef sal_uInt8 FieldFlags;
namespace nsFieldFlags // for InsertField- Method
{
const FieldFlags WRITEFIELD_START = 0x01;
@@ -148,7 +153,7 @@ enum TxtTypes //enums for TextTypes
TXT_EDN = 4, TXT_ATN = 5, TXT_TXTBOX = 6, TXT_HFTXTBOX= 7
};
-SV_DECL_VARARR( WW8Bytes, BYTE, 128, 128 )
+SV_DECL_VARARR( WW8Bytes, sal_uInt8, 128, 128 )
struct WW8_SepInfo
{
@@ -156,8 +161,8 @@ struct WW8_SepInfo
const SwSectionFmt* pSectionFmt;
const SwNode* pPDNd;
const SwTxtNode* pNumNd;
- ULONG nLnNumRestartNo;
- USHORT nPgRestartNo;
+ sal_uLong nLnNumRestartNo;
+ sal_uInt16 nPgRestartNo;
WW8_SepInfo()
: pPageDesc(0), pSectionFmt(0), pPDNd(0), pNumNd(0), nLnNumRestartNo(0), nPgRestartNo(0)
@@ -165,7 +170,7 @@ struct WW8_SepInfo
{}
WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFmt* pFmt,
- ULONG nLnRestart, USHORT nPgRestart = 0, const SwNode* pNd = NULL )
+ sal_uLong nLnRestart, sal_uInt16 nPgRestart = 0, const SwNode* pNd = NULL )
: pPageDesc( pPD ), pSectionFmt( pFmt ), pPDNd( pNd ), pNumNd( 0 ),
nLnNumRestartNo( nLnRestart ), nPgRestartNo( nPgRestart )
{}
@@ -196,11 +201,11 @@ public:
void AppendSection( const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSection( const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void SetNum( const SwTxtNode* pNumNd );
/// Number of columns based on the most recent WW8_SepInfo.
@@ -214,10 +219,10 @@ public:
/// The most recent WW8_SepInfo.
const WW8_SepInfo* CurrentSectionInfo();
- static void SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
- static void SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
+ static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
+ static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
/// Should we output borders?
static int HasBorderItem( const SwFmt& rFmt );
@@ -241,11 +246,11 @@ public:
void AppendSep( WW8_CP nStartCp,
const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void Finish( WW8_CP nEndCp ) { aCps.Insert( nEndCp, aCps.Count() ); }
bool WriteKFTxt( WW8Export& rWrt );
@@ -254,10 +259,10 @@ public:
void WritePlcHdd( WW8Export& rWrt ) const;
private:
- void WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt );
+ void WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt );
public:
void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags, BYTE nFlag, BYTE nBreakCode);
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
};
//--------------------------------------------------------------------------
@@ -275,7 +280,7 @@ public:
void WritePc( WW8Export& rWrt );
void SetParaBreak();
bool IsUnicode() const { return bIsUni; }
- WW8_CP Fc2Cp( ULONG nFc ) const;
+ WW8_CP Fc2Cp( sal_uLong nFc ) const;
};
/// Collects and outputs fonts.
@@ -284,7 +289,7 @@ class wwFont
//In some future land the stream could be converted to a nice stream interface
//and we could have harmony
private:
- BYTE maWW8_FFN[6];
+ sal_uInt8 maWW8_FFN[6];
String msFamilyNm;
String msAltNm;
bool mbAlt;
@@ -306,7 +311,7 @@ class wwFontHelper
{
private:
/// Keep track of fonts that need to be exported.
- ::std::map<wwFont, USHORT> maFonts;
+ ::std::map<wwFont, sal_uInt16> maFonts;
bool mbWrtWW8;
/// Convert from fast insertion map to linear vector in the order that we want to write.
@@ -316,25 +321,25 @@ public:
wwFontHelper() : mbWrtWW8(false), bLoadAllFonts(false) {}
/// rDoc used only to get the initial standard font(s) in use.
void InitFontTable(bool bWrtWW8, const SwDoc& rDoc);
- USHORT GetId(const Font& rFont);
- USHORT GetId(const SvxFontItem& rFont);
- USHORT GetId(const wwFont& rFont);
+ sal_uInt16 GetId(const Font& rFont);
+ sal_uInt16 GetId(const SvxFontItem& rFont);
+ sal_uInt16 GetId(const wwFont& rFont);
void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
void WriteFontTable( const DocxAttributeOutput& rAttrOutput );
void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
/// If true, all fonts are loaded before processing the document.
- BYTE bLoadAllFonts: 1;
+ sal_uInt8 bLoadAllFonts: 1;
};
class DrawObj
{
public:
WW8_CP mnCp; // CP-Pos der Verweise
- UINT32 mnShapeId; // ShapeId for the SwFrmFmts
+ sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts
sw::Frame maCntnt; // the frame itself
Point maParentPos; // Points
- INT32 mnThick; // Border Thicknesses
+ sal_Int32 mnThick; // Border Thicknesses
short mnDirection; // If BiDi or not
unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
// msword hd/ft
@@ -343,7 +348,7 @@ public:
unsigned int nHdFtIndex)
: mnCp(nCp), mnShapeId(0), maCntnt(rCntnt), maParentPos(aParentPos),
mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
- void SetShapeDetails(UINT32 nId, INT32 nThick);
+ void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
DrawObj& operator=(const DrawObj &rOther);
};
@@ -404,7 +409,7 @@ private:
HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&);
};
-typedef ::std::pair<String, ULONG> aBookmarkPair;
+typedef ::std::pair<String, sal_uLong> aBookmarkPair;
typedef std::vector<aBookmarkPair> SwImplBookmarks;
typedef std::vector<aBookmarkPair>::iterator SwImplBookmarksIter;
@@ -436,12 +441,12 @@ struct MSWordSaveData
const sw::Frame* pOldFlyFmt;
const SwPageDesc* pOldPageDesc;
- BYTE bOldWriteAll : 1; ///< WW8Export only
- BYTE bOldOutTable : 1;
- BYTE bOldIsInTable: 1;
- BYTE bOldFlyFrmAttrs : 1;
- BYTE bOldStartTOX : 1;
- BYTE bOldInWriteTOX : 1;
+ sal_uInt8 bOldWriteAll : 1; ///< WW8Export only
+ sal_uInt8 bOldOutTable : 1;
+ sal_uInt8 bOldIsInTable: 1;
+ sal_uInt8 bOldFlyFrmAttrs : 1;
+ sal_uInt8 bOldStartTOX : 1;
+ sal_uInt8 bOldInWriteTOX : 1;
// bOutPageDesc muss nicht gesichert werden, da es nur nicht waehrend der
// Ausgabe von Spezial-Texten veraendert wird.
};
@@ -451,15 +456,15 @@ class MSWordExportBase
{
public:
wwFontHelper maFontHelper;
- std::vector<ULONG> maChapterFieldLocs;
- typedef std::vector<ULONG>::const_iterator mycCFIter;
+ std::vector<sal_uLong> maChapterFieldLocs;
+ typedef std::vector<sal_uLong>::const_iterator mycCFIter;
String aMainStg;
SvPtrarr aTOXArr;
const SfxItemSet* pISet; // fuer Doppel-Attribute
WW8_WrPct* pPiece; // Pointer auf Piece-Table
SwNumRuleTbl* pUsedNumTbl; // alle used NumRules
const SwTxtNode *mpTopNodeOfHdFtPage; ///< Top node of host page when in hd/ft
- std::map< USHORT, USHORT > aRuleDuplicates; //map to Duplicated numrules
+ std::map< sal_uInt16, sal_uInt16 > aRuleDuplicates; //map to Duplicated numrules
std::stack< xub_StrLen > m_aCurrentCharPropStarts; ///< To remember the position in a run.
WW8_WrtBookmarks* pBkmks;
WW8_WrtRedlineAuthor* pRedlAuthors;
@@ -470,15 +475,15 @@ public:
WW8OleMaps* pOleMap;
ww8::WW8TableInfo::Pointer_t mpTableInfo;
- USHORT nCharFmtStart;
- USHORT nFmtCollStart;
- USHORT nStyleBeforeFly; ///< Style-Nummer des Nodes,
+ sal_uInt16 nCharFmtStart;
+ sal_uInt16 nFmtCollStart;
+ sal_uInt16 nStyleBeforeFly; ///< Style-Nummer des Nodes,
///< in/an dem ein Fly verankert ist
- USHORT nLastFmtId; ///< Style of last TxtNode in normal range
- USHORT nUniqueList; ///< current number for creating unique list names
+ sal_uInt16 nLastFmtId; ///< Style of last TxtNode in normal range
+ sal_uInt16 nUniqueList; ///< current number for creating unique list names
unsigned int mnHdFtIndex;
- USHORT mnRedlineMode; ///< Remember the original redline mode
+ sal_uInt16 mnRedlineMode; ///< Remember the original redline mode
public:
/* implicit bookmark vector containing pairs of node indexes and bookmark names */
@@ -523,27 +528,27 @@ public:
// SwTwips nFlyWidth, nFlyHeight; // Fuer Anpassung Graphic
// <--
- BYTE nTxtTyp;
+ sal_uInt8 nTxtTyp;
- BYTE bStyDef : 1; // wird Style geschrieben ?
- BYTE bBreakBefore : 1; // Breaks werden 2mal ausgegeben
- BYTE bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
- BYTE bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
- BYTE bOutPageDescs : 1; ///< PageDescs (section properties) are being written
- BYTE bOutFirstPage : 1; // write Attrset of FirstPageDesc
- BYTE bOutTable : 1; // Tabelle wird ausgegeben
+ sal_uInt8 bStyDef : 1; // wird Style geschrieben ?
+ sal_uInt8 bBreakBefore : 1; // Breaks werden 2mal ausgegeben
+ sal_uInt8 bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
+ sal_uInt8 bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
+ sal_uInt8 bOutPageDescs : 1; ///< PageDescs (section properties) are being written
+ sal_uInt8 bOutFirstPage : 1; // write Attrset of FirstPageDesc
+ sal_uInt8 bOutTable : 1; // Tabelle wird ausgegeben
// ( wird zB bei Flys in Tabelle zurueckgesetzt )
- BYTE bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
+ sal_uInt8 bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
// ( wird erst nach der Tabelle zurueckgesetzt )
- BYTE bOutGrf : 1; // Grafik wird ausgegeben
- BYTE bInWriteEscher : 1; // in write textboxes
- BYTE bStartTOX : 1; // true: a TOX is startet
- BYTE bInWriteTOX : 1; // true: all content are in a TOX
- BYTE bFtnAtTxtEnd : 1; // true: all FTN at Textend
- BYTE bEndAtTxtEnd : 1; // true: all END at Textend
- BYTE bHasHdr : 1;
- BYTE bHasFtr : 1;
- BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called
+ sal_uInt8 bOutGrf : 1; // Grafik wird ausgegeben
+ sal_uInt8 bInWriteEscher : 1; // in write textboxes
+ sal_uInt8 bStartTOX : 1; // true: a TOX is startet
+ sal_uInt8 bInWriteTOX : 1; // true: all content are in a TOX
+ sal_uInt8 bFtnAtTxtEnd : 1; // true: all FTN at Textend
+ sal_uInt8 bEndAtTxtEnd : 1; // true: all END at Textend
+ sal_uInt8 bHasHdr : 1;
+ sal_uInt8 bHasFtr : 1;
+ sal_uInt8 bSubstituteBullets : 1; // true: SubstituteBullet() gets called
bool mbExportModeRTF;
@@ -568,47 +573,46 @@ public:
/// Set the pCurPam appropriately and call WriteText().
///
/// Used to export paragraphs in footnotes/endnotes/etc.
- void WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp );
+ void WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp );
/// Export the pool items to attributes (through an attribute output class).
- void ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript );
+ void ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript );
/// Return the numeric id of the numbering rule
- USHORT GetId( const SwNumRule& rNumRule );
+ sal_uInt16 GetId( const SwNumRule& rNumRule );
/// Return the numeric id of the style.
- USHORT GetId( const SwTxtFmtColl& rColl ) const;
+ sal_uInt16 GetId( const SwTxtFmtColl& rColl ) const;
/// Return the numeric id of the style.
- USHORT GetId( const SwCharFmt& rFmt ) const;
+ sal_uInt16 GetId( const SwCharFmt& rFmt ) const;
- USHORT GetId( const SwTOXType& rTOXType );
+ sal_uInt16 GetId( const SwTOXType& rTOXType );
/// Return the numeric id of the font (and add it to the font list if needed)
- USHORT GetId( const SvxFontItem& rFont)
+ sal_uInt16 GetId( const SvxFontItem& rFont)
{
return maFontHelper.GetId(rFont);
}
/// @overload
- USHORT GetId( const wwFont& rFont)
+ sal_uInt16 GetId( const wwFont& rFont)
{
return maFontHelper.GetId(rFont);
}
-
- const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
/// Find the reference.
- bool HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ bool HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Find the bookmark name.
- String GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ String GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Add a bookmark converted to a Word name.
void AppendWordBookmark( const String& rName );
/// Use OutputItem() on an item set according to the parameters.
- void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript, bool bExportParentItemSet );
+ void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript, bool bExportParentItemSet );
short GetDefaultFrameDirection( ) const;
@@ -623,7 +627,7 @@ public:
/// List is set to restart at a particular value so for export make a
/// completely new list based on this one and export that instead,
/// which duplicates words behaviour in this respect.
- USHORT DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal );
+ sal_uInt16 DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal );
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const = 0;
@@ -635,7 +639,7 @@ public:
virtual bool SupportsUnicode() const = 0;
/// Used to filter out attributes that can be e.g. written to .doc but not to .docx
- virtual bool ignoreAttributeForStyles( USHORT /*nWhich*/ ) const { return false; }
+ virtual bool ignoreAttributeForStyles( sal_uInt16 /*nWhich*/ ) const { return false; }
/// Guess the script (asian/western).
///
@@ -647,7 +651,7 @@ public:
///
/// In addition WW7- has only one character language identifier while WW8+
/// has two
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ) = 0;
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0;
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ) = 0;
@@ -670,7 +674,7 @@ public:
void SetCurItemSet( const SfxItemSet* pS ) { pISet = pS; }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
@@ -686,7 +690,7 @@ public:
const SwSectionFmt* GetSectionFormat( const SwNode& rNd ) const;
/// Line number of the section start.
- ULONG GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
+ sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
/// Start new section.
void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd );
@@ -722,13 +726,13 @@ public:
const SwTxtNode *GetHdFtPageRoot() const { return mpTopNodeOfHdFtPage; }
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt,
- BYTE nBreakCode) = 0;
+ sal_uInt8 nBreakCode) = 0;
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
@@ -747,9 +751,9 @@ public:
// Compute the number format for WW dates
bool GetNumberFmt(const SwField& rFld, String& rStr);
- virtual ULONG ReplaceCr( BYTE nChar ) = 0;
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0;
- const SfxPoolItem* HasItem( USHORT nWhich ) const;
+ const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const;
protected:
@@ -807,7 +811,7 @@ protected:
/// Output SwSectionNode
virtual void OutputSectionNode( const SwSectionNode& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ) = 0;
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) = 0;
/// Call the right (virtual) function according to the type of the item.
///
@@ -831,7 +835,7 @@ public:
// TODO move as much as possible here from WW8Export! ;-)
- static void CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft );
+ static void CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft );
private:
/// No copying.
@@ -856,8 +860,8 @@ public:
SwWW8Writer( const String& rFltName, const String& rBaseURL );
virtual ~SwWW8Writer();
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& );
// TODO most probably we want to be able to get these in
// MSExportFilterBase
@@ -873,20 +877,20 @@ public:
rtl_TextEncoding eCodeSet);
#endif
- static void InsUInt16( WW8Bytes& rO, UINT16 );
- static void InsUInt32( WW8Bytes& rO, UINT32 );
+ static void InsUInt16( WW8Bytes& rO, sal_uInt16 );
+ static void InsUInt32( WW8Bytes& rO, sal_uInt32 );
static void InsAsString16( WW8Bytes& rO, const String& );
static void InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet );
- static ULONG FillUntil( SvStream& rStrm, ULONG nEndPos = 0 );
- static void FillCount( SvStream& rStrm, ULONG nCount );
+ static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
+ static void FillCount( SvStream& rStrm, sal_uLong nCount );
- static void WriteShort( SvStream& rStrm, INT16 nVal ) { rStrm << nVal; }
- static void WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal );
+ static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm << nVal; }
+ static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
- static void WriteLong( SvStream& rStrm, INT32 nVal ) { rStrm << nVal; }
- static void WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal );
+ static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm << nVal; }
+ static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
static void WriteString16(SvStream& rStrm, const String& rStr,
bool bAddZero);
@@ -895,10 +899,10 @@ public:
static void WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAddZero);
- String GetPassword();
+ bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec );
using StgWriter::Write;
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
private:
/// No copying.
@@ -923,7 +927,7 @@ public:
WW8_WrPlcFtnEdn *pEdn; ///< Endnotes - structure to remember them, and output
WW8_WrPlcSepx* pSepx; ///< Sections/headers/footers
- BYTE bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
+ sal_uInt8 bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
protected:
SwWW8Writer *m_pWriter; ///< Pointer to the writer
@@ -947,14 +951,14 @@ private:
void WriteFkpPlcUsw();
void WriteMainText();
void StoreDoc1();
- void Out_WwNumLvl( BYTE nWwLevel );
- void BuildAnlvBulletBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
+ void Out_WwNumLvl( sal_uInt8 nWwLevel );
+ void BuildAnlvBulletBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
const SwNumFmt& rFmt );
- static void BuildAnlvBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
- const SwNumRule& rRul, const SwNumFmt& rFmt, BYTE nSwLevel );
+ static void BuildAnlvBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
+ const SwNumRule& rRul, const SwNumFmt& rFmt, sal_uInt8 nSwLevel );
void Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow);
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow);
/// Output the numbering table.
virtual void WriteNumbering();
@@ -975,9 +979,9 @@ public:
/// Setup the pA's info.
virtual void SetupSectionPositions( WW8_PdAttrDesc* pA );
- void Out_SwNumLvl( BYTE nSwLevel );
+ void Out_SwNumLvl( sal_uInt8 nSwLevel );
void Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel );
+ sal_uInt8 nSwLevel );
bool MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt);
@@ -986,7 +990,7 @@ public:
WW8OleMaps& GetOLEMap() { return *pOleMap; }
void ExportDopTypography(WW8DopTypography &rTypo);
- USHORT AddRedlineAuthor( USHORT nId );
+ sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
void WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pO = 0 );
void WritePostItBegin( WW8Bytes* pO = 0 );
@@ -997,10 +1001,10 @@ public:
void OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd );
void AppendFlyInFlys(const sw::Frame& rFrmFmt, const Point& rNdTopLeft);
- void WriteOutliner(const OutlinerParaObject& rOutliner, BYTE nTyp);
- void WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp);
+ void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
+ void WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp);
- UINT32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
+ sal_uInt32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
void CreateEscher();
void WriteEscher();
@@ -1008,7 +1012,7 @@ public:
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
void StartCommentOutput( const String& rName );
void EndCommentOutput( const String& rName );
@@ -1018,12 +1022,12 @@ public:
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen );
virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
- void MoveFieldMarks(ULONG nFrom, ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo);
- void WriteAsStringTable(const ::std::vector<String>&, INT32& rfcSttbf,
- INT32& rlcbSttbf, USHORT nExtraLen = 0);
+ void WriteAsStringTable(const ::std::vector<String>&, sal_Int32& rfcSttbf,
+ sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen = 0);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() );
void WriteChar( sal_Unicode c );
@@ -1031,11 +1035,11 @@ public:
void OutSwString(const String&, xub_StrLen nStt, xub_StrLen nLen,
bool bUnicode, rtl_TextEncoding eChrSet);
- WW8_CP Fc2Cp( ULONG nFc ) const { return pPiece->Fc2Cp( nFc ); }
+ WW8_CP Fc2Cp( sal_uLong nFc ) const { return pPiece->Fc2Cp( nFc ); }
// einige z.T. static halb-interne Funktions-Deklarationen
- void OutSprmBytes( BYTE* pBytes, USHORT nSiz )
+ void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
{ pO->Insert( pBytes, nSiz, pO->Count() ); }
inline bool IsUnicode() const { return pPiece->IsUnicode(); }
@@ -1051,10 +1055,10 @@ public:
void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow);
void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * rBox );
- BYTE TransCol( const Color& rCol );
+ sal_uInt8 TransCol( const Color& rCol );
bool TransBrush(const Color& rCol, WW8_SHD& rShd);
WW8_BRC TranslateBorderLine(const SvxBorderLine& pLine,
- USHORT nDist, bool bShadow);
+ sal_uInt16 nDist, bool bShadow);
// #i77805# - new return value indicates, if an inherited outline numbering is suppressed
virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt);
@@ -1066,12 +1070,12 @@ public:
static long GetDTTM( const DateTime& rDT );
/// Convert the SVX numbering type to id
- static BYTE GetNumId( USHORT eNumType );
+ static sal_uInt8 GetNumId( sal_uInt16 eNumType );
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
- USHORT DupNumRuleWithLvlStart(const SwNumRule *pRule,BYTE nLvl,USHORT nVal);
+ sal_uInt16 DupNumRuleWithLvlStart(const SwNumRule *pRule,sal_uInt8 nLvl,sal_uInt16 nVal);
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
@@ -1079,13 +1083,13 @@ public:
bool MiserableRTLFrmFmtHack(SwTwips &rLeft, SwTwips &rRight,
const sw::Frame &rFrmFmt);
- void InsUInt16( UINT16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
- void InsUInt32( UINT32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
+ void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
+ void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
void InsAsString16( const String& rStr )
{ SwWW8Writer::InsAsString16( *pO, rStr ); }
void InsAsString8( const String& rStr, rtl_TextEncoding eCodeSet )
{ SwWW8Writer::InsAsString8( *pO, rStr, eCodeSet ); }
- void WriteStringAsPara( const String& rTxt, USHORT nStyleId = 0 );
+ void WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId = 0 );
/// Setup the exporter.
WW8Export( SwWW8Writer *pWriter,
@@ -1114,15 +1118,15 @@ public:
SvStream& Strm() const { return m_pWriter->Strm(); }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt,
- BYTE nBreakCode);
+ sal_uInt8 nBreakCode);
protected:
/// Output SwGrfNode
@@ -1133,7 +1137,7 @@ protected:
virtual void OutputLinkedOLE( const rtl::OUString& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
private:
/// No copying.
@@ -1156,8 +1160,8 @@ protected:
WW8_WrPlcSubDoc();
virtual ~WW8_WrPlcSubDoc();
- bool WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp, WW8_CP& rCount );
- void WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp, WW8_FC& rTxtStt,
+ bool WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
+ void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTxtStt,
sal_Int32& rTxtCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
virtual const SvULongs* GetShapeIdArr() const;
@@ -1167,13 +1171,13 @@ protected:
class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc
{
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
//No copying
WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&);
WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &);
public:
- WW8_WrPlcFtnEdn( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcFtnEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
@@ -1212,7 +1216,7 @@ public:
class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // Doppel-Plc fuer Textboxen
{ // Rahmen/DrawTextboxes!
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
SvULongs aShapeIds; // VARARR of ShapeIds for the SwFrmFmts
virtual const SvULongs* GetShapeIdArr() const;
@@ -1220,13 +1224,13 @@ private:
WW8_WrPlcTxtBoxes(const WW8_WrPlcTxtBoxes&);
WW8_WrPlcTxtBoxes& operator=(WW8_WrPlcTxtBoxes&);
public:
- WW8_WrPlcTxtBoxes( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcTxtBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
- void Append( const SdrObject& rObj, UINT32 nShapeId );
- USHORT Count() const { return aCntnt.Count(); }
- USHORT GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
+ void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
+ sal_uInt16 Count() const { return aCntnt.Count(); }
+ sal_uInt16 GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
};
typedef WW8_WrFkp* WW8_FkpPtr; // Plc fuer Chpx und Papx ( incl PN-Plc )
@@ -1237,10 +1241,10 @@ class WW8_WrPlcPn // Plc fuer Page Numbers
private:
WW8Export& rWrt;
WW8_WrFkpPtrs aFkps; // PTRARR
- USHORT nFkpStartPage;
+ sal_uInt16 nFkpStartPage;
ePLCFT ePlc;
bool bWrtWW8; // Fuer Writererkennung
- USHORT nMark;
+ sal_uInt16 nMark;
//No copying
WW8_WrPlcPn(const WW8_WrPlcPn&);
@@ -1248,10 +1252,10 @@ private:
public:
WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
~WW8_WrPlcPn();
- void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const BYTE* pSprms = 0);
+ void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = 0);
void WriteFkps();
void WritePlc();
- BYTE *CopyLastSprms(BYTE &rLen);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen);
};
// class WW8_WrPlc1 ist erstmal nur fuer Felder
@@ -1259,41 +1263,41 @@ class WW8_WrPlc1
{
private:
SvULongs aPos; // PTRARR von CPs
- BYTE* pData; // Inhalte ( Strukturen )
- ULONG nDataLen;
- USHORT nStructSiz;
+ sal_uInt8* pData; // Inhalte ( Strukturen )
+ sal_uLong nDataLen;
+ sal_uInt16 nStructSiz;
//No copying
WW8_WrPlc1(const WW8_WrPlc1&);
WW8_WrPlc1& operator=(const WW8_WrPlc1&);
protected:
- USHORT Count() const { return aPos.Count(); }
+ sal_uInt16 Count() const { return aPos.Count(); }
void Write( SvStream& rStrm );
WW8_CP Prev() const;
public:
- WW8_WrPlc1( USHORT nStructSz );
+ WW8_WrPlc1( sal_uInt16 nStructSz );
~WW8_WrPlc1();
void Append( WW8_CP nCp, const void* pData );
- void Finish( ULONG nLastCp, ULONG nStartCp );
+ void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
};
// class WW8_WrPlcFld ist fuer Felder
class WW8_WrPlcFld : public WW8_WrPlc1
{
private:
- BYTE nTxtTyp;
- USHORT nResults;
+ sal_uInt8 nTxtTyp;
+ sal_uInt16 nResults;
//No copying
WW8_WrPlcFld(const WW8_WrPlcFld&);
WW8_WrPlcFld& operator=(const WW8_WrPlcFld&);
public:
- WW8_WrPlcFld( USHORT nStructSz, BYTE nTTyp )
+ WW8_WrPlcFld( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
: WW8_WrPlc1( nStructSz ), nTxtTyp( nTTyp ), nResults(0)
{}
bool Write( WW8Export& rWrt );
void ResultAdded() { ++nResults; }
- USHORT ResultCount() const { return nResults; }
+ sal_uInt16 ResultCount() const { return nResults; }
};
class WW8_WrMagicTable : public WW8_WrPlc1
@@ -1304,7 +1308,7 @@ private:
WW8_WrMagicTable& operator=(const WW8_WrMagicTable&);
public:
WW8_WrMagicTable() : WW8_WrPlc1( 4 ) {Append(0,0);}
- void Append( WW8_CP nCp, ULONG nData );
+ void Append( WW8_CP nCp, sal_uLong nData );
bool Write( WW8Export& rWrt );
};
@@ -1312,11 +1316,11 @@ class GraphicDetails
{
public:
sw::Frame maFly; // Umgebende FlyFrms dazu
- ULONG mnPos; // FilePos der Grafiken
- UINT16 mnWid; // Breite der Grafiken
- UINT16 mnHei; // Hoehe der Grafiken
+ sal_uLong mnPos; // FilePos der Grafiken
+ sal_uInt16 mnWid; // Breite der Grafiken
+ sal_uInt16 mnHei; // Hoehe der Grafiken
- GraphicDetails(const sw::Frame &rFly, UINT16 nWid, UINT16 nHei)
+ GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
: maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
{}
GraphicDetails& operator=(const GraphicDetails& rOther);
@@ -1339,14 +1343,14 @@ private:
std::vector<GraphicDetails> maDetails;
typedef std::vector<GraphicDetails>::iterator myiter;
- USHORT mnIdx; // Index in File-Positionen
+ sal_uInt16 mnIdx; // Index in File-Positionen
void WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight,
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
const SwAttrSet* pAttrSet = 0);
void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight);
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
//No copying
SwWW8WrGrf(const SwWW8WrGrf&);
@@ -1355,7 +1359,7 @@ public:
SwWW8WrGrf( WW8Export& rW ) : rWrt( rW ), mnIdx( 0 ) {}
void Insert(const sw::Frame &rFly);
void Write();
- ULONG GetFPos()
+ sal_uLong GetFPos()
{ return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
};
@@ -1376,8 +1380,8 @@ public:
MSWordAttrIter( MSWordExportBase& rExport );
virtual ~MSWordAttrIter();
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const = 0;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const = 0;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
};
/// Used to export formatted text associated to drawings.
@@ -1389,12 +1393,12 @@ private:
EECharAttribArray aTxtAtrArr;
SvPtrarr aChrTxtAtrArr;
SvUShorts aChrSetArr;
- USHORT nPara;
+ sal_uInt16 nPara;
xub_StrLen nAktSwPos;
xub_StrLen nTmpSwPos; // for HasItem()
rtl_TextEncoding eNdChrSet;
- USHORT nScript;
- BYTE mnTyp;
+ sal_uInt16 nScript;
+ sal_uInt8 mnTyp;
xub_StrLen SearchNext( xub_StrLen nStartPos );
void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart);
@@ -1404,8 +1408,8 @@ private:
MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&);
public:
MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
- BYTE nType );
- void NextPara( USHORT nPar );
+ sal_uInt8 nType );
+ void NextPara( sal_uInt16 nPar );
void OutParaAttr(bool bCharAttr);
void OutEEField(const SfxPoolItem& rHt);
@@ -1414,8 +1418,8 @@ public:
void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
bool OutAttrWithRange(xub_StrLen nPos);
xub_StrLen WhereNext() const { return nAktSwPos; }
rtl_TextEncoding GetNextCharSet() const;
@@ -1445,7 +1449,7 @@ private:
const SwRedline* pCurRedline;
xub_StrLen nAktSwPos;
- USHORT nCurRedlinePos;
+ sal_uInt16 nCurRedlinePos;
bool mbParaIsRTL;
@@ -1475,8 +1479,8 @@ public:
void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos, bool bRuby = false );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
int OutAttrWithRange(xub_StrLen nPos);
const SwRedlineData* GetRedline( xub_StrLen nPos );
void OutFlys(xub_StrLen nSwPos);
@@ -1496,26 +1500,26 @@ class MSWordStyles
{
MSWordExportBase& m_rExport;
SwFmt** pFmtA;
- USHORT nUsedSlots;
+ sal_uInt16 nUsedSlots;
/// Create the style table, called from the constructor.
void BuildStylesTable();
/// Get slot number during building the style table.
- USHORT BuildGetSlot( const SwFmt& rFmt );
+ sal_uInt16 BuildGetSlot( const SwFmt& rFmt );
/// Return information about one style.
- void GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext );
+ void GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext );
/// Outputs attributes of one style.
- void WriteProperties( const SwFmt* pFmt, bool bPap, USHORT nPos, bool bInsDefCharSiz );
+ void WriteProperties( const SwFmt* pFmt, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
- USHORT GetWWId( const SwFmt& rFmt ) const;
+ sal_uInt16 GetWWId( const SwFmt& rFmt ) const;
void SetStyleDefaults( const SwFmt& rFmt, bool bPap );
/// Outputs one style - called (in a loop) from OutputStylesTable().
- void OutputStyle( SwFmt* pFmt, USHORT nPos );
+ void OutputStyle( SwFmt* pFmt, sal_uInt16 nPos );
// No copying
MSWordStyles( const MSWordStyles& );
@@ -1529,7 +1533,7 @@ public:
void OutputStylesTable();
/// Get id of the style (rFmt).
- USHORT GetSlot( const SwFmt& rFmt ) const;
+ sal_uInt16 GetSlot( const SwFmt& rFmt ) const;
SwFmt* GetSwFmt() { return (*pFmtA); }
};
@@ -1558,8 +1562,8 @@ public:
/// For the output of sections.
struct WW8_PdAttrDesc
{
- BYTE* pData;
- USHORT nLen;
+ sal_uInt8* pData;
+ sal_uInt16 nLen;
WW8_FC nSepxFcPos;
};
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index ef45bbedaf8c..e5898a607300 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -89,7 +89,7 @@ using namespace nsFieldFlags;
// 5. Die MapModes, die Win nicht kann, umrechnen
// OutGrf() wird fuer jeden GrafNode im Doc gerufen. Es wird ein PicLocFc-Sprm
-// eingefuegt, der statt Adresse ein Magic ULONG enthaelt. Ausserdem wird
+// eingefuegt, der statt Adresse ein Magic sal_uLong enthaelt. Ausserdem wird
// in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der
// Grafiken und Patchen der PicLocFc-Attribute )
@@ -212,15 +212,15 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
{
OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
- BYTE *pSpecOLE;
- BYTE *pDataAdr;
+ sal_uInt8 *pSpecOLE;
+ sal_uInt8 *pDataAdr;
short nSize;
- static BYTE aSpecOLE_WW8[] = {
+ static sal_uInt8 aSpecOLE_WW8[] = {
0x03, 0x6a, 0, 0, 0, 0, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
0x56, 0x08, 1 // sprmCFObj
};
- static BYTE aSpecOLE_WW6[] = {
+ static sal_uInt8 aSpecOLE_WW6[] = {
68, 4, 0, 0, 0, 0, // sprmCPicLocation (len is 4)
75, 1, // sprmCFOLE2
118, 1 // sprmCFObj
@@ -254,7 +254,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
WW8OleMap *pMap = new WW8OleMap(nPictureId);
bool bDuplicate = false;
WW8OleMaps &rOleMap = GetOLEMap();
- USHORT nPos;
+ sal_uInt16 nPos;
if ( rOleMap.Seek_Entry(pMap, &nPos) )
{
bDuplicate = true;
@@ -283,7 +283,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
::rtl::OUString aObjInfo( RTL_CONSTASCII_USTRINGPARAM( "\3ObjInfo" ) );
if ( !xOleStg->IsStream( aObjInfo ) )
{
- const BYTE pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
+ const sal_uInt8 pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
SvStorageStreamRef rObjInfoStream = xOleStg->OpenSotStream( aObjInfo );
if ( rObjInfoStream.Is() && !rObjInfoStream->GetError() )
{
@@ -431,8 +431,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
WriteChar( (char)1 ); // Grafik-Sonderzeichen in Haupttext einfuegen
- BYTE aArr[ 18 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 18 ];
+ sal_uInt8* pArr = aArr;
const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt();
const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId();
@@ -463,7 +463,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
Set_UInt16( pArr, NS_sprm::LN_CHpsPos );
else
Set_UInt8( pArr, 101 );
- Set_UInt16( pArr, -((INT16)nHeight));
+ Set_UInt16( pArr, -((sal_Int16)nHeight));
}
}
}
@@ -487,7 +487,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// Magic variieren, damit verschiedene Grafik-Attribute nicht
// gemerged werden
- static BYTE nAttrMagicIdx = 0;
+ static sal_uInt8 nAttrMagicIdx = 0;
--pArr;
Set_UInt8( pArr, nAttrMagicIdx++ );
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
@@ -503,7 +503,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
{
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
- static BYTE const nSty[2] = { 0, 0 };
+ static sal_uInt8 nSty[2] = { 0, 0 };
pO->Insert( nSty, 2, pO->Count() ); // Style #0
bool bOldGrf = bOutGrf;
bOutGrf = true;
@@ -535,16 +535,16 @@ GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther)
void SwWW8WrGrf::Insert(const sw::Frame &rFly)
{
const Size aSize( rFly.GetLayoutSize() );
- const UINT16 nWidth = static_cast< UINT16 >(aSize.Width());
- const UINT16 nHeight = static_cast< UINT16 >(aSize.Height());
+ const sal_uInt16 nWidth = static_cast< sal_uInt16 >(aSize.Width());
+ const sal_uInt16 nHeight = static_cast< sal_uInt16 >(aSize.Height());
maDetails.push_back(GraphicDetails(rFly, nWidth, nHeight));
}
void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight, const SwAttrSet* pAttrSet)
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight, const SwAttrSet* pAttrSet)
{
- INT16 nXSizeAdd = 0, nYSizeAdd = 0;
- INT16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
+ sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
+ sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
// Crop-AttributInhalt in Header schreiben ( falls vorhanden )
const SfxPoolItem* pItem;
@@ -552,21 +552,21 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
== pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
{
const SwCropGrf& rCr = *(SwCropGrf*)pItem;
- nCropL = (INT16)rCr.GetLeft();
- nCropR = (INT16)rCr.GetRight();
- nCropT = (INT16)rCr.GetTop();
- nCropB = (INT16)rCr.GetBottom();
- nXSizeAdd = nXSizeAdd - (INT16)( rCr.GetLeft() + rCr.GetRight() );
- nYSizeAdd = nYSizeAdd - (INT16)( rCr.GetTop() + rCr.GetBottom() );
+ nCropL = (sal_Int16)rCr.GetLeft();
+ nCropR = (sal_Int16)rCr.GetRight();
+ nCropT = (sal_Int16)rCr.GetTop();
+ nCropB = (sal_Int16)rCr.GetBottom();
+ nXSizeAdd = nXSizeAdd - (sal_Int16)( rCr.GetLeft() + rCr.GetRight() );
+ nYSizeAdd = nYSizeAdd - (sal_Int16)( rCr.GetTop() + rCr.GetBottom() );
}
Size aGrTwipSz(rFly.GetSize());
bool bWrtWW8 = rWrt.bWrtWW8;
- UINT16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
+ sal_uInt16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
- BYTE aArr[ 0x44 ] = { 0 };
+ sal_uInt8 aArr[ 0x44 ] = { 0 };
- BYTE* pArr = aArr + 0x2E; //Do borders first
+ sal_uInt8* pArr = aArr + 0x2E; //Do borders first
const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet();
if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
@@ -583,9 +583,9 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
(pSI->GetWidth() != 0);
}
- BYTE aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
+ sal_uInt8 aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
- for( BYTE i = 0; i < 4; ++i )
+ for( sal_uInt8 i = 0; i < 4; ++i )
{
const SvxBorderLine* pLn = pBox->GetLine( aLnArr[ i ] );
WW8_BRC aBrc;
@@ -655,7 +655,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Width() + nXSizeAdd ) // set mx
{
double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -663,7 +663,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Height() + nYSizeAdd ) // set my
{
double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -677,18 +677,18 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
}
void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight)
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
{
if (rGrfNd.IsLinkedFile()) // Linked File
{
String aFileN;
rGrfNd.GetFileFilterNms( &aFileN, 0 );
- UINT16 mm = 94; // 94 = BMP, GIF
+ sal_uInt16 mm = 94; // 94 = BMP, GIF
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
rGrfNd.GetpSwAttrSet());
- rStrm << (BYTE)aFileN.Len(); // Pascal-String schreiben
+ rStrm << (sal_uInt8)aFileN.Len(); // Pascal-String schreiben
SwWW8Writer::WriteString8(rStrm, aFileN, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -742,9 +742,9 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
{
- UINT16 nWidth = rItem.mnWid;
- UINT16 nHeight = rItem.mnHei;
- UINT32 nPos = rStrm.Tell(); // Grafik-Anfang merken
+ sal_uInt16 nWidth = rItem.mnWid;
+ sal_uInt16 nHeight = rItem.mnHei;
+ sal_uInt32 nPos = rStrm.Tell(); // Grafik-Anfang merken
const sw::Frame &rFly = rItem.maFly;
switch (rFly.GetWriterType())
@@ -858,7 +858,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
break;
}
- UINT32 nPos2 = rStrm.Tell(); // Ende merken
+ sal_uInt32 nPos2 = rStrm.Tell(); // Ende merken
rStrm.Seek( nPos );
SVBT32 nLen;
UInt32ToSVBT32( nPos2 - nPos, nLen ); // Grafik-Laenge ausrechnen
@@ -870,7 +870,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
// Grafiken raus und merkt sich die File-Positionen der Grafiken, damit
// beim Schreiben der Attribute die Positionen in die PicLocFc-Sprms
// eingepatcht werden koennen.
-// Das Suchen in den Attributen nach dem Magic ULONG und das Patchen
+// Das Suchen in den Attributen nach dem Magic sal_uLong und das Patchen
// passiert beim Schreiben der Attribute. Die SwWW8WrGrf-Klasse liefert
// hierfuer nur mit GetFPos() sequentiell die Positionen.
void SwWW8WrGrf::Write()
@@ -879,7 +879,7 @@ void SwWW8WrGrf::Write()
myiter aEnd = maDetails.end();
for (myiter aIter = maDetails.begin(); aIter != aEnd; ++aIter)
{
- UINT32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
+ sal_uInt32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
if( nPos & 0x3 )
SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ab05538128a9..10cc74d8d88b 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -166,7 +166,7 @@ using namespace nsSwDocInfoSubType;
using namespace sw::util;
using namespace sw::types;
-bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool WW8Export::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
bool bRet = true;
if ( nScript == i18n::ScriptType::ASIAN )
@@ -252,13 +252,13 @@ bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
// Hilfsroutinen fuer Styles
//------------------------------------------------------------
-void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript )
+void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript )
{
sw::cPoolItemIter aEnd = rItems.end();
for ( sw::cPoolItemIter aI = rItems.begin(); aI != aEnd; ++aI )
{
const SfxPoolItem *pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( ( isCHRATR( nWhich ) || isTXTATR( nWhich ) ) && CollapseScriptsforWordOk( nScript, nWhich ) )
{
AttrOutput().OutputItem( *pItem );
@@ -271,7 +271,7 @@ void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScri
* - gebe die Attribute aus; ohne Parents!
*/
-void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript,
+void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript,
bool bExportParentItemSet )
{
if( bExportParentItemSet || rSet.Count() )
@@ -318,7 +318,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
for ( sw::cPoolItemIter aI = aItems.begin(); aI != aEnd; ++aI )
{
pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE)
AttrOutput().OutputItem( *pItem );
}
@@ -351,8 +351,8 @@ bool MSWordExportBase::CntntContainsChapterField(const SwFmtCntnt &rCntnt) const
{
SwNodeIndex aIdx( *pSttIdx, 1 );
SwNodeIndex aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
//If the header/footer contains a chapter field
mycCFIter aIEnd = maChapterFieldLocs.end();
for ( mycCFIter aI = maChapterFieldLocs.begin(); aI != aIEnd; ++aI )
@@ -573,7 +573,7 @@ const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) cons
return pFmt;
}
-ULONG MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
+sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
{
const SwFmtLineNumber* pNItem = 0;
if ( pSet )
@@ -598,7 +598,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
// Aufbauen und die Ausgabe der am PageDesc haengenden Attribute und
// Kopf/Fusszeilen passiert nach dem Haupttext und seinen Attributen.
- ULONG nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
+ sal_uLong nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
// tatsaechlich wird hier NOCH NICHTS ausgegeben, sondern
// nur die Merk-Arrays aCps, aSects entsprechend ergaenzt
@@ -606,7 +606,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
return;
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -620,7 +620,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
}
}
-void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
+void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft )
{
const SvxTabStopItem *pItem =
sw::util::HasItem<SvxTabStopItem>( rSet, RES_PARATR_TABSTOP );
@@ -629,7 +629,7 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
{
// dann muss das fuer die Ausgabe korrigiert werden
SvxTabStopItem aTStop(*pItem);
- for ( USHORT nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
+ for ( sal_uInt16 nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
{
SvxTabStop& rTab = (SvxTabStop&)aTStop[ nCnt ];
if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() &&
@@ -647,9 +647,9 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
}
}
-BYTE WW8Export::GetNumId( USHORT eNumType )
+sal_uInt8 WW8Export::GetNumId( sal_uInt16 eNumType )
{
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
switch( eNumType )
{
case SVX_NUM_CHARS_UPPER_LETTER:
@@ -668,7 +668,7 @@ BYTE WW8Export::GetNumId( USHORT eNumType )
return nRet;
}
-void WW8AttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
+void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel-1;
@@ -726,7 +726,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
if (bWrtWW8)
{
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_POutLvl);
- pO->Insert(BYTE(9), pO->Count());
+ pO->Insert(sal_uInt8(9), pO->Count());
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_PIlfo);
SwWW8Writer::InsUInt16(*pO, 0);
@@ -759,9 +759,9 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
//if outline numbered
// if Write StyleDefinition then write the OutlineRule
- const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<USHORT>( nLvl ) );
+ const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) );
if ( bStyDef )
- AttrOutput().OutlineNumbering( static_cast< BYTE >( nLvl ), rNFmt, rFmt );
+ AttrOutput().OutlineNumbering( static_cast< sal_uInt8 >( nLvl ), rNFmt, rFmt );
if ( rNFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
@@ -853,7 +853,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
pOutFmtNode = pOldMod;
}
-bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo )
+bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
const SwTxtNode* pNd;
SwClientIter aIter( *pDoc->GetSysFldType( RES_GETREFFLD ) );
@@ -889,7 +889,7 @@ bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT
return false;
}
-String MSWordExportBase::GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo )
+String MSWordExportBase::GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
String sRet;
switch ( nTyp )
@@ -929,14 +929,14 @@ void WW8AttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript )
if ( m_rWW8Export.bWrtWW8 && bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CFBiDi );
- m_rWW8Export.pO->Insert( (BYTE)1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)1, m_rWW8Export.pO->Count() );
}
// #i46087# patch from james_clark; complex texts needs the undocumented SPRM CComplexScript with param 0x81.
if ( m_rWW8Export.bWrtWW8 && nScript == i18n::ScriptType::COMPLEX && !bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CComplexScript );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
m_rWW8Export.pDop->bUseThaiLineBreakingRules = true;
}
}
@@ -954,7 +954,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
SVBT16 nSty;
ShortToSVBT16( 0, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pTextNodeInfoInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -992,7 +992,7 @@ void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
Redline( pRedlineData );
WW8_WrPlcFld* pCurrentFields = m_rWW8Export.CurrentFieldPlc();
- USHORT nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
+ sal_uInt16 nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
bool bExportedFieldResult = ( m_nFieldResults != nNewFieldResults );
@@ -1028,16 +1028,16 @@ void WW8AttributeOutput::OutputFKP()
}
}
-void WW8AttributeOutput::ParagraphStyle( USHORT nStyle )
+void WW8AttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OSL_ENSURE( !m_rWW8Export.pO->Count(), " pO ist am ZeilenEnde nicht leer" );
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
}
-void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8Attribute( sal_uInt8 nId, bool bVal )
{
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( 8 == nId ? NS_sprm::LN_CFDStrike : NS_sprm::LN_CFBold + nId );
@@ -1049,7 +1049,7 @@ void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
m_rWW8Export.pO->Insert( bVal ? 1 : 0, m_rWW8Export.pO->Count() );
}
-void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal )
{
OSL_ENSURE( nId <= 1, "out of range" );
if ( !m_rWW8Export.bWrtWW8 || nId > 1 )
@@ -1061,7 +1061,7 @@ void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
void WW8AttributeOutput::CharFont( const SvxFontItem& rFont )
{
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1079,7 +1079,7 @@ void WW8AttributeOutput::CharFontCTL( const SvxFontItem& rFont )
{
//Can only export in 8+, in 7- export as normal varient and expect that
//upperlevel code has blocked exporting clobbering attributes
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CFtcBi );
else
@@ -1091,7 +1091,7 @@ void WW8AttributeOutput::CharFontCJK( const SvxFontItem& rFont )
{
//Can only export in 8+, in 7- export as normal varient and expect that
//upperlevel code has blocked exporting clobbering attributes
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CRgFtc1 );
else
@@ -1199,7 +1199,7 @@ void WW8AttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossed )
void WW8AttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap )
{
- USHORT eSt = rCaseMap.GetValue();
+ sal_uInt16 eSt = rCaseMap.GetValue();
switch ( eSt )
{
case SVX_CASEMAP_KAPITAELCHEN:
@@ -1241,7 +1241,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
// WW97 - additional parameters:
// 6 = thick, 7 = dash, 8 = dot(not used)
// 9 = dotdash 10 = dotdotdash, 11 = wave
- BYTE b = 0;
+ sal_uInt8 b = 0;
switch ( rUnderline.GetLineStyle() )
{
case UNDERLINE_SINGLE:
@@ -1306,7 +1306,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rLanguage.Which() )
@@ -1330,7 +1330,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
if ( m_rWW8Export.bWrtWW8 ) // use sprmCRgLid0_80 rather than sprmCLid
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
// Word 2000 and above apparently require both old and new versions of
@@ -1350,7 +1350,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
{
- BYTE b = 0xFF;
+ sal_uInt8 b = 0xFF;
short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
if ( !nEsc )
{
@@ -1402,7 +1402,7 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rHeight.Which() )
@@ -1424,9 +1424,9 @@ void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (UINT16)(( rHeight.GetHeight() + 5 ) / 10 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16)(( rHeight.GetHeight() + 5 ) / 10 ) );
}
}
@@ -1443,7 +1443,7 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
{
if ( m_rWW8Export.bWrtWW8 )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( rRelief.GetValue() )
{
case RELIEF_EMBOSSED: nId = NS_sprm::LN_CFEmboss; break;
@@ -1454,15 +1454,15 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
if( nId )
{
m_rWW8Export.InsUInt16( nId );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
}
else
{
// switch both flags off
m_rWW8Export.InsUInt16( NS_sprm::LN_CFEmboss );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_CFImprint );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
}
}
}
@@ -1480,11 +1480,11 @@ void WW8AttributeOutput::CharRotate( const SvxCharRotateItem& rRotate )
// here corrupts the table, hence !m_rWW8Export.bIsInTable
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x01, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x01, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rRotate.IsFitToLine() ? 1 : 0 );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -1493,7 +1493,7 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
{
if ( m_rWW8Export.bWrtWW8 )
{
- BYTE nVal;
+ sal_uInt8 nVal;
switch ( rEmphasisMark.GetValue() )
{
case EMPHASISMARK_NONE: nVal = 0; break;
@@ -1514,9 +1514,9 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
// Gibt es keine direkte Entsprechung, dann wird versucht, eine moeglichst
// aehnliche WW-Farbe zu finden.
// return: 5-Bit-Wert ( 0..16 )
-BYTE WW8Export::TransCol( const Color& rCol )
+sal_uInt8 WW8Export::TransCol( const Color& rCol )
{
- BYTE nCol = 0; // ->Auto
+ sal_uInt8 nCol = 0; // ->Auto
switch( rCol.GetColor() )
{
case COL_BLACK: nCol = 1; break;
@@ -1548,10 +1548,10 @@ BYTE WW8Export::TransCol( const Color& rCol )
COL_RED, COL_BROWN, COL_GRAY, COL_LIGHTGRAY
};
- for( USHORT i = 0; i < 16; ++i )
+ for( sal_uInt16 i = 0; i < 16; ++i )
pBmpPal->operator[]( i ) = Color( aColArr[ i ] );
}
- nCol = static_cast< BYTE >(pBmpPal->GetBestIndex( rCol ) + 1);
+ nCol = static_cast< sal_uInt8 >(pBmpPal->GetBestIndex( rCol ) + 1);
break;
}
return nCol;
@@ -1590,7 +1590,7 @@ void WW8AttributeOutput::CharColor( const SvxColorItem& rColor )
else
m_rWW8Export.pO->Insert( 98, m_rWW8Export.pO->Count() );
- BYTE nColor = m_rWW8Export.TransCol( rColor.GetValue() );
+ sal_uInt8 nColor = m_rWW8Export.TransCol( rColor.GetValue() );
m_rWW8Export.pO->Insert( nColor, m_rWW8Export.pO->Count() );
if ( m_rWW8Export.bWrtWW8 && nColor )
@@ -1625,7 +1625,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
{
if ( rINet.GetValue().Len() )
{
- USHORT nId;
+ sal_uInt16 nId;
const String& rStr = rINet.GetINetFmt();
if ( rStr.Len() )
nId = rINet.GetINetFmtId();
@@ -1650,7 +1650,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
// - it contains the name of the link target, which is a bookmark.
// add optional parameter <bIncludeEmptyPicLocation>
// It is needed to write an empty picture location for page number field separators
-static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
+static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
String* pLinkStr = 0L,
bool bIncludeEmptyPicLocation = false )
{
@@ -1679,15 +1679,15 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write hyperlink data to data stream
SvStream& rStrm = *rWrt.pDataStrm;
// position of hyperlink data
- const UINT32 nLinkPosInDataStrm = rStrm.Tell();
+ const sal_uInt32 nLinkPosInDataStrm = rStrm.Tell();
// write empty header
- const UINT16 nEmptyHdrLen = 0x44;
- BYTE aEmptyHeader[ nEmptyHdrLen ] = { 0 };
+ const sal_uInt16 nEmptyHdrLen = 0x44;
+ sal_uInt8 aEmptyHeader[ nEmptyHdrLen ] = { 0 };
aEmptyHeader[ 4 ] = 0x44;
rStrm.Write( aEmptyHeader, nEmptyHdrLen );
// writer fixed header
- const UINT16 nFixHdrLen = 0x19;
- BYTE aFixHeader[ nFixHdrLen ] =
+ const sal_uInt16 nFixHdrLen = 0x19;
+ sal_uInt8 aFixHeader[ nFixHdrLen ] =
{
0x08, 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE,
0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9,
@@ -1696,13 +1696,13 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
};
rStrm.Write( aFixHeader, nFixHdrLen );
// write reference string including length+1
- UINT32 nStrLen( pLinkStr->Len() + 1 );
+ sal_uInt32 nStrLen( pLinkStr->Len() + 1 );
SwWW8Writer::WriteLong( rStrm, nStrLen );
SwWW8Writer::WriteString16( rStrm, *(pLinkStr), false );
// write additional two NULL Bytes
SwWW8Writer::WriteLong( rStrm, 0 );
// write length of hyperlink data
- const UINT32 nCurrPos = rStrm.Tell();
+ const sal_uInt32 nCurrPos = rStrm.Tell();
rStrm.Seek( nLinkPosInDataStrm );
SVBT32 nLen;
UInt32ToSVBT32( nCurrPos - nLinkPosInDataStrm, nLen );
@@ -1711,11 +1711,11 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write attributes of hyperlink character 0x01
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFldVanish );
- aItems.Insert( (BYTE)0x81, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x81, aItems.Count() );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CPicLocation );
SwWW8Writer::InsUInt32( aItems, nLinkPosInDataStrm );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFData );
- aItems.Insert( (BYTE)0x01, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x01, aItems.Count() );
}
//Technically we should probably Remove all attribs
@@ -1738,9 +1738,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
aItems.GetData());
}
-String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc)
+String lcl_GetExpandedField(const SwField &rFld)
{
- String sRet(rFld.ExpandField(rDoc.IsClipBoard()));
+ String sRet(rFld.ExpandField(true));
//replace LF 0x0A with VT 0x0B
sRet.SearchAndReplaceAll(0x0A, 0x0B);
@@ -1781,7 +1781,7 @@ WW8_WrPlcFld* WW8Export::CurrentFieldPlc() const
}
void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode )
+ const String& rFldCmd, sal_uInt8 nMode )
{
bool bUnicode = IsUnicode();
WW8_WrPlcFld* pFldP = CurrentFieldPlc();
@@ -1790,11 +1790,11 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
if (WRITEFIELD_START & nMode)
{
- BYTE aFld13[2] = { 0x13, 0x00 }; // will change
+ sal_uInt8 aFld13[2] = { 0x13, 0x00 }; // will change
//#i3958#, Needed to make this field work correctly in Word 2000
if (eFldType == ww::eSHAPE)
aFld13[0] |= 0x80;
- aFld13[1] = static_cast< BYTE >(eFldType); // Typ nachtragen
+ aFld13[1] = static_cast< sal_uInt8 >(eFldType); // Typ nachtragen
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 );
InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
}
@@ -1824,7 +1824,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
// retrieve reference destionation - the name of the bookmark
String aLinkStr;
- const USHORT nSubType = pFld->GetSubType();
+ const sal_uInt16 nSubType = pFld->GetSubType();
const SwGetRefField& rRFld = *(static_cast<const SwGetRefField*>(pFld));
if ( nSubType == REF_SETREFATTR ||
nSubType == REF_BOOKMARK )
@@ -1847,7 +1847,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CMD_END & nMode)
{
- static const BYTE aFld14[2] = { 0x14, 0xff };
+ static const sal_uInt8 aFld14[2] = { 0x14, 0xff };
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 );
pFldP->ResultAdded();
InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation );
@@ -1856,7 +1856,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
String sOut;
if( pFld )
- sOut = lcl_GetExpandedField(*pFld, *pDoc);
+ sOut = lcl_GetExpandedField(*pFld);
else
sOut = rFldCmd;
if( sOut.Len() )
@@ -1874,8 +1874,8 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- BYTE aArr[12];
- BYTE *pArr = aArr;
+ sal_uInt8 aArr[12];
+ sal_uInt8 *pArr = aArr;
if ( bWrtWW8 )
{
@@ -1903,14 +1903,14 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CLOSE & nMode)
{
- BYTE aFld15[2] = { 0x15, 0x80 };
+ sal_uInt8 aFld15[2] = { 0x15, 0x80 };
if (pFld)
{
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
if (nSubType == REF_SEQUENCEFLD)
aFld15[0] |= (0x4 << 5);
@@ -1940,10 +1940,10 @@ void WW8Export::EndCommentOutput(const String& rName)
WRITEFIELD_CLOSE);
}
-USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
+sal_uInt16 MSWordExportBase::GetId( const SwTOXType& rTOXType )
{
void* p = (void*)&rTOXType;
- USHORT nRet = aTOXArr.GetPos( p );
+ sal_uInt16 nRet = aTOXArr.GetPos( p );
if( USHRT_MAX == nRet )
aTOXArr.Insert( p, nRet = aTOXArr.Count() );
return nRet;
@@ -1953,7 +1953,7 @@ USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
// 2 - TabStop before PageNum,
// 3 - Text before PageNum - rTxt hold the text
// 4 - no Text and no TabStop before PageNum
-int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
+int lcl_CheckForm( const SwForm& rForm, sal_uInt8 nLvl, String& rText )
{
int nRet = 4;
rText.Erase();
@@ -2003,10 +2003,10 @@ int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
return nRet;
}
-bool lcl_IsHyperlinked(const SwForm& rForm, USHORT nTOXLvl)
+bool lcl_IsHyperlinked(const SwForm& rForm, sal_uInt16 nTOXLvl)
{
bool bRes = false;
- for (USHORT nI = 1; nI < nTOXLvl; ++nI)
+ for (sal_uInt16 nI = 1; nI < nTOXLvl; ++nI)
{
// #i21237#
SwFormTokens aPattern = rForm.GetPattern(nI);
@@ -2058,7 +2058,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- for (BYTE n = 1; n <= 3; ++n)
+ for (sal_uInt8 n = 1; n <= 3; ++n)
{
String aTxt;
int nRet = ::lcl_CheckForm(pTOX->GetTOXForm(), n, aTxt);
@@ -2105,7 +2105,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
sStr = FieldString(eCode);
String sTOption;
- USHORT n, nTOXLvl = pTOX->GetLevel();
+ sal_uInt16 n, nTOXLvl = pTOX->GetLevel();
if( !nTOXLvl )
++nTOXLvl;
@@ -2161,12 +2161,12 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
// what is the minimum outline level (if any) filled by a
// non-standard style for that level, i.e. ignore headline
// styles 1-9 and find the lowest valid outline level
- BYTE nPosOfLowestNonStandardLvl = MAXLEVEL;
+ sal_uInt8 nPosOfLowestNonStandardLvl = MAXLEVEL;
const SwTxtFmtColls& rColls = *GetExport().pDoc->GetTxtFmtColls();
for( n = rColls.Count(); n; )
{
const SwTxtFmtColl* pColl = rColls[ --n ];
- USHORT nPoolId = pColl->GetPoolFmtId();
+ sal_uInt16 nPoolId = pColl->GetPoolFmtId();
if (
//Is a Non-Standard Outline Style
(RES_POOLCOLL_HEADLINE1 > nPoolId || RES_POOLCOLL_HEADLINE9 < nPoolId) &&
@@ -2176,11 +2176,11 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
(pColl->GetAssignedOutlineStyleLevel() < nPosOfLowestNonStandardLvl)
)
{
- nPosOfLowestNonStandardLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ nPosOfLowestNonStandardLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
}
}
- BYTE nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (BYTE)nTOXLvl;
+ sal_uInt8 nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (sal_uInt8)nTOXLvl;
//output \o 1-X where X is the highest normal outline style to be included in the toc
if ( nMaxMSAutoEvaluate )
@@ -2204,7 +2204,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
const SwTxtFmtColl* pColl = rColls[ --n ];
if (!pColl->IsAssignedToListLevelOfOutlineStyle())
continue;
- BYTE nTestLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ sal_uInt8 nTestLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
if (nTestLvl < nTOXLvl && nTestLvl >= nMaxMSAutoEvaluate)
{
if( sTOption.Len() )
@@ -2245,24 +2245,24 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- BYTE nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
+ sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
bool bFirstFillTxt = true, bOnlyText = true;
for( n = 0; n < nTOXLvl; ++n )
{
String aTxt;
int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(),
- static_cast< BYTE >(n+1), aTxt );
+ static_cast< sal_uInt8 >(n+1), aTxt );
if( 1 == nRet )
{
bOnlyText = false;
if( MAXLEVEL == nNoPgStt )
- nNoPgStt = static_cast< BYTE >(n+1);
+ nNoPgStt = static_cast< sal_uInt8 >(n+1);
}
else
{
if( MAXLEVEL != nNoPgStt &&
MAXLEVEL == nNoPgEnd )
- nNoPgEnd = BYTE(n);
+ nNoPgEnd = sal_uInt8(n);
bOnlyText = bOnlyText && 3 == nRet;
if( 3 == nRet || 4 == nRet )
@@ -2334,7 +2334,7 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr)
// Returns a date or time format string by using the US NfKeywordTable
bool bHasFmt = false;
SvNumberFormatter* pNFmtr = pDoc->GetNumberFormatter();
- UINT32 nFmtIdx = rFld.GetFormat();
+ sal_uInt32 nFmtIdx = rFld.GetFormat();
const SvNumberformat* pNumFmt = pNFmtr->GetEntry( nFmtIdx );
if( pNumFmt )
{
@@ -2395,8 +2395,8 @@ void AttributeOutputBase::GetNumberPara( String& rStr, const SwField& rFld )
void WW8Export::WritePostItBegin( WW8Bytes* pOut )
{
- BYTE aArr[ 3 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 3 ];
+ sal_uInt8* pArr = aArr;
// sprmCFSpec true
if( bWrtWW8 )
@@ -2409,7 +2409,7 @@ void WW8Export::WritePostItBegin( WW8Bytes* pOut )
WriteChar( 0x05 ); // Annotation reference
if( pOut )
- pOut->Insert( aArr, static_cast< USHORT >(pArr - aArr), pOut->Count() );
+ pOut->Insert( aArr, static_cast< sal_uInt16 >(pArr - aArr), pOut->Count() );
else
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
}
@@ -2432,7 +2432,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
if (m_rWW8Export.IsUnicode())
{
SwWW8Writer::WriteString16(m_rWW8Export.Strm(), sExpand, false);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
0x3C, 0x08, 0x1
};
@@ -2442,7 +2442,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
{
SwWW8Writer::WriteString8(m_rWW8Export.Strm(), sExpand, false,
RTL_TEXTENCODING_MS_1252);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
92, 0x1
};
@@ -2455,7 +2455,7 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const
const SwSetExpField* pSet=(const SwSetExpField*)(&rFld);
const String &rVar = pSet->GetPar2();
- ULONG nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
+ sal_uLong nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
GetExport().OutputField(&rFld, eType, rCmd, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END);
@@ -2515,7 +2515,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
sStr.APPEND_CONST_ASC( "\" " );
m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
- String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc );
+ String sVar = lcl_GetExpandedField( rFld );
if ( sVar.Len() )
{
if ( m_rWW8Export.IsUnicode() )
@@ -2531,7 +2531,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
void WW8AttributeOutput::WriteExpand( const SwField* pFld )
{
- String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) );
+ String sExpand( lcl_GetExpandedField( *pFld ) );
if ( m_rWW8Export.IsUnicode() )
SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false );
else
@@ -2546,7 +2546,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
const SwField* pFld = rField.GetFld();
String sStr; // fuer optionale Parameter
bool bWriteExpand = false;
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
switch (pFld->GetTyp()->Which())
{
@@ -2693,7 +2693,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
if (pDocInfoField != NULL)
{
- String sFieldname = pDocInfoField->GetCntnt(TRUE);
+ String sFieldname = pDocInfoField->GetFieldName();
xub_StrLen nIndex = sFieldname.Search(':');
if (nIndex != sFieldname.Len())
@@ -2889,7 +2889,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
asian or western text based up on the first character and use the
font size of that script as our default.
*/
- USHORT nScript;
+ sal_uInt16 nScript;
if( pBreakIt->GetBreakIter().is() )
nScript = pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0);
else
@@ -2999,7 +2999,7 @@ void WW8AttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
switch ( rScriptSpace.Which() )
{
@@ -3013,7 +3013,7 @@ void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.pO->Insert( rScriptSpace.GetValue() ? 1 : 0,
m_rWW8Export.pO->Count() );
@@ -3040,7 +3040,7 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
m_rWW8Export.InsUInt16( NS_sprm::LN_PWAlignFont );
- INT16 nVal = rAlign.GetValue();
+ sal_Int16 nVal = rAlign.GetValue();
switch ( nVal )
{
case SvxParaVertAlignItem::BASELINE:
@@ -3080,7 +3080,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
{
if( bWrtWW8 )
{
- static const BYTE aSpec[] =
+ static const sal_uInt8 aSpec[] =
{
0x03, 0x6a, 0, 0, 0, 0, // sprmCObjLocation
0x55, 0x08, 1 // sprmCFSpec
@@ -3090,7 +3090,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
}
else
{
- static BYTE const aSpec[] =
+ static sal_uInt8 const aSpec[] =
{
117, 1, // sprmCFSpec
68, 4, 0, 0, 0, 0 // sprmCObjLocation
@@ -3167,7 +3167,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
bool bRet = true;
if( rFtn.GetTxtFtn() )
{
- USHORT nWh = static_cast< USHORT >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
+ sal_uInt16 nWh = static_cast< sal_uInt16 >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
: RES_FTN_AT_TXTEND);
const SwSectionNode* pSectNd = rFtn.GetTxtFtn()->GetTxtNode().
FindSectionNode();
@@ -3185,7 +3185,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
void AttributeOutputBase::TextFootnote( const SwFmtFtn& rFtn )
{
- USHORT nTyp;
+ sal_uInt16 nTyp;
if ( rFtn.IsEndNote() )
{
nTyp = REF_ENDNOTE;
@@ -3253,8 +3253,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
return;
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x02, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x02, m_rWW8Export.pO->Count() );
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
@@ -3273,7 +3273,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
ill effects.
*/
- USHORT nType;
+ sal_uInt16 nType;
if (!cStart && !cEnd)
nType = 0;
else if ((cStart == '{') || (cEnd == '}'))
@@ -3285,7 +3285,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
else
nType = 1;
m_rWW8Export.InsUInt16( nType );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -3293,8 +3293,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtNode* pTxtNd = 0;
- USHORT nNumId;
- BYTE nLvl = 0;
+ sal_uInt16 nNumId;
+ sal_uInt8 nLvl = 0;
if ( rNumRule.GetValue().Len() )
{
const SwNumRule* pRule = GetExport().pDoc->FindNumRulePtr(
@@ -3310,11 +3310,11 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
if( pTxtNd->IsCountedInList())
{
- nLvl = static_cast< BYTE >(pTxtNd->GetActualListLevel());
+ nLvl = static_cast< sal_uInt8 >(pTxtNd->GetActualListLevel());
if ( pTxtNd->IsListRestart() )
{
- USHORT nStartWith = static_cast< USHORT >( pTxtNd->GetActualListStartValue() );
+ sal_uInt16 nStartWith = static_cast< sal_uInt16 >( pTxtNd->GetActualListStartValue() );
nNumId = GetExport().DuplicateNumRule( pRule, nLvl, nStartWith );
if ( USHRT_MAX != nNumId )
++nNumId;
@@ -3333,7 +3333,7 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtFmtColl* pC = (SwTxtFmtColl*)GetExport().pOutFmtNode;
if ( pC && pC->IsAssignedToListLevelOfOutlineStyle() )
- nLvl = static_cast< BYTE >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
+ nLvl = static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
}
}
}
@@ -3358,9 +3358,9 @@ void WW8AttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
{
// write sprmPIlvl and sprmPIlfo
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlvl );
- m_rWW8Export.pO->Insert( ::sal::static_int_cast<BYTE>(nLvl), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( ::sal::static_int_cast<sal_uInt8>(nLvl), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlfo );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<UINT16>(nNumId) );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<sal_uInt16>(nNumId) );
}
else if ( pTxtNd && m_rWW8Export.Out_SwNum( pTxtNd ) ) // NumRules
m_rWW8Export.pSepx->SetNum( pTxtNd );
@@ -3383,7 +3383,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaWidth );
else
m_rWW8Export.pO->Insert( 28, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rSize.GetWidth() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rSize.GetWidth() );
}
if ( rSize.GetHeight() )
@@ -3394,12 +3394,12 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
else
m_rWW8Export.pO->Insert( 45, m_rWW8Export.pO->Count() );
- USHORT nH = 0;
+ sal_uInt16 nH = 0;
switch ( rSize.GetHeightSizeType() )
{
case ATT_VAR_SIZE: break;
- case ATT_FIX_SIZE: nH = (USHORT)rSize.GetHeight() & 0x7fff; break;
- default: nH = (USHORT)rSize.GetHeight() | 0x8000; break;
+ case ATT_FIX_SIZE: nH = (sal_uInt16)rSize.GetHeight() & 0x7fff; break;
+ default: nH = (sal_uInt16)rSize.GetHeight() | 0x8000; break;
}
m_rWW8Export.InsUInt16( nH );
}
@@ -3441,18 +3441,18 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
// direkt nach Schreiben des CR gerufen werden.
// Rueckgabe: FilePos des ersetzten CRs + 1 oder 0 fuer nicht ersetzt
-ULONG WW8Export::ReplaceCr( BYTE nChar )
+sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar )
{
OSL_ENSURE( nChar, "gegen 0 ersetzt bringt WW97/95 zum Absturz" );
bool bReplaced = false;
SvStream& rStrm = Strm();
- ULONG nRetPos = 0, nPos = rStrm.Tell();
+ sal_uLong nRetPos = 0, nPos = rStrm.Tell();
//If there is at least two characters already output
- if (nPos - (IsUnicode() ? 2 : 1) >= ULONG(pFib->fcMin))
+ if (nPos - (IsUnicode() ? 2 : 1) >= sal_uLong(pFib->fcMin))
{
- BYTE nBCode=0;
- UINT16 nUCode=0;
+ sal_uInt8 nBCode=0;
+ sal_uInt16 nUCode=0;
rStrm.SeekRel(IsUnicode() ? -2 : -1);
if (IsUnicode())
@@ -3466,7 +3466,7 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
if (nUCode == 0x0d) // CR ?
{
if ((nChar == 0x0c) &&
- (nPos - (IsUnicode() ? 4 : 2) >= ULONG(pFib->fcMin)))
+ (nPos - (IsUnicode() ? 4 : 2) >= sal_uLong(pFib->fcMin)))
{
rStrm.SeekRel( IsUnicode() ? -4 : -2 );
if (IsUnicode())
@@ -3517,9 +3517,9 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
void WW8AttributeOutput::TableRowEnd(sal_uInt32 nDepth)
{
if ( nDepth == 1 )
- m_rWW8Export.WriteChar( (BYTE)0x07 );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x07 );
else if ( nDepth > 1 )
- m_rWW8Export.WriteChar( (BYTE)0x0d );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x0d );
//Technically in a word document this is a different value for a row ends
//that are not row ends directly after a cell with a graphic. But it
@@ -3568,7 +3568,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
else if ( !GetExport().mpParentFrame )
{
- BYTE nC = 0;
+ sal_uInt8 nC = 0;
bool bBefore = false;
// #i76300# - Note: Can only be <true>, if <bBefore> equals <false>.
bool bCheckForFollowPageDesc = false;
@@ -3635,7 +3635,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
}
-void WW8AttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* /*pSectionInfo*/ )
+void WW8AttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* /*pSectionInfo*/ )
{
m_rWW8Export.ReplaceCr( nC );
}
@@ -3644,7 +3644,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
{
if ( m_rWW8Export.bOutPageDescs && m_rWW8Export.bWrtWW8 )
{
- UINT16 nGridType = 0;
+ sal_uInt16 nGridType = 0;
switch ( rGrid.GetGridType() )
{
default:
@@ -3665,7 +3665,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
m_rWW8Export.InsUInt16( NS_sprm::LN_SClm );
m_rWW8Export.InsUInt16( nGridType );
- UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaLinePitch );
m_rWW8Export.InsUInt16( nHeight );
@@ -3681,7 +3681,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
}
sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
rGrid.GetBaseWidth( );
- INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
m_rWW8Export.InsUInt32( nCharSpace );
@@ -3692,7 +3692,7 @@ void WW8AttributeOutput::FormatPaperBin( const SvxPaperBinItem& rPaperBin )
{
if ( m_rWW8Export.bOutPageDescs )
{
- USHORT nVal;
+ sal_uInt16 nVal;
switch ( rPaperBin.GetValue() )
{
case 0: nVal = 15; break; // Automatically select
@@ -3725,11 +3725,11 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
else
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // PageDescs
{
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rWW8Export.HasItem( RES_BOX );
if ( pItem )
{
@@ -3738,8 +3738,8 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLR.GetLeft();
- nRDist = nRDist + (USHORT)rLR.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLR.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLR.GetRight();
// sprmSDxaLeft
if( m_rWW8Export.bWrtWW8 )
@@ -3761,24 +3761,24 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845E ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
else
{
m_rWW8Export.pO->Insert( 17, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
// sprmPDxaRight
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845D ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
else
{
m_rWW8Export.pO->Insert( 16, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
// sprmPDxaLeft1
@@ -3807,7 +3807,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
else
m_rWW8Export.pO->Insert( 48, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // Page-UL
{
@@ -3969,7 +3969,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( m_rWW8Export.bOutFlyFrmAttrs )
{
- BYTE nP = 0;
+ sal_uInt8 nP = 0;
switch ( rAnchor.GetAnchorId() )
{
case FLY_AT_PAGE:
@@ -4026,14 +4026,14 @@ void WW8AttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
- USHORT nDist, bool bShadow)
+ sal_uInt16 nDist, bool bShadow)
{
// M.M. This function writes out border lines to the word format similar to
// what SwRTFWriter::OutRTFBorder does in the RTF filter Eventually it
// would be nice if all this functionality was in the one place
WW8_BRC aBrc;
- UINT16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
- BYTE brcType = 0, nColCode = 0;
+ sal_uInt16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
+ sal_uInt8 brcType = 0, nColCode = 0;
if( nWidth ) // Linie ?
{
@@ -4094,17 +4094,17 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
// BRC.dxpSpace
- USHORT nLDist = nDist;
+ sal_uInt16 nLDist = nDist;
nLDist /= 20; // Masseinheit : pt
if( nLDist > 0x1f )
nLDist = 0x1f;
if( bWrtWW8 )
{
- aBrc.aBits1[0] = BYTE(nWidth);
+ aBrc.aBits1[0] = sal_uInt8(nWidth);
aBrc.aBits1[1] = brcType;
aBrc.aBits2[0] = nColCode;
- aBrc.aBits2[1] = BYTE(nLDist);
+ aBrc.aBits2[1] = sal_uInt8(nLDist);
// fShadow, keine weiteren Einstellungen im WW moeglich
if( bShadow )
@@ -4112,7 +4112,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
else
{
- USHORT aBits = nWidth + ( brcType << 3 );
+ sal_uInt16 aBits = nWidth + ( brcType << 3 );
aBits |= (nColCode & 0x1f) << 6;
aBits |= nLDist << 11;
// fShadow, keine weiteren Einstellungen im WW moeglich
@@ -4129,7 +4129,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
// Wenn nSprmNo == 0, dann wird der Opcode nicht ausgegeben.
// bShadow darf bei Tabellenzellen *nicht* gesetzt sein !
void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow)
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow)
{
OSL_ENSURE( ( nSprmNo == 0 ) ||
( nSprmNo >= 38 && nSprmNo <= 41 ) ||
@@ -4155,7 +4155,7 @@ void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
{
// WW95-SprmIds
if ( nSprmNo != 0 )
- rO.Insert( (BYTE)( nSprmNo ), rO.Count() );
+ rO.Insert( (sal_uInt8)( nSprmNo ), rO.Count() );
rO.Insert( aBrc.aBits1, 2, rO.Count() );
}
}
@@ -4167,7 +4167,7 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
if ( bOutPageDescs && !bWrtWW8 )
return; // no page ouline in WW6
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -4184,8 +4184,8 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
38, 39, 40, 41
};
- const USHORT* pBrd = aBorders;
- for( USHORT i = 0; i < 4; ++i, ++pBrd )
+ const sal_uInt16* pBrd = aBorders;
+ for( sal_uInt16 i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -4210,13 +4210,13 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * pBox )
{
// moeglich und vielleicht besser waere 0xffff
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
static const SvxBorderLine aBorderLine;
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn;
@@ -4260,7 +4260,7 @@ SwTwips WW8Export::CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
return nPageSize;
}
-void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
+void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
{
// CColumns
if ( m_rWW8Export.bWrtWW8 )
@@ -4295,17 +4295,17 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
//sprmSDxaColWidth
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaColWidth );
else
m_rWW8Export.pO->Insert( 136, m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n, m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rCol.
CalcPrtColWidth( n,
- ( USHORT ) nPageSize ) );
+ ( sal_uInt16 ) nPageSize ) );
if ( n + 1 != nCols )
{
@@ -4315,7 +4315,7 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
else
m_rWW8Export.pO->Insert( 137,
m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n,
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n,
m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rColumns[n]->GetRight( ) +
rColumns[n + 1]->GetLeft( ) );
@@ -4328,7 +4328,7 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
{
const SwColumns& rColumns = rCol.GetColumns();
- USHORT nCols = rColumns.Count();
+ sal_uInt16 nCols = rColumns.Count();
if ( 1 < nCols && !GetExport( ).bOutFlyFrmAttrs )
{
// dann besorge mal die Seitenbreite ohne Raender !!
@@ -4370,12 +4370,12 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
// Nachsehen, ob alle Spalten gleich sind
bool bEven = true;
- USHORT n;
- USHORT nColWidth = rCol.CalcPrtColWidth( 0, (USHORT)nPageSize );
+ sal_uInt16 n;
+ sal_uInt16 nColWidth = rCol.CalcPrtColWidth( 0, (sal_uInt16)nPageSize );
for ( n = 1; n < nCols; n++ )
{
short nDiff = nColWidth -
- rCol.CalcPrtColWidth( n, (USHORT)nPageSize );
+ rCol.CalcPrtColWidth( n, (sal_uInt16)nPageSize );
if ( nDiff > 10 || nDiff < -10 ) // Toleranz: 10 tw
{
@@ -4495,8 +4495,8 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
{
// sprmPJc
- BYTE nAdj = 255;
- BYTE nAdjBiDi = 255;
+ sal_uInt8 nAdj = 255;
+ sal_uInt8 nAdjBiDi = 255;
switch ( rAdjust.GetAdjust() )
{
case SVX_ADJUST_LEFT:
@@ -4573,7 +4573,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
if ( !m_rWW8Export.bWrtWW8 ) //8+ only
return;
- UINT16 nTextFlow=0;
+ sal_uInt16 nTextFlow=0;
bool bBiDi = false;
short nDir = rDirection.GetValue();
@@ -4662,9 +4662,9 @@ void WW8AttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
class SwWW8WrTabu
{
- BYTE* pDel; // DelArray
- BYTE* pAddPos; // AddPos-Array
- BYTE* pAddTyp; // AddTyp-Array
+ sal_uInt8* pDel; // DelArray
+ sal_uInt8* pAddPos; // AddPos-Array
+ sal_uInt8* pAddTyp; // AddTyp-Array
sal_uInt16 nAdd; // so viele Tabs kommen hinzu
sal_uInt16 nDel; // so viele Tabs fallen weg
public:
@@ -4679,9 +4679,9 @@ public:
SwWW8WrTabu::SwWW8WrTabu(sal_uInt16 nDelMax, sal_uInt16 nAddMax)
: nAdd(0), nDel(0)
{
- pDel = nDelMax ? new BYTE[nDelMax * 2] : 0;
- pAddPos = new BYTE[nAddMax * 2];
- pAddTyp = new BYTE[nAddMax];
+ pDel = nDelMax ? new sal_uInt8[nDelMax * 2] : 0;
+ pAddPos = new sal_uInt8[nAddMax * 2];
+ pAddTyp = new sal_uInt8[nAddMax];
}
SwWW8WrTabu::~SwWW8WrTabu()
@@ -4699,7 +4699,7 @@ void SwWW8WrTabu::Add(const SvxTabStop & rTS, long nAdjustment)
pAddPos + (nAdd * 2));
// Tab-Typ eintragen
- BYTE nPara = 0;
+ sal_uInt8 nPara = 0;
switch (rTS.GetAdjustment())
{
case SVX_TAB_ADJUST_RIGHT:
@@ -4788,7 +4788,7 @@ static void ParaTabStopAdd( WW8Export& rWrt, const SvxTabStopItem& rTStops,
{
SwWW8WrTabu aTab( 0, rTStops.Count());
- for( USHORT n = 0; n < rTStops.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTStops.Count(); n++ )
{
const SvxTabStop& rTS = rTStops[n];
// Def-Tabs ignorieren
@@ -4814,8 +4814,8 @@ static void ParaTabStopDelAdd( WW8Export& rWrt, const SvxTabStopItem& rTStyle,
{
SwWW8WrTabu aTab(rTStyle.Count(), rTNew.Count());
- USHORT nO = 0; // rTStyle Index
- USHORT nN = 0; // rTNew Index
+ sal_uInt16 nO = 0; // rTStyle Index
+ sal_uInt16 nN = 0; // rTNew Index
do {
const SvxTabStop* pTO;
@@ -5159,7 +5159,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
}
}
-void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault )
+void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault )
{
// based on OutputItemSet() from wrt_fn.cxx
@@ -5190,7 +5190,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep
else
{
SfxWhichIter aIter( *pSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
if ( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index cfced61d6371..fa9c1703e3b7 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -91,7 +91,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline );
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -99,7 +99,7 @@ public:
virtual void OutputFKP();
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
@@ -120,27 +120,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwIdi, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -148,7 +148,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -162,7 +162,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -176,24 +176,24 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Special header/footer flags, needed for old versions only.
- virtual void SectionWW6HeaderFooterFlags( BYTE nHeadFootFlags );
+ virtual void SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags );
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -371,7 +371,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -403,24 +403,24 @@ protected:
///
/// We have to remember these positions between the StartStyle() and
/// EndStyle().
- USHORT nPOPosStdLen1, nPOPosStdLen2;
+ sal_uInt16 nPOPosStdLen1, nPOPosStdLen2;
/// For output of styles.
///
/// We have to remember this position between StartStyleProperties() and
/// EndStyleProperties().
- USHORT m_nStyleStartSize, m_nStyleLenPos;
+ sal_uInt16 m_nStyleStartSize, m_nStyleLenPos;
/// For output of styles.
///
/// Used between StartStyles() and EndStyles().
- ULONG m_nStyAnzPos;
+ sal_uLong m_nStyAnzPos;
/// For output of run properties.
///
/// We have to remember the number of field results, and do not export end
/// of the field results if we were forced to split text.
- USHORT m_nFieldResults;
+ sal_uInt16 m_nFieldResults;
public:
WW8AttributeOutput( WW8Export &rWW8Export ) : AttributeOutputBase(), m_rWW8Export( rWW8Export ) {}
@@ -432,10 +432,10 @@ public:
protected:
/// Output the bold etc. attributes
- void OutputWW8Attribute( BYTE nId, bool bVal );
+ void OutputWW8Attribute( sal_uInt8 nId, bool bVal );
/// Output the bold etc. attributes, the Complex Text Layout version
- void OutputWW8AttributeCTL( BYTE nId, bool bVal );
+ void OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal );
};
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 3dc151feb782..380b38a34411 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -45,7 +45,7 @@
#include "ww8par.hxx"
-WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
+WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, sal_uInt8 nVersion,
SvStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
{
@@ -69,7 +69,7 @@ WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
{
bool bRet=false;
- for( USHORT nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
+ for( sal_uInt16 nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
{
SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ --nCnt ];
if ( RES_FLYFRMFMT != pFrmFmt->Which() &&
@@ -120,7 +120,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
{
SwTxtFmtColl* pColl = pD->GetTxtCollFromPool
(RES_POOLCOLL_STANDARD, false);
- USHORT nGlosEntry = 0;
+ sal_uInt16 nGlosEntry = 0;
SwCntntNode* pCNd = 0;
do {
SwPaM aPam( aStart );
@@ -154,7 +154,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// sttbfglsystyle list that this entry belongs to. Unused at the
// moment
const ww::bytes &rData = rExtra[nGlosEntry];
- USHORT n = SVBT16ToShort( &(rData[2]) );
+ sal_uInt16 n = SVBT16ToShort( &(rData[2]) );
if(n != 0xFFFF)
{
rBlocks.ClearDoc();
@@ -164,9 +164,9 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// Need to check make sure the shortcut is not already being used
xub_StrLen nStart = 0;
- USHORT nCurPos = rBlocks.GetIndex( sShortcut );
+ sal_uInt16 nCurPos = rBlocks.GetIndex( sShortcut );
xub_StrLen nLen = sShortcut.Len();
- while( (USHORT)-1 != nCurPos )
+ while( (sal_uInt16)-1 != nCurPos )
{
sShortcut.Erase( nLen ) +=
String::CreateFromInt32( ++nStart ); // add an Number to it
@@ -217,9 +217,9 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
rStrm->Seek(0);
- if ( 0 != (nStrings = static_cast< USHORT >(aStrings.size())))
+ if ( 0 != (nStrings = static_cast< sal_uInt16 >(aStrings.size())))
{
- SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
+ SfxObjectShellLock xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
if (xDocSh->DoInitNew(0))
{
SwDoc *pD = ((SwDocShell*)(&xDocSh))->GetDoc();
@@ -256,11 +256,11 @@ bool WW8GlossaryFib::IsGlossaryFib()
return fGlsy;
}
-UINT32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
+sal_uInt32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
SvStream & /* rStrm */,
const WW8Fib &rFib)
{
- UINT32 nGlossaryFibOffset = 0;
+ sal_uInt32 nGlossaryFibOffset = 0;
if ( rFib.fDot ) // its a template
{
if ( rFib.pnNext )
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index c2d0a6ca64c5..fe7b4a33bf63 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -43,12 +43,12 @@ class SwNodeIndex;
class WW8GlossaryFib : public WW8Fib
{
public:
- WW8GlossaryFib( SvStream& rStrm, BYTE nWantedVersion ,
+ WW8GlossaryFib( SvStream& rStrm, sal_uInt8 nWantedVersion ,
SvStream& rTableStrm, const WW8Fib &rFib) : WW8Fib(rStrm,
nWantedVersion,FindGlossaryFibOffset(rTableStrm,rStrm,rFib)) {}
bool IsGlossaryFib();
private:
- UINT32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
+ sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
const WW8Fib &rFib);
};
@@ -65,18 +65,18 @@ private:
class WW8Glossary
{
public:
- WW8Glossary( SvStorageStreamRef &refStrm, BYTE nVersion, SvStorage *pStg=0);
+ WW8Glossary( SvStorageStreamRef &refStrm, sal_uInt8 nVersion, SvStorage *pStg=0);
bool Load( SwTextBlocks &rBlocks, bool bSaveRelFile );
~WW8Glossary() { delete pGlossary; }
WW8GlossaryFib *GetFib() { return pGlossary; }
- USHORT GetNoStrings() const { return nStrings; }
+ sal_uInt16 GetNoStrings() const { return nStrings; }
private:
WW8GlossaryFib *pGlossary;
SvStorageStreamRef xTableStream;
SvStorageStreamRef &rStrm;
SvStorageRef xStg;
- USHORT nStrings;
+ sal_uInt16 nStrings;
bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile,
const ::std::vector<String>& rStrings,
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 8f02c97302b5..047b3ace270c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -152,7 +152,7 @@ Color WW8TransCol(SVBT32 nWC)
if (nWC[3] & 0x1)
{
//Special colour gray
- BYTE u = (BYTE)( (ULONG)( 200 - nWC[0] ) * 256 / 200 );
+ sal_uInt8 u = (sal_uInt8)( (sal_uLong)( 200 - nWC[0] ) * 256 / 200 );
return Color(u, u, u);
}
@@ -221,7 +221,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
if( SVBT16ToShort( rL.lnps ) >= 1
&& SVBT16ToShort(rL.lnps ) <= 4 ){ // LinienStil
rSet.Put( XLineStyleItem( XLINE_DASH ) );
- INT16 nLen = SVBT16ToShort( rL.lnpw );
+ sal_Int16 nLen = SVBT16ToShort( rL.lnpw );
XDash aD( XDASH_RECT, 1, 2 * nLen, 1, 5 * nLen, 5 * nLen );
switch( SVBT16ToShort( rL.lnps ) ){
case 1: aD.SetDots( 0 ); // Dash
@@ -253,7 +253,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{
- static BYTE nPatA[] =
+ static sal_uInt8 nPatA[] =
{
0, 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80,
90, 50, 50, 50, 50, 50, 50, 33, 33, 33, 33, 33, 33
@@ -274,12 +274,12 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{ // Brush -> Farbmischung
Color aB( WW8TransCol( rFill.dlpcBg ) );
Color aF( WW8TransCol( rFill.dlpcFg ) );
- aB.SetRed( (BYTE)( ( (ULONG)aF.GetRed() * nPatA[nPat]
- + (ULONG)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetGreen( (BYTE)( ( (ULONG)aF.GetGreen() * nPatA[nPat]
- + (ULONG)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetBlue( (BYTE)( ( (ULONG)aF.GetBlue() * nPatA[nPat]
- + (ULONG)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetRed( (sal_uInt8)( ( (sal_uLong)aF.GetRed() * nPatA[nPat]
+ + (sal_uLong)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetGreen( (sal_uInt8)( ( (sal_uLong)aF.GetGreen() * nPatA[nPat]
+ + (sal_uLong)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetBlue( (sal_uInt8)( ( (sal_uLong)aF.GetBlue() * nPatA[nPat]
+ + (sal_uLong)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
rSet.Put( XFillColorItem( aEmptyStr, aB ) );
}
}
@@ -288,7 +288,7 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
WW8_DP_LINETYPE& rLt )
{
- UINT16 aSB = SVBT16ToShort( rLe.aStartBits );
+ sal_uInt16 aSB = SVBT16ToShort( rLe.aStartBits );
if( aSB & 0x3 )
{
::basegfx::B2DPolygon aPolygon;
@@ -297,14 +297,14 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineEndItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aSB >> 2 & 0x3 ) + ( aSB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineEndWidthItem(nSiz));
rSet.Put(XLineEndCenterItem(false));
}
- UINT16 aEB = SVBT16ToShort( rLe.aEndBits );
+ sal_uInt16 aEB = SVBT16ToShort( rLe.aEndBits );
if( aEB & 0x3 ){
::basegfx::B2DPolygon aPolygon;
aPolygon.append(::basegfx::B2DPoint(0.0, 330.0));
@@ -312,7 +312,7 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineStartItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aEB >> 2 & 0x3 ) + ( aEB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineStartWidthItem(nSiz));
@@ -334,13 +334,13 @@ SdrObject* SwWW8ImplReader::ReadLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
Point& rP0 = aP[0];
Point& rP1 = aP[1];
- rP0.X() = (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
- rP0.Y() = (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
+ rP0.X() = (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
+ rP0.Y() = (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
rP1 = rP0;
- rP0.X() += (INT16)SVBT16ToShort( aLine.xaStart );
- rP0.Y() += (INT16)SVBT16ToShort( aLine.yaStart );
- rP1.X() += (INT16)SVBT16ToShort( aLine.xaEnd );
- rP1.Y() += (INT16)SVBT16ToShort( aLine.yaEnd );
+ rP0.X() += (sal_Int16)SVBT16ToShort( aLine.xaStart );
+ rP0.Y() += (sal_Int16)SVBT16ToShort( aLine.yaStart );
+ rP1.X() += (sal_Int16)SVBT16ToShort( aLine.xaEnd );
+ rP1.Y() += (sal_Int16)SVBT16ToShort( aLine.yaEnd );
}
::basegfx::B2DPolygon aPolygon;
@@ -362,11 +362,11 @@ SdrObject* SwWW8ImplReader::ReadRect( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aRect, sizeof( aRect ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( Rectangle( aP0, aP1 ) );
@@ -384,11 +384,11 @@ SdrObject* SwWW8ImplReader::ReadElipse( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aElipse, sizeof( aElipse ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrCircObj( OBJ_CIRC, Rectangle( aP0, aP1 ) );
@@ -406,22 +406,22 @@ SdrObject* SwWW8ImplReader::ReadArc( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aArc, sizeof( aArc ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa ) * 2;
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya ) * 2;
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa ) * 2;
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ) * 2;
short nA[] = { 2, 3, 1, 0 };
short nW = nA[ ( ( SVBT8ToByte( aArc.fLeft ) & 1 ) << 1 )
+ ( SVBT8ToByte( aArc.fUp ) & 1 ) ];
if( !SVBT8ToByte( aArc.fLeft ) ){
- aP0.Y() -= (INT16)SVBT16ToShort( pHd->dya );
- aP1.Y() -= (INT16)SVBT16ToShort( pHd->dya );
+ aP0.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
+ aP1.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
}
if( SVBT8ToByte( aArc.fUp ) ){
- aP0.X() -= (INT16)SVBT16ToShort( pHd->dxa );
- aP1.X() -= (INT16)SVBT16ToShort( pHd->dxa );
+ aP0.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
}
SdrObject* pObj = new SdrCircObj( OBJ_SECT, Rectangle( aP0, aP1 ),
@@ -441,18 +441,18 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aPoly, sizeof( aPoly ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
Polygon aP( nCount );
Point aPt;
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<nCount; i++ ){
aPt.X() = SVBT16ToShort( pP[i << 1] ) + nDrawXOfs2
- + (INT16)SVBT16ToShort( pHd->xa );
+ + (sal_Int16)SVBT16ToShort( pHd->xa );
aPt.Y() = SVBT16ToShort( pP[( i << 1 ) + 1] ) + nDrawYOfs2
- + (INT16)SVBT16ToShort( pHd->ya );
+ + (sal_Int16)SVBT16ToShort( pHd->ya );
aP[i] = aPt;
}
delete[] pP;
@@ -466,9 +466,9 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
{
- USHORT nPCnt = mpDrawEditEngine->GetParagraphCount();
- USHORT nSP = 0;
- USHORT nEP = 0;
+ sal_uInt16 nPCnt = mpDrawEditEngine->GetParagraphCount();
+ sal_uInt16 nSP = 0;
+ sal_uInt16 nEP = 0;
while( (nSP < nPCnt)
&& (nCpStart >= mpDrawEditEngine->GetTextLen( nSP ) + 1) )
{
@@ -483,7 +483,7 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
nCpEnd -= mpDrawEditEngine->GetTextLen( nEP ) + 1;
nEP++;
}
- return ESelection( nSP, (USHORT)nCpStart, nEP, (USHORT)nCpEnd );
+ return ESelection( nSP, (sal_uInt16)nCpStart, nEP, (sal_uInt16)nCpEnd );
}
// InsertTxbxStyAttrs() setzt die Style-Attribute in den uebergebenen ItemSet.
@@ -496,13 +496,13 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
// ignoriert.
// Es werden hierbei sowohl Para- wie auch Zeichen-Attribute in den
// ItemSet gestopft.
-void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
+void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl )
{
SwWW8StyInf * pStyInf = GetStyle(nColl);
if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl )
{
const SfxPoolItem* pItem;
- for( USHORT i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
+ for( sal_uInt16 i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
{
//If we are set in the source and not set in the destination
//then add it in.
@@ -510,8 +510,8 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
i, true, &pItem ) )
{
SfxItemPool *pEditPool = rS.GetPool();
- USHORT nWhich = i;
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nWhich = i;
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -532,7 +532,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
static void lcl_StripFields(String &rString, long &rNewStartCp)
{
- for(USHORT i=0; i < rString.Len(); i++)
+ for(sal_uInt16 i=0; i < rString.Len(); i++)
{
if( 0x13 == rString.GetChar( i ) )
{
@@ -626,7 +626,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
std::deque<Chunk> aChunks;
//Here store stack location
- USHORT nCurrentCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCurrentCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
while (nStart < nEndCp)
{
//nStart is the beginning of the attributes for this range, and
@@ -684,14 +684,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
{
if (bStartAttr)
{
- USHORT nCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
if (maFieldStack.empty() && Read_Field(&aRes))
{
String sURL;
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCount; --nI)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[nI-1])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if (nWhich == RES_TXTATR_INETFMT)
{
const SwFmtINetFmt *pURL =
@@ -724,14 +724,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//to draw attributes
if (pCtrlStck->Count() - nCurrentCount)
{
- for (USHORT i = nCurrentCount; i < pCtrlStck->Count(); i++)
+ for (sal_uInt16 i = nCurrentCount; i < pCtrlStck->Count(); i++)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[i])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if( nWhich < RES_FLTRATTR_BEGIN ||
nWhich >= RES_FLTRATTR_END )
{
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -763,7 +763,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//pop off as far as recorded location just in case there were some left
//unclosed
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
pCtrlStck->DeleteAndDestroy(nI-1);
typedef std::deque<Chunk>::iterator myIter;
@@ -802,7 +802,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
}
bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
- USHORT nTxBxS, USHORT nSequence)
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence)
{
// rasch den TextBox-PLCF greifen
WW8PLCFspecial* pT = pPlcxMan ? pPlcxMan->GetTxbx() : 0;
@@ -867,7 +867,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
return false;
}
// ggfs. entsprechende Anzahl Eintraege weitergehen
- for(USHORT iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
+ for(sal_uInt16 iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
// dann die tatsaechlichen Start und Ende ermitteln
if( (!pT->Get( rStartCp, pT0 ))
|| ( nMinStartCp > rStartCp ) )
@@ -910,7 +910,7 @@ bool SwWW8ImplReader::GetRangeAsDrawingString(String& rString, long nStartCp, lo
else if (nStartCp < nEndCp)
{
// den Text einlesen: kann sich ueber mehrere Pieces erstrecken!!!
- USHORT nLen = pSBase->WW8ReadString(*pStrm, rString,
+ sal_uInt16 nLen = pSBase->WW8ReadString(*pStrm, rString,
nStartCp + nOffset, nEndCp - nStartCp, GetCurrentCharSet());
OSL_ENSURE(nLen, "+Wo ist der Grafik-Text (8) ?");
if (nLen)
@@ -971,13 +971,13 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(String &rString, WW8_CP nS
// InsertTxbxText() fuegt fuer TextBoxen und CaptionBoxen den Text
// und die Attribute ein
SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
- Size* pObjSiz, USHORT nTxBxS, USHORT nSequence, long nPosCp,
+ Size* pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp,
SwFrmFmt* pOldFlyFmt, bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText, long* pnStartCp, long* pnEndCp,
bool* pbContainsGraphics, SvxMSDffImportRec* pRecord)
{
SwFrmFmt* pFlyFmt = 0;
- ULONG nOld = pStrm->Tell();
+ sal_uLong nOld = pStrm->Tell();
ManTypes eType = pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : MAN_TXBX;
@@ -1029,13 +1029,13 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen,
*mpSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for( int nLoop = 0; nLoop < 2; ++nLoop )
{
while( aSprmIter.GetSprms()
&& (0 != (pParams = aSprmIter.GetAktParams())) )
{
- USHORT nAktId = aSprmIter.GetAktId();
+ sal_uInt16 nAktId = aSprmIter.GetAktId();
switch( nAktId )
{
case 75:
@@ -1184,7 +1184,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
}
-bool SwWW8ImplReader::TxbxChainContainsRealText(USHORT nTxBxS, long& rStartCp,
+bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartCp,
long& rEndCp)
{
bool bErase, bContainsText;
@@ -1204,17 +1204,17 @@ SdrObject* SwWW8ImplReader::ReadTxtBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aTxtB, sizeof( aTxtB ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( OBJ_TEXT, Rectangle( aP0, aP1 ) );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( pHd->dxa ) ,
- (INT16)SVBT16ToShort( pHd->dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( pHd->dxa ) ,
+ (sal_Int16)SVBT16ToShort( pHd->dya ) );
long nStartCpFly,nEndCpFly;
bool bContainsGraphics;
@@ -1246,33 +1246,33 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aCallB, sizeof( aCallB ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
- BYTE nTyp = (BYTE)nCount - 1;
+ sal_uInt8 nTyp = (sal_uInt8)nCount - 1;
if( nTyp == 1 && SVBT16ToShort( pP[0] ) == SVBT16ToShort( pP[2] ) )
nTyp = 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) +
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) +
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
- aP1.Y() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
- Point aP2( (INT16)SVBT16ToShort( pHd->xa )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
- + nDrawXOfs2 + (INT16)SVBT16ToShort( pP[0] ),
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
- + nDrawYOfs2 + (INT16)SVBT16ToShort( pP[1] ) );
+ aP1.X() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
+ Point aP2( (sal_Int16)SVBT16ToShort( pHd->xa )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
+ + nDrawXOfs2 + (sal_Int16)SVBT16ToShort( pP[0] ),
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
+ + nDrawYOfs2 + (sal_Int16)SVBT16ToShort( pP[1] ) );
delete[] pP;
SdrCaptionObj* pObj = new SdrCaptionObj( Rectangle( aP0, aP1 ), aP2 );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
bool bEraseThisObject;
InsertTxbxText(pObj, &aSize, 0, 0, 0, 0, false, bEraseThisObject );
@@ -1291,21 +1291,21 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet)
{
- INT16 nGrouped;
+ sal_Int16 nGrouped;
if( !ReadGrafStart( (void*)&nGrouped, sizeof( nGrouped ), pHd, pDo, rSet ) )
return 0;
#ifdef OSL_BIGENDIAN
- nGrouped = (INT16)SWAPSHORT( nGrouped );
+ nGrouped = (sal_Int16)SWAPSHORT( nGrouped );
#endif
- nDrawXOfs = nDrawXOfs + (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs + (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs + (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs + (sal_Int16)SVBT16ToShort( pHd->ya );
SdrObject* pObj = new SdrObjGroup;
- short nLeft = (INT16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
+ short nLeft = (sal_Int16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
for (int i = 0; i < nGrouped; i++)
{
SfxAllItemSet aSet(pDrawModel->GetItemPool());
@@ -1320,8 +1320,8 @@ SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
}
}
- nDrawXOfs = nDrawXOfs - (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs - (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs - (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs - (sal_Int16)SVBT16ToShort( pHd->ya );
return pObj;
}
@@ -1500,10 +1500,10 @@ const WW8_BordersSO &WW8_BordersSO::Get0x01LineMatch(eBorderCode eCode)
return aLineTabVer8[eCode];
}
-INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
- MSO_SPT eShapeType, INT32 &rThick)
+sal_Int32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
+ MSO_SPT eShapeType, sal_Int32 &rThick)
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
/*
Beachte: im Gegensatz zu den Winword-ueblichen Tabellen- und
Rahmen-Randbreiten-Angaben, bei denen jeweils aus der Staerke *einer*
@@ -1559,17 +1559,17 @@ INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
//Returns the thickness of the line outside the frame, the logic of
//words positioning of borders around floating objects is that of a
//disturbed mind.
-INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineThick,
+sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineThick,
SvxBoxItem& rBox )
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
if( !rLineThick )
return nOutsideThick;
WW8_BordersSO::eBorderCode nIdx = WW8_BordersSO::none;
- INT32 nLineThick=rLineThick;
+ sal_Int32 nLineThick=rLineThick;
nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
eShapeType, rLineThick);
@@ -1679,7 +1679,7 @@ INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
aLine.SetDistance(rBorders.mnDist);
aLine.SetStyle( rBorders.mnType );
- for(USHORT nLine = 0; nLine < 4; ++nLine)
+ for(sal_uInt16 nLine = 0; nLine < 4; ++nLine)
rBox.SetLine(new SvxBorderLine( aLine ), nLine);
}
@@ -1714,16 +1714,16 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const SfxItemSet& rOldSet = pSdrObj->GetMergedItemSet();
// einige Items koennen direkt so uebernommen werden
- const USHORT nDirectMatch = 2;
+ const sal_uInt16 nDirectMatch = 2;
static RES_FRMATR const aDirectMatch[ nDirectMatch ] =
{
RES_LR_SPACE, // Aussenabstand links/rechts: SvxLRSpaceItem
RES_UL_SPACE // Aussenabstand Oben/unten: SvxULSpaceItem
};
const SfxPoolItem* pPoolItem;
- for(USHORT nItem = 0; nItem < nDirectMatch; ++nItem)
+ for(sal_uInt16 nItem = 0; nItem < nDirectMatch; ++nItem)
if( SFX_ITEM_SET == rOldSet.GetItemState(
- static_cast< USHORT >(aDirectMatch[ nItem ]), false, &pPoolItem) )
+ static_cast< sal_uInt16 >(aDirectMatch[ nItem ]), false, &pPoolItem) )
{
rFlySet.Put( *pPoolItem );
}
@@ -1733,7 +1733,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// Rahmen-GROESSE benoetigt!
SvxBoxItem aBox(sw::util::ItemGet<SvxBoxItem>(rFlySet, RES_BOX));
// dashed oder solid wird zu solid
- INT32 nLineThick = 0, nOutside=0;
+ sal_Int32 nLineThick = 0, nOutside=0;
// check if LineStyle is *really* set!
const SfxPoolItem* pItem;
@@ -1786,13 +1786,13 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// set distances from box's border to text contained within the box
if( 0 < rInnerDist.Left() )
- aBox.SetDistance( (USHORT)rInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Left(), BOX_LINE_LEFT );
if( 0 < rInnerDist.Top() )
- aBox.SetDistance( (USHORT)rInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Top(), BOX_LINE_TOP );
if( 0 < rInnerDist.Right() )
- aBox.SetDistance( (USHORT)rInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Right(), BOX_LINE_RIGHT );
if( 0 < rInnerDist.Bottom() )
- aBox.SetDistance( (USHORT)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
bool bFixSize = !(WW8ITEMVALUE(rOldSet, SDRATTR_TEXT_AUTOGROWHEIGHT,
SdrTextAutoGrowHeightItem));
@@ -1843,14 +1843,14 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const Color aShdColor = static_cast< SdrShadowColorItem const & >(
rOldSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue();
- const INT32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
+ const sal_Int32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
SdrShadowXDistItem);
- const INT32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
+ const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
SdrShadowYDistItem);
aShadow.SetColor( Color( aShdColor ) );
- aShadow.SetWidth(writer_cast<USHORT>((Abs( nShdDistX) +
+ aShadow.SetWidth(writer_cast<sal_uInt16>((Abs( nShdDistX) +
Abs( nShdDistY )) / 2 ));
SvxShadowLocation eShdPosi;
@@ -1958,7 +1958,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
void SwWW8ImplReader::AdjustLRWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
{
- UINT32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ sal_uInt32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
if ( rRecord.pXRelTo )
{
nXRelTo = *(rRecord.pXRelTo);
@@ -1969,7 +1969,7 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 1)
{
if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
// Right adjustments - if horizontally aligned to right of
@@ -1977,19 +1977,19 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 3)
{
if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
//Inside margin, remove left wrapping
if ((rRecord.nXAlign == 4) && (nXRelTo == 0))
{
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
//Outside margin, remove left wrapping
if ((rRecord.nXAlign == 5) && (nXRelTo == 0))
{
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
}
@@ -1997,7 +1997,7 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
void SwWW8ImplReader::AdjustULWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
{
- UINT32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ sal_uInt32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
if ( rRecord.pYRelTo )
{
nYRelTo = *(rRecord.pYRelTo);
@@ -2008,7 +2008,7 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 1)
{
if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
// Bottom adjustment - remove bottom wrapping if aligned to page or
@@ -2016,12 +2016,12 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 3)
{
if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetLower((USHORT)0);
+ rUL.SetLower((sal_uInt16)0);
}
//Remove top margin if aligned vertically inside margin
if ((rRecord.nYAlign == 4) && (nYRelTo == 0))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
@@ -2032,15 +2032,15 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
if (pRecord->nDxWrapDistLeft || pRecord->nDxWrapDistRight)
{
- SvxLRSpaceItem aLR(writer_cast<USHORT>(pRecord->nDxWrapDistLeft),
- writer_cast<USHORT>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
+ SvxLRSpaceItem aLR(writer_cast<sal_uInt16>(pRecord->nDxWrapDistLeft),
+ writer_cast<sal_uInt16>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
AdjustLRWrapForWordMargins(*pRecord, aLR);
pFlyFmt->SetFmtAttr(aLR);
}
if (pRecord->nDyWrapDistTop || pRecord->nDyWrapDistBottom)
{
- SvxULSpaceItem aUL(writer_cast<USHORT>(pRecord->nDyWrapDistTop),
- writer_cast<USHORT>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(pRecord->nDyWrapDistTop),
+ writer_cast<sal_uInt16>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
AdjustULWrapForWordMargins(*pRecord, aUL);
pFlyFmt->SetFmtAttr(aUL);
}
@@ -2136,11 +2136,10 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
if( pIdx && 0 != (pGrfNd = rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() ))
{
Size aSz(pGrfNd->GetTwipSize());
- // use type <sal_uInt64> instead of <ULONG> to get correct results
+ // use type <sal_uInt64> instead of sal_uLong to get correct results
// in the following calculations.
sal_uInt64 rHeight = aSz.Height();
sal_uInt64 rWidth = aSz.Width();
- // <--
if( !rWidth && pF)
rWidth = pF->nXaRight - pF->nXaLeft;
else if( !rHeight && pF)
@@ -2203,7 +2202,7 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
//drawmode
if (WW8ITEMVALUE(rOldSet, SDRATTR_GRAFMODE, SdrGrafModeItem))
{
- SwDrawModeGrf aDrawMode( static_cast< USHORT >(WW8ITEMVALUE(rOldSet,
+ SwDrawModeGrf aDrawMode( static_cast< sal_uInt16 >(WW8ITEMVALUE(rOldSet,
SDRATTR_GRAFMODE, SdrGrafModeItem)) );
pGrfNd->SetAttr( aDrawMode );
}
@@ -2254,12 +2253,12 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
pRecord = &aRecordFromFSPA;
if (!(pRecord->pXRelTo) && pFSPA)
{
- pRecord->pXRelTo = new UINT32;
+ pRecord->pXRelTo = new sal_uInt32;
*(pRecord->pXRelTo) = pFSPA->nbx;
}
if (!(pRecord->pYRelTo) && pFSPA)
{
- pRecord->pYRelTo = new UINT32;
+ pRecord->pYRelTo = new sal_uInt32;
*(pRecord->pYRelTo) = pFSPA->nby;
}
@@ -2269,13 +2268,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
// nXRelTo - Page printable area, Page, Column, Character
// nYRelTo - Page printable area, Page, Paragraph, Line
- const UINT32 nCntXAlign = 6;
- const UINT32 nCntYAlign = 6;
+ const sal_uInt32 nCntXAlign = 6;
+ const sal_uInt32 nCntYAlign = 6;
- const UINT32 nCntRelTo = 4;
+ const sal_uInt32 nCntRelTo = 4;
- UINT32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
- UINT32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
+ sal_uInt32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
+ sal_uInt32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
if (pFSPA)
{
@@ -2297,11 +2296,10 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
*(pRecord->pYRelTo) = pFSPA->nby;
}
}
- // <--
}
- UINT32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
- UINT32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
+ sal_uInt32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
+ sal_uInt32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR; // #i43718#
@@ -2473,13 +2471,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
}
// #i84783#
-bool SwWW8ImplReader::IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const
+bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const
{
bool bIsObjectLayoutInTableCell = false;
if ( bVer8 )
{
- const UINT16 nWWVersion = pWwFib->nProduct & 0xE000;
+ const sal_uInt16 nWWVersion = pWwFib->nProduct & 0xE000;
switch ( nWWVersion )
{
case 0x0000: // version 8 aka Microsoft Word 97
@@ -2689,8 +2687,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
Get the record for top level object, so we can get the word anchoring
and wrapping information for it.
*/
- USHORT nRecCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nRecCount; ++nTxbx )
+ sal_uInt16 nRecCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nRecCount; ++nTxbx )
{
pRecord = aData.GetRecord( nTxbx );
if (pRecord && pRecord->pObj == pObject)
@@ -2711,7 +2709,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// inside table cell and its wrapping isn't 'SURROUND_THROUGH'
if (bLayoutInTableCell && eSurround != SURROUND_THROUGHT)
{
- SwFmtFollowTextFlow aFollowTextFlow( TRUE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_True );
aFlySet.Put( aFollowTextFlow );
}
@@ -2793,8 +2791,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
*/
if (aData.HasRecords())
{
- USHORT nCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nCount; ++nTxbx)
+ sal_uInt16 nCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nCount; ++nTxbx)
{
pRecord = aData.GetRecord(nTxbx);
if (pRecord && pRecord->pObj && pRecord->aTextId.nTxBxS)
@@ -2888,7 +2886,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
// Objekt ist Bestandteil einer Gruppe?
SdrObject* pGroupObject = pSdrTextObj->GetUpGroup();
- UINT32 nOrdNum = pSdrTextObj->GetOrdNum();
+ sal_uInt32 nOrdNum = pSdrTextObj->GetOrdNum();
bool bEraseThisObject;
InsertTxbxText( pSdrTextObj, &aObjSize, pRecord->aTextId.nTxBxS,
pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrmFmt,
@@ -3008,7 +3006,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
deleted and useless.
*/
pMSDffManager->StoreShapeOrder(pF->nSpId,
- (((ULONG)pRecord->aTextId.nTxBxS) << 16) +
+ (((sal_uLong)pRecord->aTextId.nTxBxS) << 16) +
pRecord->aTextId.nSequence, 0, pRetFrmFmt);
// The Kontakt object has to be inserted into the draw page, so
@@ -3210,8 +3208,8 @@ void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt)
void SwWW8FltAnchorStack::Flush()
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry *pEntry = (*this)[i];
SwPosition aDummy(pEntry->nMkNode);
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index c0f7affeb352..516660a5defa 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -35,11 +35,11 @@
struct EscherShape
{
- ULONG mnEscherShapeOrder;
- ULONG mnNoInlines;
+ sal_uLong mnEscherShapeOrder;
+ sal_uLong mnNoInlines;
// new member <mbInHeaderFooter>
bool mbInHeaderFooter;
- EscherShape( ULONG nEscherShapeOrder,
+ EscherShape( sal_uLong nEscherShapeOrder,
bool _bInHeaderFooter )
: mnEscherShapeOrder(nEscherShapeOrder),
mnNoInlines(0),
@@ -64,24 +64,24 @@ private:
std::vector<short> maDrawHeight;
typedef std::vector<short>::iterator myditer;
- std::stack<USHORT> maIndexes;
+ std::stack<sal_uInt16> maIndexes;
sw::util::SetLayer maSetLayer;
- ULONG mnNoInitialObjects;
- ULONG mnInlines;
+ sal_uLong mnNoInitialObjects;
+ sal_uLong mnInlines;
SdrPage* mpDrawPg;
const SvxMSDffShapeOrders *mpShapeOrders;
- USHORT GetEscherObjectIdx(ULONG nSpId);
- myeiter MapEscherIdxToIter(ULONG nIdx);
+ sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
+ myeiter MapEscherIdxToIter(sal_uLong nIdx);
// new parameter <_bInHeaderFooter>, indicating
// that object is in header or footer
- ULONG GetEscherObjectPos( ULONG nSpId,
+ sal_uLong GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- ULONG GetDrawingObjectPos(short nWwHeight);
- bool InsertObject(SdrObject *pObject, ULONG nPos);
+ sal_uLong GetDrawingObjectPos(short nWwHeight);
+ bool InsertObject(SdrObject *pObject, sal_uLong nPos);
public:
wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
const SvxMSDffShapeOrders *pShapeOrders);
@@ -93,10 +93,10 @@ public:
void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
// new parameter <_bInHeaderFooter>, indicating that object is in header or footer
void InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- void InsideEscher(ULONG nIndex);
+ void InsideEscher(sal_uLong nIndex);
void OutsideEscher();
};
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 3476226955ef..2bd9ab8b5681 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -71,7 +71,7 @@ wwZOrderer::wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
OSL_ENSURE(mpDrawPg,"Missing draw page impossible!");
}
-void wwZOrderer::InsideEscher(ULONG nSpId)
+void wwZOrderer::InsideEscher(sal_uLong nSpId)
{
maIndexes.push(GetEscherObjectIdx(nSpId));
}
@@ -83,15 +83,15 @@ void wwZOrderer::OutsideEscher()
// consider new parameter <_bInHeaderFooter>
void wwZOrderer::InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter )
{
- ULONG nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
+ sal_uLong nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
// <--
InsertObject(pObject, nInsertPos + mnNoInitialObjects + mnInlines);
}
-wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
+wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(sal_uLong nIdx)
{
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
@@ -104,12 +104,12 @@ wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
return aIter;
}
-USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
+sal_uInt16 wwZOrderer::GetEscherObjectIdx(sal_uLong nSpId)
{
- USHORT nFound=0;
- USHORT nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
+ sal_uInt16 nFound=0;
+ sal_uInt16 nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
// First, find out what position this shape is in in the Escher order.
- for (USHORT nShapePos=0; nShapePos < nShapeCount; nShapePos++)
+ for (sal_uInt16 nShapePos=0; nShapePos < nShapeCount; nShapePos++)
{
const SvxMSDffShapeOrder *pOrder = mpShapeOrders->GetObject(nShapePos);
if (pOrder->nShapeId == nSpId)
@@ -122,7 +122,7 @@ USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
}
// consider new parameter <_bInHeaderFooter>
-ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
+sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter )
{
/*
@@ -130,12 +130,12 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
the actual ordering that should be used when inserting them into the
document.
*/
- USHORT nFound = GetEscherObjectIdx(nSpId);
+ sal_uInt16 nFound = GetEscherObjectIdx(nSpId);
// Match the ordering position from the ShapeOrders to the ordering of all
// objects in the document, there is a complexity when escherobjects
// contain inlines objects, we need to consider thsose as part of the
// escher count
- ULONG nRet=0;
+ sal_uLong nRet=0;
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
// skip objects in page header|footer,
@@ -176,7 +176,7 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
// einem VarArr
void wwZOrderer::InsertDrawingObject(SdrObject* pObj, short nWwHeight)
{
- ULONG nPos = GetDrawingObjectPos(nWwHeight);
+ sal_uLong nPos = GetDrawingObjectPos(nWwHeight);
if (nWwHeight & 0x2000) // Heaven ?
maSetLayer.SendObjectToHeaven(*pObj);
else
@@ -197,10 +197,10 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
{
//If we are inside an escher objects, place us just after that
//escher obj, and increment its inline count
- USHORT nIdx = maIndexes.top();
+ sal_uInt16 nIdx = maIndexes.top();
myeiter aEnd = MapEscherIdxToIter(nIdx);
- ULONG nInsertPos=0;
+ sal_uLong nInsertPos=0;
myeiter aIter = maEscherLayer.begin();
while (aIter != aEnd)
{
@@ -225,7 +225,7 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
// Der Offset bei Datei in bestehendes Dokument mit Grafiklayer einfuegen
// muss der Aufrufer den Index um mnNoInitialObjects erhoeht werden, damit die
// neuen Objekte am Ende landen ( Einfuegen ist dann schneller )
-ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
+sal_uLong wwZOrderer::GetDrawingObjectPos(short nWwHeight)
{
myditer aIter = maDrawHeight.begin();
myditer aEnd = maDrawHeight.end();
@@ -241,7 +241,7 @@ ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
return std::distance(maDrawHeight.begin(), aIter);
}
-bool wwZOrderer::InsertObject(SdrObject* pObject, ULONG nPos)
+bool wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos)
{
if (!pObject->IsInserted())
{
@@ -262,11 +262,11 @@ bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
}
bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pbInDoc)
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pbInDoc)
{ // Grafik in File schreiben
*pbInDoc = true; // default
- ULONG nPosFc = nFilePos + rPic.cbHeader;
+ sal_uLong nPosFc = nFilePos + rPic.cbHeader;
switch (rPic.MFP.mm)
{
@@ -313,7 +313,7 @@ bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
struct WW8PicDesc
{
- INT16 nCL, nCR, nCT, nCB;
+ sal_Int16 nCL, nCR, nCT, nCB;
long nWidth, nHeight;
WW8PicDesc( const WW8_PIC& rPic );
@@ -367,14 +367,14 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD,
const Graphic* pGraph, const String& rFileName, const SfxItemSet& rGrfSet)
{
- UINT32 nWidth = rPD.nWidth;
- UINT32 nHeight = rPD.nHeight;
+ sal_uInt32 nWidth = rPD.nWidth;
+ sal_uInt32 nHeight = rPD.nHeight;
// Vertikale Verschiebung durch Zeilenabstand
- INT32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
+ sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
if( pSFlyPara->nLineSpace && pSFlyPara->nLineSpace > nNetHeight )
pSFlyPara->nYPos =
- (USHORT)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
+ (sal_uInt16)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
WW8FlySet aFlySet(*this, pWFlyPara, pSFlyPara, true);
@@ -424,7 +424,7 @@ SwFrmFmt* SwWW8ImplReader::MakeGrafInCntnt(const WW8_PIC& rPic,
}
SwFrmFmt* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt,
- ULONG nFilePos )
+ sal_uLong nFilePos )
{
SwFrmFmt* pRet = 0;
if( pSt->IsEof() || rPic.fError || rPic.MFP.mm == 99 )
@@ -499,7 +499,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
Wir mappen ansonsten die Variable pDataStream auf pStream.
*/
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nPicLocFc );
PicRead( pDataStream, &aPic, bVer67);
@@ -563,7 +563,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (0x66 == aPic.MFP.mm)
{
//These ones have names prepended
- BYTE nNameLen=0;
+ sal_uInt8 nNameLen=0;
*pDataStream >> nNameLen;
pDataStream->SeekRel( nNameLen );
}
@@ -653,7 +653,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
ReplaceObj(*pTextObj, *pObject);
else
{
- if (UINT16(OBJ_OLE2) == pObject->GetObjIdentifier())
+ if (sal_uInt16(OBJ_OLE2) == pObject->GetObjIdentifier())
{
// the size from BLIP, if there is any, should be already set
pRet = InsertOle(*((SdrOle2Obj*)pObject), aAttrSet, aGrSet);
@@ -743,7 +743,7 @@ void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
pPic->MFP.xExt = SVBT16ToShort( pPicS->MFP.xExt );
pPic->MFP.yExt = SVBT16ToShort( pPicS->MFP.yExt );
pPic->MFP.hMF = SVBT16ToShort( pPicS->MFP.hMF );
- for( USHORT i = 0; i < 14 ; i++ )
+ for( sal_uInt16 i = 0; i < 14 ; i++ )
pPic->rcWinMF[i] = SVBT8ToByte( pPicS->rcWinMF[i] );
pPic->dxaGoal = SVBT16ToShort( pPicS->dxaGoal );
pPic->dyaGoal = SVBT16ToShort( pPicS->dyaGoal );
@@ -769,7 +769,7 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
pFSPA->nXaRight = SVBT32ToUInt32( pFSPAS->nXaRight );
pFSPA->nYaBottom = SVBT32ToUInt32( pFSPAS->nYaBottom );
- USHORT nBits = SVBT16ToShort( pFSPAS->aBits1 );
+ sal_uInt16 nBits = SVBT16ToShort( pFSPAS->aBits1 );
pFSPA->bHdr = 0 != ( nBits & 0x0001 );
pFSPA->nbx = ( nBits & 0x0006 ) >> 1;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a2bae2ab3ca6..7bccdd6b027b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -32,13 +32,17 @@
#include <boost/unordered_set.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XStorage.hpp>
+
#include <unotools/ucbstreamhelper.hxx>
#include <tools/solar.h>
#include <rtl/tencinfo.h>
+#include <rtl/random.h>
#include <sot/storage.hxx>
#include <sfx2/docinf.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
#include <svtools/sfxecode.hxx>
@@ -108,6 +112,7 @@
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
#include <comphelper/extract.hxx>
+#include <comphelper/sequenceashashmap.hxx>
#include <fltini.hxx>
#include <algorithm>
@@ -249,9 +254,9 @@ SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr )
nSvxMSDffOLEConvFlags = SwMSDffManager::GetFilterFlags();
}
-UINT32 SwMSDffManager::GetFilterFlags()
+sal_uInt32 SwMSDffManager::GetFilterFlags()
{
- UINT32 nFlags(0);
+ sal_uInt32 nFlags(0);
if (const SvtFilterOptions* pOpt = SvtFilterOptions::Get())
{
if (pOpt->IsMathType2Math())
@@ -333,23 +338,23 @@ void SwMSDffManager::EnableFallbackStream()
pFallbackStream = 0;
}
-USHORT SwWW8ImplReader::GetToggleAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleAttrFlags() : 0;
}
-USHORT SwWW8ImplReader::GetToggleBiDiAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleBiDiAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleBiDiAttrFlags() : 0;
}
-void SwWW8ImplReader::SetToggleAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleAttrFlags(nFlags);
}
-void SwWW8ImplReader::SetToggleBiDiAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleBiDiAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleBiDiAttrFlags(nFlags);
@@ -398,9 +403,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
SEEK_FROM_CURRENT_AND_RESTART )
&& maShapeRecords.Current()->nRecLen )
{
- UINT32 nBytesLeft = maShapeRecords.Current()->nRecLen;
- UINT32 nUDData;
- UINT16 nPID;
+ sal_uInt32 nBytesLeft = maShapeRecords.Current()->nRecLen;
+ sal_uInt32 nUDData;
+ sal_uInt16 nPID;
while( 5 < nBytesLeft )
{
rSt >> nPID;
@@ -413,27 +418,27 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
case 0x0390:
if (pImpRec->pXRelTo)
delete pImpRec->pXRelTo;
- pImpRec->pXRelTo = new UINT32;
+ pImpRec->pXRelTo = new sal_uInt32;
*(pImpRec->pXRelTo) = nUDData;
break;
case 0x0391: pImpRec->nYAlign = nUDData; break;
case 0x0392:
if (pImpRec->pYRelTo)
delete pImpRec->pYRelTo;
- pImpRec->pYRelTo = new UINT32;
+ pImpRec->pYRelTo = new sal_uInt32;
*(pImpRec->pYRelTo) = nUDData;
break;
case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
}
if ( rSt.GetError() != 0 )
break;
- pImpRec->bHasUDefProp = TRUE;
+ pImpRec->bHasUDefProp = sal_True;
nBytesLeft -= 6;
}
}
// Textrahmen, auch Title oder Outline
- UINT32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
+ sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
if( nTextId )
{
SfxItemSet aSet( pSdrModel->GetItemPool() );
@@ -442,7 +447,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//textbox, this was changed for #88277# to be created as a simple
//rect to keep impress happy. For the rest of us we'd like to turn
//it back into a textbox again.
- BOOL bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
+ sal_Bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
if (!bIsSimpleDrawingTextBox)
{
//Either
@@ -459,17 +464,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
// Distance of Textbox to it's surrounding Autoshape
- INT32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
- INT32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
- INT32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
- INT32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
+ sal_Int32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
+ sal_Int32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
+ sal_Int32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
+ sal_Int32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
ScaleEmu( nTextLeft );
ScaleEmu( nTextRight );
ScaleEmu( nTextTop );
ScaleEmu( nTextBottom );
- INT32 nTextRotationAngle=0;
+ sal_Int32 nTextRotationAngle=0;
bool bVerticalText = false;
if ( IsProperty( DFF_Prop_txflTextFlow ) )
{
@@ -508,10 +513,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextBottom;
nTextRight = nOldTextTop;
@@ -525,10 +530,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextTop;
nTextRight = nOldTextBottom;
@@ -558,9 +563,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if( bIsSimpleDrawingTextBox )
{
SvxMSDffShapeInfo aTmpRec( 0, pImpRec->nShapeId );
- aTmpRec.bSortByShapeId = TRUE;
+ aTmpRec.bSortByShapeId = sal_True;
- USHORT nFound;
+ sal_uInt16 nFound;
if( GetShapeInfos()->Seek_Entry( &aTmpRec, &nFound ) )
{
SvxMSDffShapeInfo& rInfo = *GetShapeInfos()->GetObject(nFound);
@@ -574,7 +579,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
{
- aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
aSet.Put( SdrTextMinFrameHeightItem(
aNewRect.Bottom() - aNewRect.Top() ) );
aSet.Put( SdrTextMinFrameWidthItem(
@@ -582,19 +587,19 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
else
{
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
}
switch ( (MSO_WrapMode)
GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) )
{
case mso_wrapNone :
- aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_True ) );
pImpRec->bAutoWidth = true;
break;
case mso_wrapByPoints :
- aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ aSet.Put( SdrTextContourFrameItem( sal_True ) );
break;
default:
;
@@ -736,7 +741,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
- FALSE, &pPoolItem );
+ sal_False, &pPoolItem );
if( SFX_ITEM_DEFAULT == eState )
aSet.Put( XFillColorItem( String(),
Color( mnDefaultColor ) ) );
@@ -745,17 +750,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//Means that fBehindDocument is set
if (GetPropertyValue(DFF_Prop_fPrint) & 0x20)
- pImpRec->bDrawHell = TRUE;
+ pImpRec->bDrawHell = sal_True;
else
- pImpRec->bDrawHell = FALSE;
+ pImpRec->bDrawHell = sal_False;
if (GetPropertyValue(DFF_Prop_fPrint) & 0x02)
- pImpRec->bHidden = TRUE;
+ pImpRec->bHidden = sal_True;
pImpRec->nNextShapeId = GetPropertyValue( DFF_Prop_hspNext, 0 );
if ( nTextId )
{
- pImpRec->aTextId.nTxBxS = (UINT16)( nTextId >> 16 );
- pImpRec->aTextId.nSequence = (UINT16)nTextId;
+ pImpRec->aTextId.nTxBxS = (sal_uInt16)( nTextId >> 16 );
+ pImpRec->aTextId.nSequence = (sal_uInt16)nTextId;
}
pImpRec->nDxWrapDistLeft = GetPropertyValue(
@@ -803,7 +808,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
pImpRec->nCropFromRight = GetPropertyValue(
DFF_Prop_cropFromRight, 0 );
- UINT32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
if ( !IsHardAttribute( DFF_Prop_fLine ) &&
pImpRec->eShapeType == mso_sptPictureFrame )
@@ -835,7 +840,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
&& (rObjData.nCalledByGroup < 2) )
)
StoreShapeOrder( pImpRec->nShapeId,
- ( ( (ULONG)pImpRec->aTextId.nTxBxS ) << 16 )
+ ( ( (sal_uLong)pImpRec->aTextId.nTxBxS ) << 16 )
+ pImpRec->aTextId.nSequence, pObj );
}
else
@@ -849,14 +854,14 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
# Spezial FastSave - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_StyleCode( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
{
bCpxStyle = false;
return;
}
- USHORT nColl = 0;
+ sal_uInt16 nColl = 0;
if (pWwFib->GetFIBVersion() <= ww::eWW2)
nColl = *pData;
else
@@ -869,7 +874,7 @@ void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
}
// Read_Majority ist fuer Majority ( 103 ) und Majority50 ( 108 )
-void SwWW8ImplReader::Read_Majority( USHORT, const BYTE* , short )
+void SwWW8ImplReader::Read_Majority( sal_uInt16, const sal_uInt8* , short )
{
}
@@ -886,16 +891,16 @@ void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
SwFltControlStack::NewAttr(rPos, rAttr);
}
-void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
- BOOL bTstEnde, long nHand, BOOL )
+void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
+ sal_Bool bTstEnde, long nHand, sal_Bool )
{
//Doing a textbox, and using the control stack only as a temporary
//collection point for properties which will are not to be set into
//the real document
if (rReader.pPlcxMan && rReader.pPlcxMan->GetDoingDrawTextBox())
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry* pEntry = (*this)[i];
if (nAttrId == pEntry->pAttr->Which())
@@ -983,7 +988,7 @@ const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos,
if (rTxtNode.IsCountedInList())
{
const SwNumRule *pRule = pDoc->FindNumRulePtr(sName);
- BYTE nLvl = static_cast< BYTE >(rTxtNode.GetActualListLevel());
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(rTxtNode.GetActualListLevel());
pRet = &(pRule->Get(nLvl));
}
}
@@ -1009,8 +1014,8 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if (pEntry->MakeRegion(pDoc, aRegion, false))
{
SvxLRSpaceItem aNewLR( *(SvxLRSpaceItem*)pEntry->pAttr );
- ULONG nStart = aRegion.Start()->nNode.GetIndex();
- ULONG nEnd = aRegion.End()->nNode.GetIndex();
+ sal_uLong nStart = aRegion.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aRegion.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = pDoc->GetNodes()[ nStart ];
@@ -1092,12 +1097,12 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
const SfxPoolItem *pItem = GetStackAttr(rPos, nWhich);
if (!pItem)
{
- const SwCntntNode *pNd = pDoc->GetNodes()[ rPos.nNode ]->GetCntntNode();
+ SwCntntNode const*const pNd = rPos.nNode.GetNode().GetCntntNode();
if (!pNd)
pItem = &pDoc->GetAttrPool().GetDefaultItem(nWhich);
else
@@ -1137,12 +1142,12 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
SwNodeIndex aNode( rPos.nNode, -1 );
- USHORT nIdx = rPos.nContent.GetIndex();
+ sal_uInt16 nIdx = rPos.nContent.GetIndex();
- USHORT nSize = static_cast< USHORT >(Count());
+ sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
while (nSize)
{
const SwFltStackEntry* pEntry = (*this)[ --nSize ];
@@ -1163,10 +1168,10 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
return 0;
}
-bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo)
+bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo)
{
const SwField* pFld = rFmtFld.GetFld();
- USHORT nSubType;
+ sal_uInt16 nSubType;
if(pFld && (RES_GETREFFLD == pFld->Which())
&& ((REF_FOOTNOTE == (nSubType = pFld->GetSubType())) || (REF_ENDNOTE == nSubType))
&& ((SwGetRefField*)pFld)->GetSetRefName().Len())
@@ -1205,7 +1210,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
// <NOT> got lost from revision 1.128 to 1.129
if (!RefToVar(pFld,pEntry))
{
- USHORT nBkmNo;
+ sal_uInt16 nBkmNo;
if( IsFtnEdnBkmField(rFmtFld, nBkmNo) )
{
::sw::mark::IMark const * const pMark = (pDoc->getIDocumentMarkAccess()->getMarksBegin() + nBkmNo)->get();
@@ -1219,7 +1224,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
rBkMrkPos.nContent.GetIndex()-1, RES_TXTATR_FTN );
if( pFtn )
{
- USHORT nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
+ sal_uInt16 nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
((SwGetRefField*)pFld)->SetSeqNo( nRefNo );
@@ -1255,7 +1260,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
into the document. If explicit left indent exist which affects them, then this
is handled when the explict left indent is set into the document
*/
-void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
{
@@ -1264,16 +1269,16 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
}
short i;
- const BYTE* pDel = pData + 1; // Del - Array
- BYTE nDel = pData[0];
- const BYTE* pIns = pData + 2*nDel + 2; // Ins - Array
- BYTE nIns = pData[nDel*2+1];
+ const sal_uInt8* pDel = pData + 1; // Del - Array
+ sal_uInt8 nDel = pData[0];
+ const sal_uInt8* pIns = pData + 2*nDel + 2; // Ins - Array
+ sal_uInt8 nIns = pData[nDel*2+1];
WW8_TBD* pTyp = (WW8_TBD*)(pData + 2*nDel + 2*nIns + 2);// Typ - Array
SvxTabStopItem aAttr(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
const SwTxtFmtColl* pSty = 0;
- USHORT nTabBase;
+ sal_uInt16 nTabBase;
if (pAktColl) // StyleDef
{
nTabBase = pCollA[nAktColl].nBase;
@@ -1298,7 +1303,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
else
{
- USHORT nOldTabBase = nTabBase;
+ sal_uInt16 nOldTabBase = nTabBase;
// If based on another
if (nTabBase < nColls)
nTabBase = pCollA[nTabBase].nBase;
@@ -1326,7 +1331,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
SvxTabStop aTabStop;
for (i=0; i < nDel; ++i)
{
- USHORT nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
+ sal_uInt16 nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
if( nPos != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos, 1 );
}
@@ -1370,7 +1375,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
break;
}
- USHORT nPos2 = aAttr.GetPos( nPos );
+ sal_uInt16 nPos2 = aAttr.GetPos( nPos );
if (nPos2 != SVX_TAB_NOTFOUND)
aAttr.Remove(nPos2, 1); // sonst weigert sich das Insert()
aAttr.Insert(aTabStop);
@@ -1442,7 +1447,7 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, false);
maTracer.Log(sw::log::eTabStopDistance);
// #i18732# - adjust default of option 'FollowTextFlow'
- rDoc.SetDefault( SwFmtFollowTextFlow( FALSE ) );
+ rDoc.SetDefault( SwFmtFollowTextFlow( sal_False ) );
// Import Default-Tabs
long nDefTabSiz = pWDop->dxaTab;
@@ -1450,7 +1455,7 @@ void SwWW8ImplReader::ImportDop()
nDefTabSiz = 709;
// wir wollen genau einen DefaultTab
- SvxTabStopItem aNewTab( 1, USHORT(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
+ SvxTabStopItem aNewTab( 1, sal_uInt16(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
rDoc.GetAttrPool().SetPoolDefaultItem( aNewTab );
@@ -1476,11 +1481,11 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, true);
// #i11860# - set new compatibility option
- // 'Use former object positioning' to <FALSE>
+ // 'Use former object positioning' to <sal_False>
rDoc.set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, false);
// #i27767# - set new compatibility option
- // 'Conder Wrapping mode when positioning object' to <TRUE>
+ // 'Conder Wrapping mode when positioning object' to <sal_True>
rDoc.set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, true);
rDoc.set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, false); // #i13832#, #i24135#
@@ -1740,9 +1745,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sal_uInt32 nDateTime = 0;
- if (BYTE * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
+ if (sal_uInt8 * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
{
- ULONG nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
+ sal_uLong nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
if (pWwFib->lcbAtrdExtra/18 > nIndex)
nDateTime = SVBT32ToUInt32(*(SVBT32*)(pExtended+(nIndex*18)));
}
@@ -1823,16 +1828,16 @@ bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
return (nHeaderCP < pWwFib->ccpHdr) ? true : false;
}
-bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
+bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt,
int nSect)
{
if (pHdFt)
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -1856,7 +1861,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
const SwPageDesc *pPrev, const wwSection &rSection)
{
- BYTE nWhichItems = 0;
+ sal_uInt8 nWhichItems = 0;
SwPageDesc *pPD = 0;
if (!bIsTitle)
{
@@ -1872,16 +1877,16 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD = rSection.mpTitlePage;
}
- BYTE grpfIhdt = rSection.maSep.grpfIhdt;
+ sal_uInt8 grpfIhdt = rSection.maSep.grpfIhdt;
if( pHdFt )
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -2072,9 +2077,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
SvxULSpaceItem aUL(*pULSpaceItem);
if(bIsUpper)
- aUL.SetUpper( static_cast< USHORT >(nSpace) );
+ aUL.SetUpper( static_cast< sal_uInt16 >(nSpace) );
else
- aUL.SetLower( static_cast< USHORT >(nSpace) );
+ aUL.SetLower( static_cast< sal_uInt16 >(nSpace) );
xub_StrLen nEnd = pSpacingPos->nContent.GetIndex();
rMyPam.GetPoint()->nContent.Assign(rMyPam.GetCntntNode(), 0);
@@ -2096,7 +2101,7 @@ bool SwWW8ImplReader::SetUpperSpacing(SwPaM &rMyPam, int nSpace)
return SetSpacing(rMyPam, nSpace, true);
}
-USHORT SwWW8ImplReader::TabRowSprm(int nLevel) const
+sal_uInt16 SwWW8ImplReader::TabRowSprm(int nLevel) const
{
if (bVer67)
return 25;
@@ -2163,7 +2168,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
// 1st look for in-table flag, for 2000+ there is a subtable flag to
// be considered, the sprm 6649 gives the level of the table
- BYTE nCellLevel = 0;
+ sal_uInt8 nCellLevel = 0;
if (bVer67)
nCellLevel = 0 != pPlcxMan->HasParaSprm(24);
@@ -2184,14 +2189,14 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
WW8_CP nMyStartCp=nStartCp;
- if (const BYTE *pLevel = pPlcxMan->HasParaSprm(0x6649))
+ if (const sal_uInt8 *pLevel = pPlcxMan->HasParaSprm(0x6649))
nCellLevel = *pLevel;
bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, nCellLevel-1);
//Bad Table, remain unchanged in level, e.g. #i19667#
if (!bHasRowEnd)
- nCellLevel = static_cast< BYTE >(nInTable);
+ nCellLevel = static_cast< sal_uInt8 >(nInTable);
if (bHasRowEnd && ParseTabPos(&aTabPos,pPap))
pTabPos = &aTabPos;
@@ -2219,10 +2224,10 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
if( bAnl && !bTableRowEnd )
{
- const BYTE* pSprm13 = pPlcxMan->HasParaSprm( 13 );
+ const sal_uInt8* pSprm13 = pPlcxMan->HasParaSprm( 13 );
if( pSprm13 )
{ // Noch Anl ?
- BYTE nT = static_cast< BYTE >(GetNumType( *pSprm13 ));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType( *pSprm13 ));
if( ( nT != WW8_Pause && nT != nWwNumType ) // Anl-Wechsel
|| aApo.HasStartStop() // erzwungenes Anl-Ende
|| bStopTab || bStartTab )
@@ -2481,7 +2486,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
return nDestChars;
}
-bool SwWW8ImplReader::LangUsesHindiNumbers(USHORT nLang)
+bool SwWW8ImplReader::LangUsesHindiNumbers(sal_uInt16 nLang)
{
bool bResult = false;
@@ -2559,11 +2564,11 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
p8Bits = new sal_Char[nLen];
// read the stream data
- BYTE nBCode = 0;
- UINT16 nUCode;
+ sal_uInt8 nBCode = 0;
+ sal_uInt16 nUCode;
xub_StrLen nL2;
- USHORT nCTLLang = 0;
+ sal_uInt16 nCTLLang = 0;
const SfxPoolItem * pItem = GetFmtAttr(RES_CHRATR_CTL_LANGUAGE);
if (pItem != NULL)
nCTLLang = dynamic_cast<const SvxLanguageItem *>(pItem)->GetLanguage();
@@ -2830,7 +2835,7 @@ bool SwWW8ImplReader::ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd,
{
if( bSymbol ) // Spezialzeichen einfuegen
{
- for(USHORT nCh = 0; nCh < nEnd - rPos; ++nCh)
+ for(sal_uInt16 nCh = 0; nCh < nEnd - rPos; ++nCh)
{
rDoc.InsertString( *pPaM, cSymbol );
}
@@ -2863,11 +2868,11 @@ bool SwWW8ImplReader::HandlePageBreakChar()
if (!nInTable)
{
//xushanchuan add for issue106569
- BOOL IsTemp=TRUE;
+ sal_Bool IsTemp=sal_True;
SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
{
- IsTemp = FALSE;
+ IsTemp = sal_False;
AppendTxtNode(*pPaM->GetPoint());
pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
}
@@ -2905,8 +2910,8 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
// ob die korrekte FilePos nicht schon erreicht ist.
pStrm->Seek( pSBase->WW8Cp2Fc(nCpOfs+nPosCp, &bIsUnicode) );
- BYTE nBCode;
- UINT16 nWCharVal;
+ sal_uInt8 nBCode;
+ sal_uInt16 nWCharVal;
if( bIsUnicode )
*pStrm >> nWCharVal; // unicode --> read 2 bytes
else
@@ -3078,7 +3083,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
bool* pStartAttr, bool bCallProcessSpecial)
{
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
nAktColl = pPlcxMan->GetColl();
// Invalid Style-Id
@@ -3185,7 +3190,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine)
pCtrlStck->MarkAllAttrsOld();
bool bOldIgnoreText = bIgnoreText;
bIgnoreText = true;
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
bool bDoPlcxManPlusPLus = true;
long nNext;
do
@@ -3258,12 +3263,12 @@ void SwWW8ImplReader::CloseAttrEnds()
{
//If there are any unclosed sprms then copy them to
//another stack and close the ones that must be closed
- std::stack<USHORT> aStack;
+ std::stack<sal_uInt16> aStack;
pPlcxMan->TransferOpenSprms(aStack);
while (!aStack.empty())
{
- USHORT nSprmId = aStack.top();
+ sal_uInt16 nSprmId = aStack.top();
if ((0 < nSprmId) && (( eFTN > nSprmId) || (0x0800 <= nSprmId)))
EndSprm(nSprmId);
aStack.pop();
@@ -3299,7 +3304,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
WW8_CP nNext = pPlcxMan->Where();
SwTxtNode* pPreviousNode = 0;
- BYTE nDropLines = 0;
+ sal_uInt8 nDropLines = 0;
SwCharFmt* pNewSwCharFmt = 0;
const SwCharFmt* pFmt = 0;
pStrm->Seek( pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &bIsUnicode ) );
@@ -3342,7 +3347,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
aDrop.GetLines() = nDropLines;
aDrop.GetDistance() = nDistance;
- aDrop.GetChars() = writer_cast<BYTE>(nDropCapLen);
+ aDrop.GetChars() = writer_cast<sal_uInt8>(nDropCapLen);
// Word has no concept of a "whole word dropcap"
aDrop.GetWholeWord() = false;
@@ -3361,7 +3366,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// If we have found a dropcap store the textnode
pPreviousNode = pPaM->GetNode()->GetTxtNode();
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPlcxMan->GetPapPLCF()->HasSprm(46);
@@ -3373,7 +3378,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
else // There is no Drop Cap Specifier hence no dropcap
pPreviousNode = 0;
- if (const BYTE *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
+ if (const sal_uInt8 *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
nDistance = SVBT16ToShort( pDistance );
else
nDistance = 0;
@@ -3405,7 +3410,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// alle 64 CRs aufrufen not for Header u. ae.
if ((nCrCount++ & 0x40) == 0 && nType == MAN_MAINTEXT)
{
- nProgress = (USHORT)( l * 100 / nTextLen );
+ nProgress = (sal_uInt16)( l * 100 / nTextLen );
::SetProgressState(nProgress, mpDocShell); // Update
}
}
@@ -3459,7 +3464,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
# class SwWW8ImplReader
#**************************************************************************/
-SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage,
+SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
SvStream* pSt, SwDoc& rD, const String& rBaseURL, bool bNewDoc) :
mpDocShell(rD.GetDocShell()),
maTracer(*(mpDocShell->GetMedium())),
@@ -3692,7 +3697,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::FIRST_PAGE)
, 0, false);
rIter->mpTitlePage = &mrReader.rDoc._GetPageDesc(nPos);
@@ -3711,7 +3716,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::NORMAL_PAGE),
rIter->mpTitlePage, false);
rIter->mpPage = &mrReader.rDoc._GetPageDesc(nPos);
@@ -3802,7 +3807,7 @@ void wwSectionManager::InsertSegments()
bool bThisAndNextAreCompatible = (aNext != aEnd) ? ((aIter->GetPageWidth() == aNext->GetPageWidth()) &&
(aIter->GetPageHeight() == aNext->GetPageHeight()) && (aIter->IsLandScape() == aNext->IsLandScape())) : true;
- if ((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected)
+ if (((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected))
{
bIgnoreCols = true;
if ((aIter->NoCols() > 1) || bProtected)
@@ -3859,8 +3864,7 @@ void wwSectionManager::InsertSegments()
}
const SwPosition* pPos = aSectPaM.GetPoint();
- const SwTxtNode* pSttNd =
- mrReader.rDoc.GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0;
if (pTableNd)
{
@@ -3923,8 +3927,8 @@ void wwSectionManager::InsertSegments()
SwFmtPageDesc aDesc(SetSwFmtPageDesc(aIter, aStart, true));
if (aDesc.GetPageDesc())
{
- ULONG nStart = aSectPaM.Start()->nNode.GetIndex();
- ULONG nEnd = aSectPaM.End()->nNode.GetIndex();
+ sal_uLong nStart = aSectPaM.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aSectPaM.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = mrReader.rDoc.GetNodes()[nStart];
@@ -4202,9 +4206,9 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF
return bRes;
}
-ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
+sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (mbNewDoc && pStg && !pGloss)
ReadDocInfo();
@@ -4257,7 +4261,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SwNodeIndex aSttNdIdx( rDoc.GetNodes() );
SwRelNumRuleSpaces aRelNumRule(rDoc, mbNewDoc);
- USHORT eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
+ sal_uInt16 eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
mpSprmParser = new wwSprmParser(pWwFib->GetFIBVersion());
@@ -4390,10 +4394,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
// evtl. Zeilen eingefuegt / aufgebrochen werden
//
const SwPosition* pPos = pPaM->GetPoint();
- const SwTxtNode* pSttNd =
- rDoc.GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
- USHORT nCntPos = pPos->nContent.GetIndex();
+ sal_uInt16 nCntPos = pPos->nContent.GetIndex();
// EinfuegePos nicht in leerer Zeile
if( nCntPos && pSttNd->GetTxt().Len() )
@@ -4406,7 +4409,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
}
// verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
+ sal_uLong nNd = pPos->nNode.GetIndex();
bReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex()
@@ -4507,9 +4510,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SvxMSDffShapeTxBxSort aTxBxSort;
// korrekte Z-Order der eingelesen Escher-Objekte sicherstellen
- USHORT nShapeCount = pMSDffManager->GetShapeOrders()->Count();
+ sal_uInt16 nShapeCount = pMSDffManager->GetShapeOrders()->Count();
- for (USHORT nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
+ for (sal_uInt16 nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
{
SvxMSDffShapeOrder *pOrder =
pMSDffManager->GetShapeOrders()->GetObject(nShapeNum);
@@ -4518,11 +4521,11 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
aTxBxSort.Insert(pOrder);
}
// zu verkettende Rahmen jetzt verketten
- USHORT nTxBxCount = aTxBxSort.Count();
+ sal_uInt16 nTxBxCount = aTxBxSort.Count();
if( nTxBxCount )
{
SwFmtChain aChain;
- for (USHORT nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
+ for (sal_uInt16 nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
{
SvxMSDffShapeOrder *pOrder =
aTxBxSort.GetObject(nTxBxNum);
@@ -4614,10 +4617,10 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
return nErrRet;
}
-ULONG SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
+sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
SvStorageStreamRef &rDataStream)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
// 6 stands for "6 OR 7", 7 stand for "ONLY 7"
switch (pWwFib->nVersion)
{
@@ -4692,18 +4695,18 @@ namespace
void DecryptXOR(msfilter::MSCodec_XorWord95 &rCtx, SvStream &rIn, SvStream &rOut)
{
- ULONG nSt = rIn.Tell();
+ sal_uLong nSt = rIn.Tell();
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(nSt);
rCtx.InitCipher();
rCtx.Skip(nSt);
sal_uInt8 in[0x4096];
- for (ULONG nI = nSt; nI < nLen; nI += 0x4096)
+ for (sal_uLong nI = nSt; nI < nLen; nI += 0x4096)
{
- ULONG nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
+ sal_uLong nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
rIn.Read(in, nBS);
rCtx.Decode(in, nBS);
rOut.Write(in, nBS);
@@ -4720,7 +4723,7 @@ namespace
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPasswordItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPasswordItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPasswordItem))
aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue();
else
{
@@ -4748,11 +4751,95 @@ namespace
return aPassw;
}
+ uno::Sequence< beans::NamedValue > InitXorWord95Codec( ::msfilter::MSCodec_XorWord95& rCodec, SfxMedium& rMedium, WW8Fib* pWwFib )
+ {
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ aEncryptionData.realloc( 0 );
+
+ if ( !aEncryptionData.getLength() )
+ {
+ String sUniPassword = QueryPasswordForMedium( rMedium );
+
+ ByteString sPassword(sUniPassword, WW8Fib::GetFIBCharset( pWwFib->chseTables ) );
+
+ xub_StrLen nLen = sPassword.Len();
+ if( nLen <= 15 )
+ {
+ sal_uInt8 pPassword[16];
+ memset( pPassword, 0, sizeof( pPassword ) );
+
+ for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar )
+ pPassword[nChar] = sPassword.GetChar(nChar);
+
+ rCodec.InitKey( pPassword );
+ aEncryptionData = rCodec.GetEncryptionData();
+
+ // the export supports RC4 algorithm only, so we have to generate the related EncryptionData as well,
+ // so that Save can export the document without asking for a password;
+ // as result there will be EncryptionData for both algorithms in the MediaDescriptor
+ ::msfilter::MSCodec_Std97 aCodec97;
+
+ // Generate random number with a seed of time as salt.
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool();
+ rtl_random_addBytes ( aRandomPool, &aTime, 8 );
+
+ sal_uInt8 pDocId[ 16 ];
+ rtl_random_getBytes( aRandomPool, pDocId, 16 );
+
+ rtl_random_destroyPool( aRandomPool );
+
+ sal_uInt16 pStd97Pass[16];
+ memset( pStd97Pass, 0, sizeof( pStd97Pass ) );
+ for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+ pStd97Pass[nChar] = sUniPassword.GetChar(nChar);
+
+ aCodec97.InitKey( pStd97Pass, pDocId );
+
+ // merge the EncryptionData, there should be no conflicts
+ ::comphelper::SequenceAsHashMap aEncryptionHash( aEncryptionData );
+ aEncryptionHash.update( ::comphelper::SequenceAsHashMap( aCodec97.GetEncryptionData() ) );
+ aEncryptionHash >> aEncryptionData;
+ }
+ }
+
+ return aEncryptionData;
+ }
+
+ uno::Sequence< beans::NamedValue > InitStd97Codec( ::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium )
+ {
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ aEncryptionData.realloc( 0 );
+
+ if ( !aEncryptionData.getLength() )
+ {
+ String sUniPassword = QueryPasswordForMedium( rMedium );
+
+ xub_StrLen nLen = sUniPassword.Len();
+ if ( nLen <= 15 )
+ {
+ sal_Unicode pPassword[16];
+ memset( pPassword, 0, sizeof( pPassword ) );
+ for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+ pPassword[nChar] = sUniPassword.GetChar(nChar);
+
+ rCodec.InitKey( pPassword, pDocId );
+ aEncryptionData = rCodec.GetEncryptionData();
+ }
+ }
+
+ return aEncryptionData;
+ }
}
-ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (pGloss)
pWwFib = pGloss->GetFib();
else
@@ -4801,31 +4888,22 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
if (bDecrypt)
{
nErrRet = ERRCODE_SVX_WRONGPASS;
- switch (eAlgo)
+ SfxMedium* pMedium = mpDocShell->GetMedium();
+
+ if ( pMedium )
{
- default:
- nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT;
- break;
- case XOR:
+ switch (eAlgo)
{
- String sUniPassword =
- QueryPasswordForMedium(*(mpDocShell->GetMedium()));
-
- ByteString sPassword(sUniPassword,
- WW8Fib::GetFIBCharset(pWwFib->chseTables));
-
- xub_StrLen nLen = sPassword.Len();
- // DR: do not cut a wrong (too long) password
- if( nLen <= 15 )
+ default:
+ nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT;
+ break;
+ case XOR:
{
- sal_uInt8 aPassword[16] = {0};
-
- for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar )
- aPassword[nChar] = sPassword.GetChar(nChar);
-
msfilter::MSCodec_XorWord95 aCtx;
- aCtx.InitKey(aPassword);
- if (aCtx.VerifyKey(pWwFib->nKey, pWwFib->nHash))
+ uno::Sequence< beans::NamedValue > aEncryptionData = InitXorWord95Codec( aCtx, *pMedium, pWwFib );
+
+ // if initialization has failed the EncryptionData should be empty
+ if ( aEncryptionData.getLength() && aCtx.VerifyKey( pWwFib->nKey, pWwFib->nHash ) )
{
nErrRet = 0;
pTempMain = MakeTemp(aDecryptMain);
@@ -4857,22 +4935,15 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
DecryptXOR(aCtx, *pDataStream, aDecryptData);
pDataStream = &aDecryptData;
}
+
+ pMedium->GetItemSet()->ClearItem( SID_PASSWORD );
+ pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
}
}
- }
- break;
- case RC4:
- {
- String sUniPassword =
- QueryPasswordForMedium(*(mpDocShell->GetMedium()));
-
- xub_StrLen nLen = sUniPassword.Len();
- // DR: do not cut a wrong (too long) password
- if (nLen <= 15)
+ break;
+ case RC4:
{
- sal_Unicode aPassword[16] = {0};
- for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
- aPassword[nChar] = sUniPassword.GetChar(nChar);
+ msfilter::MSCodec_Std97 aCtx;
sal_uInt8 aDocId[ 16 ];
pTableStream->Read(aDocId, 16);
@@ -4881,9 +4952,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
sal_uInt8 aSaltHash[ 16 ];
pTableStream->Read(aSaltHash, 16);
- msfilter::MSCodec_Std97 aCtx;
- aCtx.InitKey(aPassword, aDocId);
- if (aCtx.VerifyKey(aSaltData, aSaltHash))
+ // if initialization has failed the EncryptionData should be empty
+ uno::Sequence< beans::NamedValue > aEncryptionData = InitStd97Codec( aCtx, aDocId, *pMedium );
+ if ( aEncryptionData.getLength() && aCtx.VerifyKey( aSaltData, aSaltHash ) )
{
nErrRet = 0;
@@ -4913,17 +4984,13 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
DecryptRC4(aCtx, *pDataStream, aDecryptData);
pDataStream = &aDecryptData;
}
- SfxMedium* pMedium = mpDocShell->GetMedium();
- if ( pMedium )
- {
- SfxItemSet* pSet = pMedium->GetItemSet();
- if ( pSet )
- pSet->Put( SfxStringItem(SID_PASSWORD, sUniPassword) );
- }
+
+ pMedium->GetItemSet()->ClearItem( SID_PASSWORD );
+ pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
}
}
+ break;
}
- break;
}
if (nErrRet == 0)
@@ -4952,9 +5019,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
class outlineeq : public std::unary_function<const SwTxtFmtColl*, bool>
{
private:
- BYTE mnNum;
+ sal_uInt8 mnNum;
public:
- outlineeq(BYTE nNum) : mnNum(nNum) {}
+ outlineeq(sal_uInt8 nNum) : mnNum(nNum) {}
bool operator()(const SwTxtFmtColl *pTest) const
{
return pTest->IsAssignedToListLevelOfOutlineStyle() && pTest->GetAssignedOutlineStyleLevel() == mnNum; //<-end,zhaojianwei
@@ -4984,7 +5051,7 @@ void SwWW8ImplReader::SetOutLineStyles()
If we are inserted into a document then don't clobber existing existing
levels.
*/
- USHORT nFlagsStyleOutlLevel = 0;
+ sal_uInt16 nFlagsStyleOutlLevel = 0;
if (!mbNewDoc)
{
// #i70748# - backward iteration needed due to the outline level attribute
@@ -5010,9 +5077,9 @@ void SwWW8ImplReader::SetOutLineStyles()
// instead of the memory pointer of the outline numbering rule
// to assure that, if two outline numbering rule affect the same
// count of text formats, always the same outline numbering rule is chosen.
- std::map<USHORT, int>aRuleMap;
- typedef std::map<USHORT, int>::iterator myIter;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ std::map<sal_uInt16, int>aRuleMap;
+ typedef std::map<sal_uInt16, int>::iterator myIter;
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[ nI ];
if (
@@ -5062,15 +5129,15 @@ void SwWW8ImplReader::SetOutLineStyles()
}
}
- USHORT nOldFlags = nFlagsStyleOutlLevel;
+ sal_uInt16 nOldFlags = nFlagsStyleOutlLevel;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
{
- USHORT nAktFlags = 1 << rSI.nOutlineLevel;
+ sal_uInt16 nAktFlags = 1 << rSI.nOutlineLevel;
if (
(nAktFlags & nFlagsStyleOutlLevel) ||
(rSI.pOutlineNumrule != mpChosenOutlineNumRule)
@@ -5118,8 +5185,8 @@ void SwWW8ImplReader::SetOutLineStyles()
physical mapping into the list style reged on that outline
style.
*/
- BYTE nFromLevel = rSI.nListLevel;
- BYTE nToLevel = rSI.nOutlineLevel;
+ sal_uInt8 nFromLevel = rSI.nListLevel;
+ sal_uInt8 nToLevel = rSI.nOutlineLevel;
const SwNumFmt& rRule=rSI.pOutlineNumrule->Get(nFromLevel);
aOutlineRule.Set(nToLevel, rRule);
((SwTxtFmtColl*)rSI.pFmt)->AssignToListLevelOfOutlineStyle(nToLevel); //<-end,zhaojianwei
@@ -5155,12 +5222,12 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
if( bVer67 )
{
mpAtnNames->push_back(WW8ReadPString(rStrm, false));
- nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + BYTE Count
+ nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + sal_uInt8 Count
}
else
{
mpAtnNames->push_back(WW8Read_xstz(rStrm, 0, false));
- // UNICode: doppelte Laenge + USHORT Count
+ // UNICode: doppelte Laenge + sal_uInt16 Count
nRead += mpAtnNames->rbegin()->Len() * 2 + 2;
}
}
@@ -5173,9 +5240,9 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
return pRet;
}
-ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
{
static const sal_Char* aNames[ 13 ] = {
@@ -5206,7 +5273,7 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
m_bRegardHindiDigits = aVal[ 12 ] > 0;
}
- UINT16 nMagic;
+ sal_uInt16 nMagic;
*pStrm >> nMagic;
// beachte: 6 steht fuer "6 ODER 7", 7 steht fuer "NUR 7"
@@ -5222,10 +5289,10 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
// teste auf eigenen 97-Fake!
if (pStg && 0xa5ec == nMagic)
{
- ULONG nCurPos = pStrm->Tell();
+ sal_uLong nCurPos = pStrm->Tell();
if (pStrm->Seek(nCurPos + 22))
{
- UINT32 nfcMin;
+ sal_uInt32 nfcMin;
*pStrm >> nfcMin;
if (0x300 != nfcMin)
nErrRet = ERR_WW6_NO_WW6_FILE_ERR;
@@ -5259,9 +5326,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
return new WW8Reader();
}
-ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
+sal_uLong WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize )
{
- ULONG nRet = ERR_SWG_READ_ERROR;
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE( pStg, "wo ist mein Storage?" );
rRef = pStg->OpenSotStream(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordDocument")),
@@ -5271,7 +5338,7 @@ ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
{
if( SVSTREAM_OK == rRef->GetError() )
{
- USHORT nOld = rRef->GetBufferSize();
+ sal_uInt16 nOld = rRef->GetBufferSize();
rRef->SetBufferSize( rBuffSize );
rBuffSize = nOld;
nRet = 0;
@@ -5282,17 +5349,17 @@ ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
return nRet;
}
-ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
+sal_uLong WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
{
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
SvStorageStreamRef refStrm; // damit uns keiner den Stream klaut
SvStream* pIn = pStrm;
- ULONG nRet = 0;
- BYTE nVersion = 8;
+ sal_uLong nRet = 0;
+ sal_uInt8 nVersion = 8;
String sFltName = GetFltName();
if( sFltName.EqualsAscii( "WW6" ) )
@@ -5363,18 +5430,18 @@ int WW8Reader::GetReaderType()
return SW_STORAGE_READER | SW_STREAM_READER;
}
-BOOL WW8Reader::HasGlossaries() const
+sal_Bool WW8Reader::HasGlossaries() const
{
return true;
}
-BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
+sal_Bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, sal_Bool bSaveRelFiles) const
{
bool bRet=false;
WW8Reader *pThis = const_cast<WW8Reader *>(this);
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
SvStorageStreamRef refStrm;
if (!pThis->OpenMainStream(refStrm, nOldBuffSize))
{
@@ -5384,7 +5451,7 @@ BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
return bRet ? true : false;
}
-BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
+sal_Bool SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, uno::Reference < embed::XStorage >& rDestStorage) const
{
bool bRet = false;
@@ -5425,12 +5492,12 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
if (aDesc.nSprmsLen && aDesc.pMemPos) // Attribut(e) vorhanden
{
long nLen = aDesc.nSprmsLen;
- const BYTE* pSprm = aDesc.pMemPos;
+ const sal_uInt8* pSprm = aDesc.pMemPos;
while (nLen >= 2 && !nPictureId)
{
- USHORT nId = aSprmParser.GetSprmId(pSprm);
- USHORT nSL = aSprmParser.GetSprmSize(nId, pSprm);
+ sal_uInt16 nId = aSprmParser.GetSprmId(pSprm);
+ sal_uInt16 nSL = aSprmParser.GetSprmSize(nId, pSprm);
if( nLen < nSL )
break; // nicht mehr genug Bytes uebrig
@@ -5469,7 +5536,7 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
return bRet;
}
-BOOL SwMSDffManager::ShapeHasText(ULONG, ULONG) const
+sal_Bool SwMSDffManager::ShapeHasText(sal_uLong, sal_uLong) const
{
// Zur Zeit des Einlesens einer einzelnen Box, die womoeglich Teil einer
// Gruppe ist, liegen noch nicht genuegend Informationen vor, um
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 08698e63a301..2851b8860a3a 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -147,13 +147,13 @@ SV_DECL_PTRARR_SORT_DEL(WW8OleMaps, WW8OleMap_Ptr,16,16)
class WW8Reader : public StgReader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
- ULONG OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize );
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ sal_uLong OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType();
- virtual BOOL HasGlossaries() const;
- virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+ virtual sal_Bool HasGlossaries() const;
+ virtual sal_Bool ReadGlossaries( SwTextBlocks&, sal_Bool bSaveRelFiles ) const;
};
struct WW8OleMap
@@ -187,7 +187,7 @@ public:
enum ListLevel {nMinLevel=1, nMaxLevel=9};
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
- SwNumRule* GetNumRuleForActivation(USHORT nLFOPosition, const BYTE nLevel,
+ SwNumRule* GetNumRuleForActivation(sal_uInt16 nLFOPosition, const sal_uInt8 nLevel,
std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
SwNumRule* CreateNextRule(bool bSimple);
~WW8ListManager();
@@ -199,12 +199,12 @@ private:
SvStream& rSt;
std::vector<WW8LSTInfo* > maLSTInfos;
WW8LFOInfos* pLFOInfos;// D. aus PLF LFO, sortiert genau wie im WW8 Stream
- USHORT nUniqueList; // current number for creating unique list names
- BYTE* GrpprlHasSprm(USHORT nId, BYTE& rSprms, BYTE nLen);
+ sal_uInt16 nUniqueList; // current number for creating unique list names
+ sal_uInt8* GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, sal_uInt8 nLen);
WW8LSTInfo* GetLSTByListId( sal_uInt32 nIdLst ) const;
//the rParaSprms returns back the original word paragraph indent
//sprms which are attached to this numbering level
- bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, USHORT nLevelStyle,
+ bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle,
bool bSetStartNo, std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel,
std::vector<sal_uInt8> &rParaSprms);
@@ -213,7 +213,7 @@ private:
// Zeichen Style Pointer
typedef SwCharFmt* WW8aCFmt[nMaxLevel];
- void AdjustLVL(BYTE nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
+ void AdjustLVL(sal_uInt8 nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
WW8aCFmt& aCharFmt, bool& bNewCharFmtCreated,
String aPrefix = aEmptyStr);
@@ -230,8 +230,8 @@ class SwWW8FltControlStack : public SwFltControlStack
{
private:
SwWW8ImplReader& rReader;
- USHORT nToggleAttrFlags;
- USHORT nToggleBiDiAttrFlags;
+ sal_uInt16 nToggleAttrFlags;
+ sal_uInt16 nToggleBiDiAttrFlags;
//No copying
SwWW8FltControlStack(const SwWW8FltControlStack&);
SwWW8FltControlStack& operator=(const SwWW8FltControlStack&);
@@ -242,16 +242,16 @@ protected:
SwFltStackEntry* pEntry);
public:
- SwWW8FltControlStack(SwDoc* pDo, ULONG nFieldFl, SwWW8ImplReader& rReader_ )
+ SwWW8FltControlStack(SwDoc* pDo, sal_uLong nFieldFl, SwWW8ImplReader& rReader_ )
: SwFltControlStack( pDo, nFieldFl ), rReader( rReader_ ),
nToggleAttrFlags(0), nToggleBiDiAttrFlags(0)
{}
void NewAttr(const SwPosition& rPos, const SfxPoolItem& rAttr);
- virtual void SetAttr(const SwPosition& rPos, USHORT nAttrId=0, BOOL bTstEnde=TRUE, long nHand=LONG_MAX, BOOL consumedByField=FALSE);
+ virtual void SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId=0, sal_Bool bTstEnde=sal_True, long nHand=LONG_MAX, sal_Bool consumedByField=sal_False);
- void SetToggleAttr(BYTE nId, bool bOn)
+ void SetToggleAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleAttrFlags |= (1 << nId);
@@ -259,9 +259,9 @@ public:
nToggleAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleAttrFlags() const { return nToggleAttrFlags; }
+ sal_uInt16 GetToggleAttrFlags() const { return nToggleAttrFlags; }
- void SetToggleBiDiAttr(BYTE nId, bool bOn)
+ void SetToggleBiDiAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleBiDiAttrFlags |= (1 << nId);
@@ -269,12 +269,12 @@ public:
nToggleBiDiAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
- void SetToggleAttrFlags(USHORT nFlags) { nToggleAttrFlags = nFlags; }
- void SetToggleBiDiAttrFlags(USHORT nFlags) {nToggleBiDiAttrFlags = nFlags;}
+ sal_uInt16 GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
+ void SetToggleAttrFlags(sal_uInt16 nFlags) { nToggleAttrFlags = nFlags; }
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags) {nToggleBiDiAttrFlags = nFlags;}
- const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, USHORT nWhich);
- const SfxPoolItem* GetStackAttr(const SwPosition& rPos, USHORT nWhich);
+ const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
+ const SfxPoolItem* GetStackAttr(const SwPosition& rPos, sal_uInt16 nWhich);
};
//The only thing this is for is RES_FLTR_ANCHOR, anything else is an error.
@@ -283,7 +283,7 @@ public:
class SwWW8FltAnchorStack : public SwFltControlStack
{
public:
- SwWW8FltAnchorStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltAnchorStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltControlStack( pDo, nFieldFl ) {}
void AddAnchor(const SwPosition& rPos,SwFrmFmt *pFmt);
void Flush();
@@ -312,10 +312,10 @@ private:
class SwWW8FltRefStack : public SwFltEndStack
{
public:
- SwWW8FltRefStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltRefStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltEndStack( pDo, nFieldFl )
{}
- bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo);
+ bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo);
struct ltstr
{
@@ -369,7 +369,7 @@ class FieldEntry
public:
sw::hack::Position maStartPos;
sal_uInt16 mnFieldId;
- ULONG mnObjLocFc;
+ sal_uLong mnObjLocFc;
FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw();
FieldEntry(const FieldEntry &rOther) throw();
FieldEntry &operator=(const FieldEntry &rOther) throw();
@@ -408,7 +408,7 @@ private:
const SwNumRule* mpPrevNumRule;
WW8TabDesc* mpTableDesc;
int mnInTable;
- USHORT mnAktColl;
+ sal_uInt16 mnAktColl;
sal_Unicode mcSymbol;
bool mbIgnoreText;
bool mbSymbol;
@@ -464,19 +464,19 @@ public:
fUnused(0), nSize(0), hpsCheckBox(20), nChecked(0)
{
}
- UINT8 fUnknown:2;
- UINT8 fDropdownIndex:6;
- UINT8 fToolTip:1;
- UINT8 fNoMark:1;
- UINT8 fUseSize:1;
- UINT8 fNumbersOnly:1;
- UINT8 fDateOnly:1;
- UINT8 fUnused:3;
- UINT16 nSize;
-
- UINT16 hpsCheckBox;
- UINT16 nChecked;
- UINT16 nDefaultChecked;
+ sal_uInt8 fUnknown:2;
+ sal_uInt8 fDropdownIndex:6;
+ sal_uInt8 fToolTip:1;
+ sal_uInt8 fNoMark:1;
+ sal_uInt8 fUseSize:1;
+ sal_uInt8 fNumbersOnly:1;
+ sal_uInt8 fDateOnly:1;
+ sal_uInt8 fUnused:3;
+ sal_uInt16 nSize;
+
+ sal_uInt16 hpsCheckBox;
+ sal_uInt16 nChecked;
+ sal_uInt16 nDefaultChecked;
String sTitle;
String sDefault;
@@ -550,7 +550,7 @@ public:
com::sun::star::form::XFormComponent >& rFComp,
const ::com::sun::star::awt::Size& rSize,
com::sun::star::uno::Reference <
- com::sun::star::drawing::XShape > *pShape,BOOL bFloatingCtrl);
+ com::sun::star::drawing::XShape > *pShape,sal_Bool bFloatingCtrl);
bool ExportControl(WW8Export &rWrt, const SdrObject *pObj);
};
@@ -561,9 +561,9 @@ private:
SvStream *pFallbackStream;
List *pOldEscherBlipCache;
- virtual BOOL GetOLEStorageName( long nOLEId, String& rStorageName,
+ virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rDestStorage ) const;
- virtual BOOL ShapeHasText( ULONG nShapeId, ULONG nFilePos ) const;
+ virtual sal_Bool ShapeHasText( sal_uLong nShapeId, sal_uLong nFilePos ) const;
// #i32596# - new parameter <_nCalledByGroup>, which
// indicates, if the OLE object is imported inside a group object
virtual SdrObject* ImportOLE( long nOLEId,
@@ -578,9 +578,9 @@ private:
SwMSDffManager(const SwMSDffManager&);
SwMSDffManager& operator=(const SwMSDffManager&);
public:
- static UINT32 GetFilterFlags();
- static INT32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
- INT32 &rThick);
+ static sal_uInt32 GetFilterFlags();
+ static sal_Int32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
+ sal_Int32 &rThick);
SwMSDffManager( SwWW8ImplReader& rRdr );
void DisableFallbackStream();
void EnableFallbackStream();
@@ -606,7 +606,7 @@ public:
sal_uInt32 nPgLeft;
sal_uInt32 nPgRight;
- BYTE mnBorders;
+ sal_uInt8 mnBorders;
bool mbHasFootnote;
void SetDirection();
void SetLinkId(short sLinkId) { mLinkId = sLinkId; }
@@ -694,7 +694,7 @@ public:
bool CurrentSectionIsVertical() const;
bool CurrentSectionIsProtected() const;
void PrependedInlineNode(const SwPosition &rPos, const SwNode &rNode);
- USHORT CurrentSectionColCount() const;
+ sal_uInt16 CurrentSectionColCount() const;
bool WillHavePageDescHere(SwNodeIndex aIdx) const;
void CreateSep(const long nTxtPos, bool bMustHaveBreak);
void InsertSegments();
@@ -752,8 +752,8 @@ struct ApoTestResults
{
bool mbStartApo;
bool mbStopApo;
- const BYTE* mpSprm37;
- const BYTE* mpSprm29;
+ const sal_uInt8* mpSprm37;
+ const sal_uInt8* mpSprm29;
WW8FlyPara* mpStyleApo;
ApoTestResults() :
mbStartApo(false), mbStopApo(false), mpSprm37(0), mpSprm29(0),
@@ -766,8 +766,8 @@ struct ANLDRuleMap
{
SwNumRule* mpOutlineNumRule; // WinWord 6 numbering, varient 1
SwNumRule* mpNumberingNumRule; // WinWord 6 numbering, varient 2
- SwNumRule* GetNumRule(BYTE nNumType);
- void SetNumRule(SwNumRule*, BYTE nNumType);
+ SwNumRule* GetNumRule(sal_uInt8 nNumType);
+ void SetNumRule(SwNumRule*, sal_uInt8 nNumType);
ANLDRuleMap() : mpOutlineNumRule(0), mpNumberingNumRule(0) {}
};
@@ -981,29 +981,29 @@ private:
String sBaseURL;
// Ini-Flags:
- ULONG nIniFlags; // Flags aus der writer.ini
- ULONG nIniFlags1; // dito ( zusaetzliche Flags )
- ULONG nFieldFlags; // dito fuer Feldern
- ULONG nFieldTagAlways[3]; // dito fuers Taggen von Feldern
- ULONG nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
+ sal_uLong nIniFlags; // Flags aus der writer.ini
+ sal_uLong nIniFlags1; // dito ( zusaetzliche Flags )
+ sal_uLong nFieldFlags; // dito fuer Feldern
+ sal_uLong nFieldTagAlways[3]; // dito fuers Taggen von Feldern
+ sal_uLong nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
bool m_bRegardHindiDigits; // import digits in CTL scripts as Hindi numbers
WW8_CP nDrawCpO; // Anfang der Txbx-SubDocs
- ULONG nPicLocFc; // Picture Location in File (FC)
- ULONG nObjLocFc; // Object Location in File (FC)
+ sal_uLong nPicLocFc; // Picture Location in File (FC)
+ sal_uLong nObjLocFc; // Object Location in File (FC)
- INT32 nIniFlyDx; // X-Verschiebung von Flys
- INT32 nIniFlyDy; // Y-Verschiebung von Flys
+ sal_Int32 nIniFlyDx; // X-Verschiebung von Flys
+ sal_Int32 nIniFlyDy; // Y-Verschiebung von Flys
rtl_TextEncoding eTextCharSet; // Default charset for Text
rtl_TextEncoding eStructCharSet; // rtl_TextEncoding for structures
rtl_TextEncoding eHardCharSet; // Hard rtl_TextEncoding-Attribute
- USHORT nProgress; // %-Angabe fuer Progressbar
- USHORT nColls; // Groesse des Arrays
- USHORT nAktColl; // gemaess WW-Zaehlung
- USHORT nFldNum; // laufende Nummer dafuer
- USHORT nLFOPosition;
+ sal_uInt16 nProgress; // %-Angabe fuer Progressbar
+ sal_uInt16 nColls; // Groesse des Arrays
+ sal_uInt16 nAktColl; // gemaess WW-Zaehlung
+ sal_uInt16 nFldNum; // laufende Nummer dafuer
+ sal_uInt16 nLFOPosition;
short nCharFmt; // gemaess WW-Zaehlung, <0 fuer keine
@@ -1013,16 +1013,16 @@ private:
sal_Unicode cSymbol; // aktuell einzulesendes Symbolzeichen
- BYTE nWantedVersion; // urspruenglich vom Writer
+ sal_uInt8 nWantedVersion; // urspruenglich vom Writer
// angeforderte WW-Doc-Version
- BYTE nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
- BYTE nWwNumType; // Gliederung / Nummerg / Aufzaehlg
- BYTE nListLevel;
+ sal_uInt8 nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
+ sal_uInt8 nWwNumType; // Gliederung / Nummerg / Aufzaehlg
+ sal_uInt8 nListLevel;
- BYTE nPgChpDelim; // ChapterDelim from PageNum
- BYTE nPgChpLevel; // ChapterLevel of Heading from PageNum
+ sal_uInt8 nPgChpDelim; // ChapterDelim from PageNum
+ sal_uInt8 nPgChpLevel; // ChapterLevel of Heading from PageNum
bool mbNewDoc; // Neues Dokument ?
bool bReadNoTbl; // Keine Tabellen
@@ -1087,10 +1087,10 @@ private:
//---------------------------------------------
- const SprmReadInfo& GetSprmReadInfo(USHORT nId) const;
+ const SprmReadInfo& GetSprmReadInfo(sal_uInt16 nId) const;
bool StyleExists(int nColl) const { return (nColl < nColls); }
- SwWW8StyInf *GetStyle(USHORT nColl) const;
+ SwWW8StyInf *GetStyle(sal_uInt16 nColl) const;
void AppendTxtNode(SwPosition& rPos);
void Read_HdFt(bool bIsTitle, int nSect, const SwPageDesc *pPrev,
@@ -1101,12 +1101,12 @@ private:
bool isValid_HdFt_CP(WW8_CP nHeaderCP) const;
- bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect);
+ bool HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt, int nSect);
void HandleLineNumbering(const wwSection &rSection);
void CopyPageDescHdFt( const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode );
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode );
void DeleteStk(SwFltControlStack* prStck);
void DeleteCtrlStk() { DeleteStk( pCtrlStck ); pCtrlStck = 0; }
@@ -1124,7 +1124,7 @@ private:
bool ReadChar(long nPosCp, long nCpOfs);
bool ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs);
bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs);
- bool LangUsesHindiNumbers(USHORT nLang);
+ bool LangUsesHindiNumbers(sal_uInt16 nLang);
sal_Unicode TranslateToHindiNumbers(sal_Unicode);
void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection);
@@ -1136,15 +1136,15 @@ private:
void CloseAttrEnds();
bool ReadText(long nStartCp, long nTextLen, ManTypes nType);
- void ReadRevMarkAuthorStrTabl( SvStream& rStrm, INT32 nTblPos,
- INT32 nTblSiz, SwDoc& rDoc );
+ void ReadRevMarkAuthorStrTabl( SvStream& rStrm, sal_Int32 nTblPos,
+ sal_Int32 nTblSiz, SwDoc& rDoc );
void Read_HdFtFtnText( const SwNodeIndex* pSttIdx, long nStartCp,
long nLen, ManTypes nType );
void ImportTox( int nFldId, String aStr );
- void EndSprm( USHORT nId );
+ void EndSprm( sal_uInt16 nId );
// #i103711#
// #i105414#
void NewAttr( const SfxPoolItem& rAttr,
@@ -1152,13 +1152,13 @@ private:
const bool bLeftIndentSet = false );
// <--
- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&,
+ bool GetFontParams(sal_uInt16, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&);
- bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich);
+ bool SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums, sal_uInt16 nWhich);
void ResetCharSetVars();
void ResetCJKCharSetVars();
- const SfxPoolItem* GetFmtAttr( USHORT nWhich );
+ const SfxPoolItem* GetFmtAttr( sal_uInt16 nWhich );
bool JoinNode(SwPaM &rPam, bool bStealAttr = false);
bool IsBorder(const WW8_BRC* pbrc, bool bChkBtwn = false) const;
@@ -1172,7 +1172,7 @@ private:
// Note #i20672# we can't properly support between lines so best to ignore
// them for now
bool SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc, short *pSizeArray=0,
- BYTE nSetBorders=0xFF) const;
+ sal_uInt8 nSetBorders=0xFF) const;
void GetBorderDistance(const WW8_BRC* pbrc, Rectangle& rInnerDist) const;
sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing);
bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
@@ -1182,8 +1182,8 @@ private:
short *SizeArray=0) const;
void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const;
- INT32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineWidth,
+ sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth,
SvxBoxItem& rBox );
void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet,
MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist );
@@ -1209,10 +1209,10 @@ private:
void EndSpecial();
bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp);
- USHORT TabRowSprm(int nLevel) const;
+ sal_uInt16 TabRowSprm(int nLevel) const;
bool ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pDelIt);
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pDelIt);
void ReplaceObj(const SdrObject &rReplaceTextObj,
SdrObject &rSubObj);
@@ -1226,7 +1226,7 @@ private:
const SfxItemSet& rGrfSet);
SwFrmFmt *AddAutoAnchor(SwFrmFmt *pFmt);
- SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos);
+ SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos);
SwFrmFmt* ImportGraf(SdrTextObj* pTextObj = 0, SwFrmFmt* pFlyFmt = 0);
SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=0,
@@ -1245,9 +1245,9 @@ private:
//This converts MS Asian Typography information into OOo's
void ImportDopTypography(const WW8DopTypography &rTypo);
- ULONG LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
- ULONG SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
- ULONG CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
+ sal_uLong LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
+ sal_uLong SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
+ sal_uLong CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
void ReadDocVars();
@@ -1270,16 +1270,16 @@ private:
// verwaltet werden: rglst, hpllfo und hsttbListNames
// die Strukturen hierfuer sind: LSTF, LVLF, LFO LFOLVL
- void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const BYTE* pTxt,
+ void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const sal_uInt8* pTxt,
bool bOutline);
- void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel, bool bOutLine);
- void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel );
+ void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel, bool bOutLine);
+ void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel );
SwNumRule* GetStyRule();
- void StartAnl(const BYTE* pSprm13);
- void NextAnlLine(const BYTE* pSprm13);
+ void StartAnl(const sal_uInt8* pSprm13);
+ void NextAnlLine(const sal_uInt8* pSprm13);
void StopAllAnl(bool bGoBack = true);
- void StopAnlToRestart(BYTE nType, bool bGoBack = true);
+ void StopAnlToRestart(sal_uInt8 nType, bool bGoBack = true);
// GrafikLayer
@@ -1296,20 +1296,20 @@ private:
SdrObject *ReadPolyLine(WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet);
ESelection GetESelection( long nCpStart, long nCpEnd );
- void InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl );
+ void InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl );
void InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, ManTypes eType, bool bONLYnPicLocFc=false);
- bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, USHORT nTxBxS,
- USHORT nSequence);
+ bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, sal_uInt16 nTxBxS,
+ sal_uInt16 nSequence);
bool GetRangeAsDrawingString(String& rString, long StartCp, long nEndCp, ManTypes eType);
OutlinerParaObject* ImportAsOutliner(String &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType);
SwFrmFmt* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz,
- USHORT nTxBxS, USHORT nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText = 0, long* pnStartCp = 0,
long* pnEndCp = 0, bool* pbContainsGraphics = 0,
SvxMSDffImportRec* pRecord = 0);
- bool TxbxChainContainsRealText( USHORT nTxBxS,
+ bool TxbxChainContainsRealText( sal_uInt16 nTxBxS,
long& rStartCp,
long& rEndCp );
SdrObject *ReadTxtBox(WW8_DPHEAD* pHd, const WW8_DO* pDo,
@@ -1345,39 +1345,39 @@ private:
void UpdateFields();
void ConvertFFileName( String& rName, const String& rRaw );
long Read_F_Tag( WW8FieldDesc* pF );
- void InsertTagField( const USHORT nId, const String& rTagText );
+ void InsertTagField( const sal_uInt16 nId, const String& rTagText );
long ImportExtSprm(WW8PLCFManResult* pRes);
- void EndExtSprm(USHORT nSprmId);
+ void EndExtSprm(sal_uInt16 nSprmId);
void ReadDocInfo();
// Ver8-Listen
- void RegisterNumFmtOnTxtNode(USHORT nActLFO, BYTE nActLevel,
+ void RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, sal_uInt8 nActLevel,
bool bSetAttr = true);
- void RegisterNumFmtOnStyle(USHORT nStyle);
+ void RegisterNumFmtOnStyle(sal_uInt16 nStyle);
void SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
sal_uInt8 nActLevel);
- void RegisterNumFmt(USHORT nActLFO, BYTE nActLevel);
+ void RegisterNumFmt(sal_uInt16 nActLFO, sal_uInt8 nActLevel);
// spaeter zu ersetzen durch Aufruf in entsprechend erweiterten SvxMSDffManager
const String* GetAnnotationAuthor(sal_uInt16 nIdx);
// Schnittstellen fuer die Toggle-Attribute
- void SetToggleAttr(BYTE nAttrId, bool bOn);
- void SetToggleBiDiAttr(BYTE nAttrId, bool bOn);
- void _ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void SetToggleAttr(sal_uInt8 nAttrId, bool bOn);
+ void SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn);
+ void _ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleAttrFlags() )
_ChkToggleAttr( nOldStyle81Mask, nNewStyle81Mask );
}
- void _ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void _ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleBiDiAttrFlags() )
@@ -1402,17 +1402,17 @@ private:
// #i84783#
// determine object attribute "Layout in Table Cell"
- bool IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const;
+ bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const;
// <--
bool ReadGlobalTemplateSettings( const rtl::OUString& sCreatedFrom, const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xPrjNameMap );
//No copying
SwWW8ImplReader(const SwWW8ImplReader &);
SwWW8ImplReader& operator=(const SwWW8ImplReader&);
public: // eigentlich private, geht aber leider nur public
- USHORT GetToggleAttrFlags() const;
- USHORT GetToggleBiDiAttrFlags() const;
- void SetToggleAttrFlags(USHORT nFlags);
- void SetToggleBiDiAttrFlags(USHORT nFlags);
+ sal_uInt16 GetToggleAttrFlags() const;
+ sal_uInt16 GetToggleBiDiAttrFlags() const;
+ void SetToggleAttrFlags(sal_uInt16 nFlags);
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags);
long Read_Ftn(WW8PLCFManResult* pRes);
@@ -1424,102 +1424,102 @@ public: // eigentlich private, geht aber leider nur public
// Attribute
- void Read_Special(USHORT, const BYTE*, short nLen);
- void Read_Obj(USHORT, const BYTE*, short nLen);
- void Read_PicLoc(USHORT, const BYTE* pData, short nLen );
- void Read_BoldUsw(USHORT nId, const BYTE*, short nLen);
- void Read_Bidi(USHORT nId, const BYTE*, short nLen);
- void Read_BoldBiDiUsw(USHORT nId, const BYTE*, short nLen);
- void Read_SubSuper( USHORT, const BYTE*, short nLen );
+ void Read_Special(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Obj(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_PicLoc(sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BoldUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_Bidi(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_SubSuper( sal_uInt16, const sal_uInt8*, short nLen );
bool ConvertSubToGraphicPlacement();
SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion);
- void Read_SubSuperProp( USHORT, const BYTE*, short nLen );
- void Read_Underline( USHORT, const BYTE*, short nLen );
- void Read_TxtColor( USHORT, const BYTE*, short nLen );
- void openFont(USHORT nFCode, USHORT nId);
- void closeFont(USHORT nId);
- void Read_FontCode( USHORT, const BYTE*, short nLen );
- void Read_FontSize( USHORT, const BYTE*, short nLen );
- void Read_CharSet(USHORT , const BYTE* pData, short nLen);
- void Read_Language( USHORT, const BYTE*, short nLen );
- void Read_CColl( USHORT, const BYTE*, short nLen );
- void Read_Kern( USHORT, const BYTE* pData, short nLen );
- void Read_FontKern( USHORT, const BYTE* pData, short nLen );
- void Read_Emphasis( USHORT, const BYTE* pData, short nLen );
- void Read_ScaleWidth( USHORT, const BYTE* pData, short nLen );
- void Read_Relief( USHORT, const BYTE* pData, short nLen);
- void Read_TxtAnim( USHORT, const BYTE* pData, short nLen);
-
- void Read_NoLineNumb( USHORT nId, const BYTE* pData, short nLen );
-
- void Read_LR( USHORT nId, const BYTE*, short nLen );
- void Read_UL( USHORT nId, const BYTE*, short nLen );
- void Read_ParaAutoBefore(USHORT , const BYTE *pData, short nLen);
- void Read_ParaAutoAfter(USHORT , const BYTE *pData, short nLen);
- void Read_DontAddEqual(USHORT , const BYTE *pData, short nLen);
- void Read_LineSpace( USHORT, const BYTE*, short nLen );
- void Read_Justify(USHORT, const BYTE*, short nLen);
- void Read_IdctHint(USHORT, const BYTE*, short nLen);
+ void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen );
+ void openFont(sal_uInt16 nFCode, sal_uInt16 nId);
+ void closeFont(sal_uInt16 nId);
+ void Read_FontCode( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_FontSize( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen);
+ void Read_Language( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CColl( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_FontKern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Relief( sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtAnim( sal_uInt16, const sal_uInt8* pData, short nLen);
+
+ void Read_NoLineNumb( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+
+ void Read_LR( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_UL( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_DontAddEqual(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_LineSpace( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen);
bool IsRightToLeft();
- void Read_RTLJustify(USHORT, const BYTE*, short nLen);
- void Read_Hyphenation( USHORT, const BYTE* pData, short nLen );
- void Read_WidowControl( USHORT, const BYTE* pData, short nLen );
- void Read_AlignFont( USHORT, const BYTE* pData, short nLen );
- void Read_UsePgsuSettings( USHORT, const BYTE* pData, short nLen );
- void Read_KeepLines( USHORT, const BYTE* pData, short nLen );
- void Read_KeepParas( USHORT, const BYTE* pData, short nLen );
- void Read_BreakBefore( USHORT, const BYTE* pData, short nLen );
- void Read_Apo(USHORT nId, const BYTE* pData, short nLen);
- void Read_ApoPPC(USHORT, const BYTE* pData, short);
-
- void Read_BoolItem( USHORT nId, const BYTE*, short nLen );
-
- void Read_Border( USHORT nId, const BYTE* pData, short nLen );
- void Read_Tab( USHORT nId, const BYTE* pData, short nLen );
- void Read_Symbol(USHORT, const BYTE* pData, short nLen);
- void Read_FldVanish( USHORT nId, const BYTE* pData, short nLen );
+ void Read_RTLJustify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_UsePgsuSettings( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Apo(sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_ApoPPC(sal_uInt16, const sal_uInt8* pData, short);
+
+ void Read_BoolItem( sal_uInt16 nId, const sal_uInt8*, short nLen );
+
+ void Read_Border( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Tab( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_FldVanish( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
// Revision Marks ( == Redlining )
// insert or delete content (change char attributes resp.)
- void Read_CRevisionMark(RedlineType_t eType, const BYTE* pData, short nLen);
+ void Read_CRevisionMark(RedlineType_t eType, const sal_uInt8* pData, short nLen);
// insert new content
- void Read_CFRMark(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen);
// delete old content
- void Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen);
// change properties of content (e.g. char formating)
- void Read_CPropRMark(USHORT , const BYTE* pData, short nLen); // complex!
+ void Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen); // complex!
- void Read_TabRowEnd( USHORT, const BYTE* pData, short nLen );
- void Read_TabCellEnd( USHORT, const BYTE* pData, short nLen );
+ void Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
static bool ParseTabPos(WW8_TablePos *aTabPos, WW8PLCFx_Cp_FKP* pPap);
- void Read_Shade( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelNo( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen );
+ void Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen );
// Gliederungsebene Ver8
- void Read_POutLvl(USHORT, const BYTE* pData, short nLen);
+ void Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen);
- void Read_OLST( USHORT, const BYTE* pData, short nLen );
+ void Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen );
- void Read_CharShadow( USHORT, const BYTE* pData, short nLen );
- void Read_CharHighlight( USHORT, const BYTE* pData, short nLen );
+ void Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_CharHighlight( sal_uInt16, const sal_uInt8* pData, short nLen );
// Ver8-Listen
- void Read_ListLevel( USHORT nId, const sal_uInt8* pData, short nLen);
- void Read_LFOPosition( USHORT nId, const sal_uInt8* pData, short nLen);
+ void Read_ListLevel( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_LFOPosition( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
bool SetTxtFmtCollAndListLevel(const SwPaM& rRg, SwWW8StyInf& rStyleInfo);
- void Read_StyleCode(USHORT, const BYTE* pData, short nLen);
- void Read_Majority(USHORT, const BYTE* , short );
- void Read_DoubleLine_Rotate( USHORT, const BYTE* pDATA, short nLen);
+ void Read_StyleCode(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_Majority(sal_uInt16, const sal_uInt8* , short );
+ void Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pDATA, short nLen);
- void Read_TxtForeColor(USHORT, const BYTE* pData, short nLen);
- void Read_TxtBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBiDi(USHORT, const BYTE* pData, short nLen);
- static sal_uInt32 ExtractColour(const BYTE* &rpData, bool bVer67);
+ void Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen);
+ static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67);
long MapBookmarkVariables(const WW8FieldDesc* pF,String &rOrigName,
const String &rData);
@@ -1532,9 +1532,9 @@ public: // eigentlich private, geht aber leider nur public
eF_ResT Read_F_DocInfo( WW8FieldDesc* pF, String& rStr );
eF_ResT Read_F_Author( WW8FieldDesc*, String& );
eF_ResT Read_F_TemplName( WW8FieldDesc*, String& );
- short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, USHORT &rLang,
+ short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, sal_uInt16 &rLang,
int nWhichDefault, bool bHijri = false);
- bool ForceFieldLanguage(SwField &rFld, USHORT nLang);
+ bool ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang);
eF_ResT Read_F_DateTime( WW8FieldDesc*, String& rStr );
eF_ResT Read_F_FileName( WW8FieldDesc*, String& rStr);
eF_ResT Read_F_Anz( WW8FieldDesc* pF, String& );
@@ -1575,30 +1575,30 @@ public: // eigentlich private, geht aber leider nur public
void DeleteFormImpl();
- short ImportSprm( const BYTE* pPos, USHORT nId = 0 );
+ short ImportSprm( const sal_uInt8* pPos, sal_uInt16 nId = 0 );
bool SearchRowEnd(WW8PLCFx_Cp_FKP* pPap,WW8_CP &rStartCp, int nLevel) const;
const WW8Fib& GetFib() const { return *pWwFib; }
SwDoc& GetDoc() const { return rDoc; }
- USHORT GetNAktColl() const { return nAktColl; }
- void SetNAktColl( USHORT nColl ) { nAktColl = nColl; }
+ sal_uInt16 GetNAktColl() const { return nAktColl; }
+ void SetNAktColl( sal_uInt16 nColl ) { nAktColl = nColl; }
void SetAktItemSet( SfxItemSet* pItemSet ) { pAktItemSet = pItemSet; }
- USHORT StyleUsingLFO( USHORT nLFOIndex ) const ;
+ sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ;
const SwFmt* GetStyleWithOrgWWName( String& rName ) const ;
static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc);
static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67);
static bool ImportOleWMF( SvStorageRef xSrc1, GDIMetaFile &rWMF,
long &rX, long &rY);
- static ColorData GetCol(BYTE nIco);
+ static ColorData GetCol(sal_uInt8 nIco);
- SwWW8ImplReader( BYTE nVersionPara, SvStorage* pStorage, SvStream* pSt,
+ SwWW8ImplReader( sal_uInt8 nVersionPara, SvStorage* pStorage, SvStream* pSt,
SwDoc& rD, const String& rBaseURL, bool bNewDoc );
const String& GetBaseURL() const { return sBaseURL; }
// Laden eines kompletten DocFiles
- ULONG LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
+ sal_uLong LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
CharSet GetCurrentCharSet();
CharSet GetCurrentCJKCharSet();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 736eaa528cd3..c4a13b75795d 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -116,37 +116,37 @@ struct WW8TabBandDesc
sal_uInt16 maDirections[MAX_COL + 1];
short nCenter[MAX_COL + 1]; // X-Rand aller Zellen dieses Bandes
short nWidth[MAX_COL + 1]; // Laenge aller Zellen dieses Bandes
- short nWwCols; // BYTE wuerde reichen, alignment -> short
+ short nWwCols; // sal_uInt8 wuerde reichen, alignment -> short
short nSwCols; // SW: so viele Spalten fuer den Writer
bool bLEmptyCol; // SW: Links eine leere Zusatz-Spalte
bool bREmptyCol; // SW: dito rechts
bool bCantSplit;
bool bCantSplit90;
WW8_TCell* pTCs;
- BYTE nOverrideSpacing[MAX_COL + 1];
+ sal_uInt8 nOverrideSpacing[MAX_COL + 1];
short nOverrideValues[MAX_COL + 1][4];
WW8_SHD* pSHDs;
sal_uInt32* pNewSHDs;
WW8_BRC aDefBrcs[6];
bool bExist[MAX_COL]; // Existiert diese Zelle ?
- UINT8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
+ sal_uInt8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
WW8TabBandDesc();
WW8TabBandDesc(WW8TabBandDesc& rBand); // tief kopieren
~WW8TabBandDesc();
static void setcelldefaults(WW8_TCell *pCells, short nCells);
- void ReadDef(bool bVer67, const BYTE* pS);
- void ProcessDirection(const BYTE* pParams);
- void ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC);
- void ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams);
- void ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol);
- void ProcessSprmTDelete(const BYTE* pParamsTDelete);
- void ProcessSprmTInsert(const BYTE* pParamsTInsert);
- void ProcessSpacing(const BYTE* pParamsTInsert);
- void ProcessSpecificSpacing(const BYTE* pParamsTInsert);
- void ReadShd(const BYTE* pS );
- void ReadNewShd(const BYTE* pS, bool bVer67);
+ void ReadDef(bool bVer67, const sal_uInt8* pS);
+ void ProcessDirection(const sal_uInt8* pParams);
+ void ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC);
+ void ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams);
+ void ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol);
+ void ProcessSprmTDelete(const sal_uInt8* pParamsTDelete);
+ void ProcessSprmTInsert(const sal_uInt8* pParamsTInsert);
+ void ProcessSpacing(const sal_uInt8* pParamsTInsert);
+ void ProcessSpecificSpacing(const sal_uInt8* pParamsTInsert);
+ void ReadShd(const sal_uInt8* pS );
+ void ReadNewShd(const sal_uInt8* pS, bool bVer67);
enum wwDIR {wwTOP = 0, wwLEFT = 1, wwBOTTOM = 2, wwRIGHT = 3};
};
@@ -207,11 +207,11 @@ class WW8TabDesc
// 3. Verwaltungsinfo fuer Writer
short nAktCol;
- USHORT nRowsToRepeat;
+ sal_uInt16 nRowsToRepeat;
// 4. Methoden
- USHORT GetLogicalWWCol() const;
+ sal_uInt16 GetLogicalWWCol() const;
void SetTabBorders( SwTableBox* pBox, short nIdx );
void SetTabShades( SwTableBox* pBox, short nWwIdx );
void SetTabVertAlign( SwTableBox* pBox, short nWwIdx );
@@ -228,7 +228,7 @@ class WW8TabDesc
// einzelne Box ggfs. in eine Merge-Gruppe aufnehmen
// (die Merge-Gruppen werden dann spaeter auf einen Schlag abgearbeitet)
SwTableBox* UpdateTableMergeGroup(WW8_TCell& rCell,
- WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, USHORT nCol );
+ WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, sal_uInt16 nCol );
void StartMiserableHackForUnsupportedDirection(short nWwCol);
void EndMiserableHackForUnsupportedDirection(short nWwCol);
//No copying
@@ -485,10 +485,10 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
{
if (pPap->Where() != WW8_CP_MAX)
{
- const BYTE* pB = pPap->HasSprm(TabRowSprm(nLevel));
+ const sal_uInt8* pB = pPap->HasSprm(TabRowSprm(nLevel));
if (pB && *pB == 1)
{
- const BYTE *pLevel = 0;
+ const sal_uInt8 *pLevel = 0;
if (0 != (pLevel = pPap->HasSprm(0x6649)))
{
if (nLevel + 1 == *pLevel)
@@ -624,7 +624,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
// Hilfroutinen fuer Kapitelnummerierung und Aufzaehlung / Gliederung
//---------------------------------------------------------------------
-static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
+static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, sal_uInt8 nSwLevel )
{
static SvxExtNumType eNumA[8] = { SVX_NUM_ARABIC, SVX_NUM_ROMAN_UPPER, SVX_NUM_ROMAN_LOWER,
SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_ARABIC,
@@ -643,7 +643,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
rNum.SetNumAdjust( eAdjA[SVBT8ToByte( rAV.aBits1 ) & 0x3] );
rNum.SetCharTextDistance( SVBT16ToShort( rAV.dxaSpace ) );
- INT16 nIndent = Abs((INT16)SVBT16ToShort( rAV.dxaIndent ));
+ sal_Int16 nIndent = Abs((sal_Int16)SVBT16ToShort( rAV.dxaIndent ));
if( SVBT8ToByte( rAV.aBits1 ) & 0x08 ) //fHang
{
rNum.SetFirstLineOffset( -nIndent );
@@ -662,7 +662,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
}
void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
- const BYTE* pTxt, bool bOutline)
+ const sal_uInt8* pTxt, bool bOutline)
{
bool bInsert = false; // Default
CharSet eCharSet = eStructCharSet;
@@ -751,7 +751,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
// SetAnld bekommt einen WW-ANLD-Descriptor und einen Level und modifiziert
// die durch pNumR anggebeben NumRules. Wird benutzt fuer alles ausser
// Gliederung im Text
-void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel,
+void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel,
bool bOutLine)
{
SwNumFmt aNF;
@@ -780,7 +780,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
const String aName( rDoc.GetUniqueNumRuleName( &aBaseName, false) );
// #i86652#
- USHORT nRul = rDoc.MakeNumRule( aName, 0, FALSE,
+ sal_uInt16 nRul = rDoc.MakeNumRule( aName, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
pStyles->pStyRule = rDoc.GetNumRuleTbl()[nRul];
@@ -791,7 +791,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
}
// Sprm 13
-void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen )
{
nSwNumLevel = 0xff; // Default: ungueltig
@@ -835,7 +835,7 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) // Sprm 12
+void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm 12
{
{
SwWW8StyInf * pStyInf = GetStyle(nAktColl);
@@ -885,14 +885,14 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen )
// ( nur fuer Gliederungen im Text; Aufzaehlungen / Nummerierungen laufen
// ueber ANLDs )
// dabei wird die Info aus dem OLST geholt und nicht aus dem ANLD ( s.u. )
-void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
+void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel)
{
SwNumFmt aNF;
WW8_ANLV &rAV = pO->rganlv[nSwLevel];
SetBaseAnlv(aNF, rAV, nSwLevel);
// ... und then the Strings
int nTxtOfs = 0;
- BYTE i;
+ sal_uInt8 i;
WW8_ANLV* pAV1; // search String-Positions
for (i = 0, pAV1 = pO->rganlv; i < nSwLevel; ++i, ++pAV1)
{
@@ -910,7 +910,7 @@ void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
// die an jeder Gliederungszeile haengen, enthalten nur Stuss, also werden die
// OLSTs waehrend der Section gemerkt, damit die Informationen beim Auftreten
// von Gliederungsabsaetzen zugreifbar ist.
-void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen <= 0)
{
@@ -925,7 +925,7 @@ void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
*pNumOlst = *(WW8_OLST*)pData;
}
-WW8LvlType GetNumType(BYTE nWwLevelNo)
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
{
WW8LvlType nRet = WW8_None;
if( nWwLevelNo == 12 )
@@ -939,12 +939,12 @@ WW8LvlType GetNumType(BYTE nWwLevelNo)
return nRet;
}
-SwNumRule *ANLDRuleMap::GetNumRule(BYTE nNumType)
+SwNumRule *ANLDRuleMap::GetNumRule(sal_uInt8 nNumType)
{
return (WW8_Numbering == nNumType ? mpNumberingNumRule : mpOutlineNumRule);
}
-void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
+void ANLDRuleMap::SetNumRule(SwNumRule *pRule, sal_uInt8 nNumType)
{
if (WW8_Numbering == nNumType)
mpNumberingNumRule = pRule;
@@ -955,11 +955,11 @@ void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
// StartAnl wird am Anfang eines Zeilenbereichs gerufen,
// der Gliederung / Nummerierung / Aufzaehlung enthaelt
-void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
+void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
bAktAND_fNumberAcross = false;
- BYTE nT = static_cast< BYTE >(GetNumType(*pSprm13));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType(*pSprm13));
if (nT == WW8_Pause || nT == WW8_None)
return;
@@ -967,7 +967,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
SwNumRule *pNumRule = maANLDRules.GetNumRule(nWwNumType);
// check for COL numbering:
- const BYTE* pS12 = 0;// sprmAnld
+ const sal_uInt8* pS12 = 0;// sprmAnld
String sNumRule;
if (pTableDesc)
@@ -1003,7 +1003,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
{
// #i86652#
pNumRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sNumRule, 0, FALSE,
+ rDoc.MakeNumRule( sNumRule, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT ) ];
// <--
}
@@ -1027,7 +1027,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
// NextAnlLine() wird fuer jede Zeile einer
// Gliederung / Nummerierung / Aufzaehlung einmal gerufen
-void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
+void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
{
if (!bAnl)
return;
@@ -1045,7 +1045,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
{
// noch nicht definiert
// sprmAnld o. 0
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1058,7 +1058,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
if (pNumOlst) // es gab ein OLST
{
//Assure upper levels are set, #i9556#
- for (BYTE nI = 0; nI < nSwNumLevel; ++nI)
+ for (sal_uInt8 nI = 0; nI < nSwNumLevel; ++nI)
{
if (!pNumRule->GetNumFmt(nI))
SetNumOlst(pNumRule, pNumOlst, nI);
@@ -1069,7 +1069,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
else // kein Olst, nimm Anld
{
// sprmAnld
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1094,7 +1094,7 @@ void SwWW8ImplReader::StopAllAnl(bool bGoBack)
StopAnlToRestart(WW8_None, bGoBack);
}
-void SwWW8ImplReader::StopAnlToRestart(BYTE nNewType, bool bGoBack)
+void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
{
if (bGoBack)
{
@@ -1145,14 +1145,14 @@ WW8TabBandDesc::WW8TabBandDesc( WW8TabBandDesc& rBand )
}
// ReadDef liest die Zellenpositionen und ggfs die Umrandungen eines Bandes ein
-void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
+void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
{
if (!bVer67)
pS++;
- short nLen = (INT16)SVBT16ToShort( pS - 2 ); // nicht schoen
+ short nLen = (sal_Int16)SVBT16ToShort( pS - 2 ); // nicht schoen
- BYTE nCols = *pS; // Anzahl der Zellen
+ sal_uInt8 nCols = *pS; // Anzahl der Zellen
short nOldCols = nWwCols;
if( nCols > MAX_COL )
@@ -1160,11 +1160,11 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
nWwCols = nCols;
- const BYTE* pT = &pS[1];
+ const sal_uInt8* pT = &pS[1];
nLen --;
int i;
for(i=0; i<=nCols; i++, pT+=2 )
- nCenter[i] = (INT16)SVBT16ToShort( pT ); // X-Raender
+ nCenter[i] = (sal_Int16)SVBT16ToShort( pT ); // X-Raender
nLen -= 2 * ( nCols + 1 );
if( nCols != nOldCols ) // andere Spaltenzahl
{
@@ -1206,7 +1206,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
{
if( i < nColsToRead )
{ // TC aus File ?
- BYTE aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
+ sal_uInt8 aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x02 ) != 0 );
memcpy( pAktTC->rgbrc[ WW8_TOP ].aBits1,
@@ -1236,7 +1236,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
WW8_TCellVer8* pTc = (WW8_TCellVer8*)pT;
for (int k = 0; k < nColsToRead; ++k, ++pAktTC, ++pTc )
{
- UINT16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
+ sal_uInt16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x0001 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x0002 ) != 0 );
pAktTC->bVertical = ( ( aBits1 & 0x0004 ) != 0 );
@@ -1274,13 +1274,13 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
}
}
-void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
+void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC)
{
if( pParamsTSetBRC && pTCs ) // set one or more cell border(s)
{
- BYTE nitcFirst= pParamsTSetBRC[0];// first col to be changed
- BYTE nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
- BYTE nFlag = *(pParamsTSetBRC+2);
+ sal_uInt8 nitcFirst= pParamsTSetBRC[0];// first col to be changed
+ sal_uInt8 nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
+ sal_uInt8 nFlag = *(pParamsTSetBRC+2);
if (nitcFirst >= nWwCols)
return;
@@ -1348,7 +1348,7 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
}
}
-void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
+void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams)
{
// sprmTTableBorders
if( bVer67 )
@@ -1363,16 +1363,16 @@ void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
memcpy( aDefBrcs, pParams, 24 );
}
-void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
+void WW8TabBandDesc::ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol)
{
// sprmTDxaCol (opcode 0x7623) changes the width of cells
// whose index is within a certain range to be a certain value.
if( nWwCols && pParamsTDxaCol ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDxaCol[0]; // first col to be changed
- BYTE nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
- short nDxaCol = (INT16)SVBT16ToShort( pParamsTDxaCol + 2 );
+ sal_uInt8 nitcFirst= pParamsTDxaCol[0]; // first col to be changed
+ sal_uInt8 nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
+ short nDxaCol = (sal_Int16)SVBT16ToShort( pParamsTDxaCol + 2 );
short nOrgWidth;
short nDelta;
@@ -1388,15 +1388,15 @@ void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
}
}
-void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
+void WW8TabBandDesc::ProcessSprmTInsert(const sal_uInt8* pParamsTInsert)
{
if( nWwCols && pParamsTInsert ) // set one or more cell length(s)
{
- BYTE nitcInsert = pParamsTInsert[0]; // position at which to insert
+ sal_uInt8 nitcInsert = pParamsTInsert[0]; // position at which to insert
if (nitcInsert >= MAX_COL) // cannot insert into cell outside max possible index
return;
- BYTE nctc = pParamsTInsert[1]; // number of cells
- USHORT ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
+ sal_uInt8 nctc = pParamsTInsert[1]; // number of cells
+ sal_uInt16 ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
short nNewWwCols;
if (nitcInsert > nWwCols)
@@ -1407,7 +1407,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nitcInsert);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nitcInsert);
}
}
else
@@ -1418,7 +1418,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nWwCols);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nWwCols);
}
}
@@ -1459,7 +1459,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
}
}
-void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
+void WW8TabBandDesc::ProcessDirection(const sal_uInt8* pParams)
{
sal_uInt8 nStartCell = *pParams++;
sal_uInt8 nEndCell = *pParams++;
@@ -1476,24 +1476,24 @@ void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
maDirections[nStartCell] = nCode;
}
-void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
mbHasSpacing=true;
#if OSL_DEBUG_LEVEL > 1
- BYTE nWhichCell = *pParams;
+ sal_uInt8 nWhichCell = *pParams;
OSL_ENSURE(nWhichCell == 0, "Expected cell to be 0!");
#endif
++pParams; //Skip which cell
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
++pParams; //unknown byte
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i = wwTOP; i <= wwRIGHT; i++)
{
switch (nSideBits & (1 << i))
@@ -1519,30 +1519,31 @@ void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpecificSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
- BYTE nWhichCell = *pParams++;
+ sal_uInt8 nWhichCell = *pParams++;
OSL_ENSURE(nWhichCell < MAX_COL + 1, "Cell out of range in spacings");
if (nWhichCell >= MAX_COL + 1)
return;
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
nOverrideSpacing[nWhichCell] |= nSideBits;
OSL_ENSURE(nOverrideSpacing[nWhichCell] < 0x10,
"Unexpected value for nSideBits");
#if OSL_DEBUG_LEVEL > 1
- BYTE nUnknown2 = *pParams;
+ sal_uInt8 nUnknown2 = *pParams;
OSL_ENSURE(nUnknown2 == 0x3, "Unexpected value for spacing2");
+
#endif
++pParams;
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i=0; i < 4; i++)
{
@@ -1551,14 +1552,14 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
+void WW8TabBandDesc::ProcessSprmTDelete(const sal_uInt8* pParamsTDelete)
{
if( nWwCols && pParamsTDelete ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDelete[0]; // first col to be deleted
+ sal_uInt8 nitcFirst= pParamsTDelete[0]; // first col to be deleted
if (nitcFirst >= nWwCols) // first index to delete from doesn't exist
return;
- BYTE nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
+ sal_uInt8 nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
if (nitcLim <= nitcFirst) // second index to delete to is not greater than first index
return;
@@ -1597,9 +1598,9 @@ void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
// ReadShd liest ggfs die Hintergrundfarben einer Zeile ein.
// Es muss vorher ReadDef aufgerufen worden sein
-void WW8TabBandDesc::ReadShd(const BYTE* pS )
+void WW8TabBandDesc::ReadShd(const sal_uInt8* pS )
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if( !nLen )
return;
@@ -1619,9 +1620,9 @@ void WW8TabBandDesc::ReadShd(const BYTE* pS )
pSHDs[i].SetWWValue( *pShd );
}
-void WW8TabBandDesc::ReadNewShd(const BYTE* pS, bool bVer67)
+void WW8TabBandDesc::ReadNewShd(const sal_uInt8* pS, bool bVer67)
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if (!nLen)
return;
@@ -1645,9 +1646,9 @@ void WW8TabBandDesc::setcelldefaults(WW8_TCell *pCells, short nCols)
memset( pCells, 0, nCols * sizeof( WW8_TCell ) );
}
-const BYTE *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
+const sal_uInt8 *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
{
- const BYTE *pParams;
+ const sal_uInt8 *pParams;
if (bVer67)
pParams = pPap->HasSprm(24);
else
@@ -1839,8 +1840,8 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
short nTabeDxaNew = SHRT_MAX;
bool bTabRowJustRead = false;
- const BYTE* pShadeSprm = 0;
- const BYTE* pNewShadeSprm = 0;
+ const sal_uInt8* pShadeSprm = 0;
+ const sal_uInt8* pNewShadeSprm = 0;
WW8_TablePos *pTabPos = 0;
// Suche Ende einer TabZeile
@@ -1856,7 +1857,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
pPap->GetSprms( &aDesc );
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen, aSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for (int nLoop = 0; nLoop < 2; ++nLoop)
{
bool bRepeatedSprm = false;
@@ -1868,9 +1869,9 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
case sprmTTableWidth:
{
- const BYTE b0 = pParams[0];
- const BYTE b1 = pParams[1];
- const BYTE b2 = pParams[2];
+ const sal_uInt8 b0 = pParams[0];
+ const sal_uInt8 b1 = pParams[1];
+ const sal_uInt8 b2 = pParams[2];
if (b0 == 3) // Twips
nPreferredWidth = b2 * 0x100 + b1;
}
@@ -1905,10 +1906,10 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
bIsBiDi = SVBT16ToShort(pParams) ? true : false;
break;
case sprmTDxaGapHalf:
- pNewBand->nGapHalf = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nGapHalf = (sal_Int16)SVBT16ToShort( pParams );
break;
case sprmTDyaRowHeight:
- pNewBand->nLineHeight = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nLineHeight = (sal_Int16)SVBT16ToShort( pParams );
bClaimLineFmt = true;
break;
case sprmTDefTable:
@@ -1927,7 +1928,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
// parameter (meaning the left-most position) and then
// shift the whole table to that margin (see below)
{
- short nDxaNew = (INT16)SVBT16ToShort( pParams );
+ short nDxaNew = (sal_Int16)SVBT16ToShort( pParams );
nOrgDxaLeft = nDxaNew;
if( nDxaNew < nTabeDxaNew )
nTabeDxaNew = nDxaNew;
@@ -2029,7 +2030,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
//Are we still in a table cell
pParams = HasTabCellSprm(pPap, bOldVer);
- const BYTE *pLevel = pPap->HasSprm(0x6649);
+ const sal_uInt8 *pLevel = pPap->HasSprm(0x6649);
// InTable
if (!pParams || (1 != *pParams) ||
(pLevel && (*pLevel <= pIo->nInTable)))
@@ -2290,11 +2291,11 @@ void WW8TabDesc::CalcDefaults()
pR->bREmptyCol = (nMaxRight - pR->nCenter[pR->nWwCols] - nRightMaxThickness) >= MINLAY;
short nAddCols = pR->bLEmptyCol + pR->bREmptyCol;
- USHORT i;
- USHORT j = ( pR->bLEmptyCol ) ? 1 : 0;
+ sal_uInt16 i;
+ sal_uInt16 j = ( pR->bLEmptyCol ) ? 1 : 0;
for (i = 0; i < pR->nWwCols; ++i)
{
- pR->nTransCell[i] = (INT8)j;
+ pR->nTransCell[i] = (sal_Int8)j;
if ( pR->nCenter[i] < pR->nCenter[i+1] )
{
pR->bExist[i] = true;
@@ -2316,15 +2317,15 @@ void WW8TabDesc::CalcDefaults()
*/
if (i && pR->bExist[i-1] == false)
{
- USHORT k=i-1;
+ sal_uInt16 k=i-1;
while (k && pR->bExist[k] == false)
k--;
- for (USHORT n=k+1;n<i;n++)
+ for (sal_uInt16 n=k+1;n<i;n++)
pR->nTransCell[n] = pR->nTransCell[k];
}
- pR->nTransCell[i++] = (INT8)(j++); // Wird u.a. wegen bREmptyCol um
- pR->nTransCell[i] = (INT8)j; // max. 2 ueberindiziert
+ pR->nTransCell[i++] = (sal_Int8)(j++); // Wird u.a. wegen bREmptyCol um
+ pR->nTransCell[i] = (sal_Int8)j; // max. 2 ueberindiziert
pR->nSwCols = pR->nSwCols + nAddCols;
if( pR->nSwCols < nMinCols )
@@ -2426,7 +2427,7 @@ void WW8TabDesc::CreateSwTable()
// da sich die (identischen) Zeilen eines Bandes prima duplizieren lassen
pTable = pIo->rDoc.InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
- *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, FALSE, TRUE );
+ *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, sal_False, sal_True );
OSL_ENSURE(pTable && pTable->GetFrmFmt(), "insert table failed");
if (!pTable || !pTable->GetFrmFmt())
@@ -2444,7 +2445,7 @@ void WW8TabDesc::CreateSwTable()
// ein Pagedesc steht. Dann wuerde der PageDesc in die naechste Zeile
// hinter der Tabelle rutschen, wo er nichts zu suchen hat. -> loeschen
// und spaeter an das Tabellenformat setzen
- if (SwTxtNode* pNd = pIo->rDoc.GetNodes()[pTmpPos->nNode]->GetTxtNode())
+ if (SwTxtNode *const pNd = pTmpPos->nNode.GetNode().GetTxtNode())
{
if (const SfxItemSet* pSet = pNd->GetpSwAttrSet())
{
@@ -2541,7 +2542,7 @@ void WW8TabDesc::UseSwTable()
OSL_ENSURE( pTblNd, "wo ist mein TabellenNode" );
// #i69519# - Restrict rows to repeat to a decent value
- if ( nRowsToRepeat == static_cast<USHORT>(nRows) )
+ if ( nRowsToRepeat == static_cast<sal_uInt16>(nRows) )
nRowsToRepeat = 1;
pTblNd->GetTable().SetRowsToRepeat( nRowsToRepeat );
@@ -2584,7 +2585,7 @@ void WW8TabDesc::MergeCells()
pTabLine = (*pTabLines)[ nRow ];
pTabBoxes = &pTabLine->GetTabBoxes();
- USHORT nCol = pActBand->nTransCell[ i ];
+ sal_uInt16 nCol = pActBand->nTransCell[ i ];
if (!pActBand->bExist[i])
continue;
OSL_ENSURE(nCol < pTabBoxes->Count(),
@@ -2612,7 +2613,7 @@ void WW8TabDesc::MergeCells()
//If its a hori merge only, and the only things in
//it are invalid cells then its already taken care
//of, so don't merge.
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2646,7 +2647,7 @@ void WW8TabDesc::MergeCells()
// Needed to correctly locked previously created merge groups.
// Gesamtbreite ermitteln und zuweisen
short nSizCell = pActBand->nWidth[ i ];
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2748,17 +2749,17 @@ void WW8TabDesc::FinishSwTable()
{
// bearbeite alle Merge-Gruppen nacheinander
WW8SelBoxInfo* pActMGroup;
- USHORT nActBoxCount;
+ sal_uInt16 nActBoxCount;
- for (USHORT iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
+ for (sal_uInt16 iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
{
pActMGroup = (*pMergeGroups)[ iGr ];
nActBoxCount = pActMGroup->Count();
if( ( 1 < nActBoxCount ) && pActMGroup && (*pActMGroup)[ 0 ] )
{
- const USHORT nRowSpan = pActMGroup->Count();
- for (USHORT n = 0; n < nRowSpan; ++n)
+ const sal_uInt16 nRowSpan = pActMGroup->Count();
+ for (sal_uInt16 n = 0; n < nRowSpan; ++n)
{
SwTableBox* pCurrentBox = (*pActMGroup)[n];
const long nRowSpanSet = n == 0 ?
@@ -2798,7 +2799,6 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
short nGrX2;
// improvement: search backwards
- // for ( USHORT iGr = 0; iGr < pMergeGroups->Count(); iGr++ )
for ( short iGr = pMergeGroups->Count() - 1; iGr >= 0; --iGr )
{
// die aktuell untersuchte Gruppe
@@ -2841,7 +2841,7 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
bool WW8TabDesc::IsValidCell(short nCol) const
{
- return pActBand->bExist[nCol] && (USHORT)nAktRow < pTabLines->Count();
+ return pActBand->bExist[nCol] && (sal_uInt16)nAktRow < pTabLines->Count();
}
bool WW8TabDesc::InFirstParaInCell() const
@@ -2883,9 +2883,9 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
{
OSL_ENSURE( pActBand, "pActBand ist 0" );
- USHORT nCol = pActBand->nTransCell[nWwCol];
+ sal_uInt16 nCol = pActBand->nTransCell[nWwCol];
- if ((USHORT)nAktRow >= pTabLines->Count())
+ if ((sal_uInt16)nAktRow >= pTabLines->Count())
{
OSL_ENSURE(!this, "Actual row bigger than expected." );
if (bPam)
@@ -3079,7 +3079,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx )
}
}
-SvxFrameDirection MakeDirection(sal_uInt16 nCode, BOOL bIsBiDi)
+SvxFrameDirection MakeDirection(sal_uInt16 nCode, sal_Bool bIsBiDi)
{
SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
// 1: Asian layout with rotated CJK characters
@@ -3148,7 +3148,7 @@ void WW8TabDesc::AdjustNewBand()
InsertCells( pActBand->nSwCols - nDefaultSwCols );
SetPamInCell( 0, false);
- OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (USHORT)pActBand->nSwCols,
+ OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (sal_uInt16)pActBand->nSwCols,
"Falsche Spaltenzahl in Tabelle" );
if( bClaimLineFmt )
@@ -3272,7 +3272,7 @@ void WW8TabDesc::TableCellEnd()
// bWasTabRowEnd will be deactivated in
// SwWW8ImplReader::ProcessSpecial()
- USHORT iCol = GetLogicalWWCol();
+ sal_uInt16 iCol = GetLogicalWWCol();
if (iCol < aNumRuleNames.size())
{
aNumRuleNames.erase(aNumRuleNames.begin() + iCol,
@@ -3319,7 +3319,7 @@ void WW8TabDesc::TableCellEnd()
SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
WW8SelBoxInfo* pActGroup,
SwTableBox* pActBox,
- USHORT nCol )
+ sal_uInt16 nCol )
{
// Rueckgabewert defaulten
SwTableBox* pResult = 0;
@@ -3362,12 +3362,12 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
}
-USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
+sal_uInt16 WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
if( pActBand && pActBand->pTCs)
{
- for( USHORT iCol = 1; iCol <= nAktCol && iCol <= pActBand->nWwCols; ++iCol )
+ for( sal_uInt16 iCol = 1; iCol <= nAktCol; ++iCol )
{
if( !pActBand->pTCs[ iCol-1 ].bMerged )
++nCol;
@@ -3379,7 +3379,7 @@ USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED
// find name of numrule valid for current WW-COL
const String& WW8TabDesc::GetNumRuleName() const
{
- USHORT nCol = GetLogicalWWCol();
+ sal_uInt16 nCol = GetLogicalWWCol();
if (nCol < aNumRuleNames.size())
return aNumRuleNames[nCol];
else
@@ -3388,8 +3388,8 @@ const String& WW8TabDesc::GetNumRuleName() const
void WW8TabDesc::SetNumRuleName( const String& rName )
{
- USHORT nCol = GetLogicalWWCol();
- for (USHORT nSize = static_cast< USHORT >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
+ sal_uInt16 nCol = GetLogicalWWCol();
+ for (sal_uInt16 nSize = static_cast< sal_uInt16 >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
aNumRuleNames.push_back(aEmptyStr);
aNumRuleNames[nCol] = rName;
}
@@ -3502,7 +3502,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// <--
// #i33818# - The nested table doesn't have to leave
// the table cell. Thus, the Writer fly frame has to follow the text flow.
- pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( TRUE ) );
+ pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( sal_True ) );
// <--
}
else
@@ -3575,13 +3575,13 @@ void SwWW8ImplReader::TabCellEnd()
mpTableEndPaM.reset();
}
-void SwWW8ImplReader::Read_TabCellEnd( USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabCellEnd = true;
}
-void SwWW8ImplReader::Read_TabRowEnd( USHORT, const BYTE* pData, short nLen ) // Sprm25
+void SwWW8ImplReader::Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm25
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabRowEnd = true;
@@ -3661,12 +3661,12 @@ bool SwWW8ImplReader::IsInvalidOrToBeMergedTabCell() const
);
}
-USHORT SwWW8ImplReader::StyleUsingLFO( USHORT nLFOIndex ) const
+sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
{
- USHORT nRes = USHRT_MAX;
+ sal_uInt16 nRes = USHRT_MAX;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (nLFOIndex == pCollA[ nI ].nLFOIndex) )
nRes = nI;
@@ -3679,7 +3679,7 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
SwFmt* pRet = 0;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (rName.Equals( pCollA[ nI ].GetOrgWWName())) )
{
@@ -3694,17 +3694,17 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
// class WW8RStyle
//-----------------------------------------
-const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8RStyle::HasParaSprm( sal_uInt16 nId ) const
{
if( !pParaSprms || !nSprmsLen )
return 0;
- const BYTE* pSprms = pParaSprms;
- USHORT i, x;
+ const sal_uInt8* pSprms = pParaSprms;
+ sal_uInt16 i, x;
for( i=0; i < nSprmsLen; )
{
- USHORT nAktId = maSprmParser.GetSprmId(pSprms);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
// Sprm found ?
if( nAktId == nId )
return pSprms + maSprmParser.DistanceToData(nId);
@@ -3716,7 +3716,7 @@ const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
return 0; // Sprm not found
}
-void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
+void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
{
if (!nLen)
return;
@@ -3729,7 +3729,7 @@ void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
while ( nLen > 0 )
{
- USHORT nL1 = pIo->ImportSprm(pSprms);
+ sal_uInt16 nL1 = pIo->ImportSprm(pSprms);
nLen = nLen - nL1;
pSprms += nL1;
}
@@ -3743,7 +3743,7 @@ void WW8RStyle::ImportSprms(sal_Size nPosFc, short nLen, bool bPap)
if (!nLen)
return;
- BYTE *pSprms = new BYTE[nLen];
+ sal_uInt8 *pSprms = new sal_uInt8[nLen];
pStStrm->Seek(nPosFc);
pStStrm->Read(pSprms, nLen);
@@ -3757,7 +3757,7 @@ static inline short WW8SkipOdd(SvStream* pSt )
{
if ( pSt->Tell() & 0x1 )
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3768,7 +3768,7 @@ static inline short WW8SkipEven(SvStream* pSt )
{
if (!(pSt->Tell() & 0x1))
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3777,7 +3777,7 @@ static inline short WW8SkipEven(SvStream* pSt )
short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
- INT16 cbUPX;
+ sal_Int16 cbUPX;
if( 0 < nLen ) // Empty ?
{
@@ -3797,7 +3797,7 @@ short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
if( bPAP )
{
- UINT16 id;
+ sal_uInt16 id;
*pStStrm >> id;
cbUPX-= 2;
@@ -3928,7 +3928,7 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
rSI.bImportSkipped = !bImport;
// Set Based on style
- USHORT j = rSI.nBase;
+ sal_uInt16 j = rSI.nBase;
if (j != nThisStyle && j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
@@ -3990,7 +3990,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
pIo->nListLevel = WW8ListManager::nMaxLevel;
}
-void WW8RStyle::Import1Style( USHORT nNr )
+void WW8RStyle::Import1Style( sal_uInt16 nNr )
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
@@ -4043,7 +4043,7 @@ void WW8RStyle::Import1Style( USHORT nNr )
delete pStd;
}
-void WW8RStyle::RecursiveReg(USHORT nNr)
+void WW8RStyle::RecursiveReg(sal_uInt16 nNr)
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
if( rSI.bImported || !rSI.bValid )
@@ -4065,7 +4065,7 @@ void WW8RStyle::RecursiveReg(USHORT nNr)
*/
void WW8RStyle::PostProcessStyles()
{
- USHORT i;
+ sal_uInt16 i;
/*
Clear all imported flags so that we can recursively apply numbering
formats and use it to mark handled ones
@@ -4095,7 +4095,7 @@ void WW8RStyle::PostProcessStyles()
void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
{ // und ermittelt die Filepos fuer jeden Style
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
short nSkip;
SwWW8StyInf &rSI = pIo->pCollA[i];
@@ -4116,30 +4116,30 @@ void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
}
}
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx)
{
- std::vector<BYTE> aRet;
+ std::vector<sal_uInt8> aRet;
aRet.push_back(60);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBold) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBold) );
aRet.push_back(61);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalic) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalic) );
aRet.push_back(62);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fStrike) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fStrike) );
aRet.push_back(63);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fOutline) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fOutline) );
aRet.push_back(65);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fSmallCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fSmallCaps) );
aRet.push_back(66);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fCaps) );
aRet.push_back(67);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fVanish) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fVanish) );
if (rChpx.fsFtc)
{
@@ -4187,10 +4187,10 @@ std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
}
aRet.push_back(80);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBoldBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBoldBi) );
aRet.push_back(81);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalicBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalicBi) );
if (rChpx.fsFtcBi)
{
@@ -4369,7 +4369,7 @@ void WW8RStyle::ImportOldFormatStyles()
sal_uInt16 cbName;
rSt >> cbName;
sal_uInt16 nByteCount = 2;
- USHORT stcp=0;
+ sal_uInt16 stcp=0;
while (nByteCount < cbName)
{
sal_uInt8 nCount;
@@ -4410,14 +4410,14 @@ void WW8RStyle::ImportOldFormatStyles()
stcp++;
}
- USHORT nStyles=stcp;
+ sal_uInt16 nStyles=stcp;
std::vector<pxoffset> aCHPXOffsets(stcp);
sal_uInt16 cbChpx;
rSt >> cbChpx;
nByteCount = 2;
stcp=0;
- std::vector< std::vector<BYTE> > aConvertedChpx;
+ std::vector< std::vector<sal_uInt8> > aConvertedChpx;
while (nByteCount < cbChpx)
{
sal_uInt8 cb;
@@ -4440,7 +4440,7 @@ void WW8RStyle::ImportOldFormatStyles()
nByteCount += nRemainder;
}
else
- aConvertedChpx.push_back( std::vector<BYTE>() );
+ aConvertedChpx.push_back( std::vector<sal_uInt8>() );
stcp++;
if (stcp == nStyles)
@@ -4538,7 +4538,7 @@ void WW8RStyle::ImportNewFormatStyles()
{
ScanStyles(); // Scanne Based On
- for (USHORT i = 0; i < cstd; ++i) // import Styles
+ for (sal_uInt16 i = 0; i < cstd; ++i) // import Styles
if (pIo->pCollA[i].bValid)
Import1Style( i );
}
@@ -4562,11 +4562,11 @@ void WW8RStyle::Import()
ImportStyles();
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
// Follow chain
SwWW8StyInf* pi = &pIo->pCollA[i];
- USHORT j = pi->nFollow;
+ sal_uInt16 j = pi->nFollow;
if( j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index b54d5d02bb93..5e3e2a8cff10 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -58,24 +58,24 @@ struct WW8FlyPara
// Achtung: *Nicht* umsortieren, da Teile mit
// memcmp verglichen werden
bool bVer67;
- INT16 nSp26, nSp27; // rohe Position
- INT16 nSp45, nSp28; // Breite / Hoehe
- INT16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
- BYTE nSp29; // rohe Bindung + Alignment
- BYTE nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
+ sal_Int16 nSp26, nSp27; // rohe Position
+ sal_Int16 nSp45, nSp28; // Breite / Hoehe
+ sal_Int16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
+ sal_uInt8 nSp29; // rohe Bindung + Alignment
+ sal_uInt8 nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
WW8_BRC5 brc; // Umrandung Top, Left, Bottom, Right, Between
bool bBorderLines; // Umrandungslinien
bool bGrafApo; // true: Dieser Rahmen dient allein dazu, die
// enthaltene Grafik anders als zeichengebunden
// zu positionieren
bool mbVertSet; // true if vertical positioning has been set
- BYTE nOrigSp29;
+ sal_uInt8 nOrigSp29;
WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = 0);
bool operator==(const WW8FlyPara& rSrc) const;
- void Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap);
- void ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo);
- void Read(const BYTE* pSprm29, WW8RStyle* pStyle);
+ void Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap);
+ void ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo);
+ void Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle);
void ApplyTabPos(const WW8_TablePos *pTabPos);
bool IsEmpty() const;
};
@@ -85,11 +85,11 @@ struct WW8SwFlyPara
SwFlyFrmFmt* pFlyFmt;
// 1. Teil: daraus abgeleitete Sw-Attribute
- INT16 nXPos, nYPos; // Position
- INT16 nLeMgn, nRiMgn; // Raender
- INT16 nUpMgn, nLoMgn; // Raender
- INT16 nWidth, nHeight; // Groesse
- INT16 nNettoWidth;
+ sal_Int16 nXPos, nYPos; // Position
+ sal_Int16 nLeMgn, nRiMgn; // Raender
+ sal_Int16 nUpMgn, nLoMgn; // Raender
+ sal_Int16 nWidth, nHeight; // Groesse
+ sal_Int16 nNettoWidth;
SwFrmSize eHeightFix; // Hoehe Fix oder Min
RndStdIds eAnchor; // Bindung
@@ -99,12 +99,12 @@ struct WW8SwFlyPara
sal_Int16 eHAlign; // links, rechts, mittig
SwSurround eSurround; // Wrap-Mode
- BYTE nXBind, nYBind; // relativ zu was gebunden
+ sal_uInt8 nXBind, nYBind; // relativ zu was gebunden
// 2.Teil: sich waehrend des Einlesens ergebende AEnderungen
long nNewNettoWidth;
SwPosition* pMainTextPos; // um nach Apo in Haupttext zurueckzukehren
- USHORT nLineSpace; // LineSpace in tw fuer Graf-Apos
+ sal_uInt16 nLineSpace; // LineSpace in tw fuer Graf-Apos
bool bAutoWidth;
bool bToggelPos;
@@ -115,8 +115,8 @@ struct WW8SwFlyPara
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy );
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy );
void BoxUpWidth( long nWidth );
SwWW8FltAnchorStack *pOldAnchorStck;
@@ -125,7 +125,7 @@ struct WW8SwFlyPara
class SwWW8StyInf
{
String sWWStyleName;
- USHORT nWWStyleId;
+ sal_uInt16 nWWStyleId;
public:
rtl_TextEncoding eLTRFontSrcCharSet; // rtl_TextEncoding fuer den Font
rtl_TextEncoding eRTLFontSrcCharSet; // rtl_TextEncoding fuer den Font
@@ -134,11 +134,11 @@ public:
WW8FlyPara* pWWFly;
SwNumRule* pOutlineNumrule;
long nFilePos;
- USHORT nBase;
- USHORT nFollow;
- USHORT nLFOIndex;
- BYTE nListLevel;
- BYTE nOutlineLevel; // falls Gliederungs-Style
+ sal_uInt16 nBase;
+ sal_uInt16 nFollow;
+ sal_uInt16 nLFOIndex;
+ sal_uInt8 nListLevel;
+ sal_uInt8 nOutlineLevel; // falls Gliederungs-Style
sal_uInt16 n81Flags; // Fuer Bold, Italic, ...
sal_uInt16 n81BiDiFlags; // Fuer Bold, Italic, ...
SvxLRSpaceItem maWordLR;
@@ -191,12 +191,12 @@ public:
delete pWWFly;
}
- void SetOrgWWIdent( const String& rName, const USHORT nId )
+ void SetOrgWWIdent( const String& rName, const sal_uInt16 nId )
{
sWWStyleName = rName;
nWWStyleId = nId;
}
- USHORT GetWWStyleId() const { return nWWStyleId; }
+ sal_uInt16 GetWWStyleId() const { return nWWStyleId; }
const String& GetOrgWWName() const
{
return sWWStyleName;
@@ -226,10 +226,10 @@ friend class SwWW8ImplReader;
SwNumRule* pStyRule; // Bullets und Aufzaehlungen in Styles
- BYTE* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
- USHORT nSprmsLen; // Laenge davon
+ sal_uInt8* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
+ sal_uInt16 nSprmsLen; // Laenge davon
- BYTE nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
+ sal_uInt8 nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
bool bTxtColChanged;
bool bFontChanged; // For Simulating Default-Font
@@ -240,13 +240,13 @@ friend class SwWW8ImplReader;
bool bWidowsChanged; // For Simulating Default-Widows / Orphans
void ImportSprms(sal_Size nPosFc, short nLen, bool bPap);
- void ImportSprms(BYTE *pSprms, short nLen, bool bPap);
+ void ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap);
void ImportGrupx(short nLen, bool bPara, bool bOdd);
short ImportUPX(short nLen, bool bPAP, bool bOdd);
void Set1StyleDefaults();
- void Import1Style(USHORT nNr);
- void RecursiveReg(USHORT nNr);
+ void Import1Style(sal_uInt16 nNr);
+ void RecursiveReg(sal_uInt16 nNr);
void ImportStyles();
@@ -264,7 +264,7 @@ public:
WW8RStyle( WW8Fib& rFib, SwWW8ImplReader* pI );
void Import();
void PostProcessStyles();
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
};
class WW8FlySet: public SfxItemSet
@@ -282,7 +282,7 @@ public:
enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
-WW8LvlType GetNumType(BYTE nWwLevelNo);
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo);
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index e5cfefd4c3ce..fd5edc4358b2 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -153,7 +153,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -201,7 +201,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -276,7 +276,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0)
@@ -346,8 +346,8 @@ struct WW8LST // nur DIE Eintraege, die WIR benoetigen!
// nIStDNil if no style linked
sal_uInt32 nIdLst; // Unique List ID
sal_uInt32 nTplC; // Unique template code - Was ist das bloss?
- BYTE bSimpleList:1; // Flag: Liste hat nur EINEN Level
- BYTE bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
+ sal_uInt8 bSimpleList:1; // Flag: Liste hat nur EINEN Level
+ sal_uInt8 bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
// true if the list should start numbering over
}; // at the beginning of each section
@@ -375,11 +375,11 @@ struct WW8LVL // nur DIE Eintraege, die WIR benoetigen!
sal_uInt8 nLenGrpprlChpx; // length, in bytes, of the LVL's grpprlChpx
sal_uInt8 nLenGrpprlPapx; // length, in bytes, of the LVL's grpprlPapx
sal_uInt8 nAlign: 2; // alignment (left, right, centered) of the number
- BYTE bLegal: 1; // egal
- BYTE bNoRest:1; // egal
- BYTE bV6Prev:1; // Ver6-Compatible: number will include previous levels
- BYTE bV6PrSp:1; // Ver6-Compatible: egal
- BYTE bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
+ sal_uInt8 bLegal: 1; // egal
+ sal_uInt8 bNoRest:1; // egal
+ sal_uInt8 bV6Prev:1; // Ver6-Compatible: number will include previous levels
+ sal_uInt8 bV6PrSp:1; // Ver6-Compatible: egal
+ sal_uInt8 bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
sal_uInt8 bDummy: 1; // (macht das Byte voll)
};
@@ -392,8 +392,8 @@ struct WW8LFOLVL
// dieses Byte ist _absichtlich_ nicht in das folgende Byte hineingepackt !!
// (siehe Kommentar unten bei struct WW8LFOInfo)
- BYTE bStartAt :1; // true if the start-at value is overridden
- BYTE bFormat :1; // true if the formatting is overriden
+ sal_uInt8 bStartAt :1; // true if the start-at value is overridden
+ sal_uInt8 bFormat :1; // true if the formatting is overriden
WW8LFOLVL() :
nStartAt(1), nLevel(0), bStartAt(1), bFormat(0) {}
@@ -410,8 +410,8 @@ struct WW8LSTInfo // sortiert nach nIdLst (in WW8 verwendete Listen-Id)
SwNumRule* pNumRule; // Zeiger auf entsprechende Listenvorlage im Writer
sal_uInt32 nIdLst; // WW8Id dieser Liste
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
WW8LSTInfo(SwNumRule* pNumRule_, WW8LST& aLST)
@@ -441,12 +441,12 @@ struct WW8LFOInfo // unsortiert, d.h. Reihenfolge genau wie im WW8 Stream
// Byte mit hineinpacken, doch waere das eine ziemliche Fehlerquelle,
// an dem Tag, wo MS ihr Listenformat auf mehr als 15 Level aufbohren.
- BYTE bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
+ sal_uInt8 bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
// sondern fuer pLFOInfos NEU angelegt wurde
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
- BYTE bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
+ sal_uInt8 bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
// und nicht nochmals gesetzt zu werden braucht
WW8LFOInfo(const WW8LFO& rLFO);
};
@@ -471,7 +471,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
sal_uInt8 nLen)
{
sal_uInt8* pSprms = &rSprms;
- USHORT nRemLen=nLen;
+ sal_uInt16 nRemLen=nLen;
while (nRemLen > (maSprmParser.getVersion()?1:0))
{
sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
@@ -479,7 +479,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
return pSprms + maSprmParser.DistanceToData(nId);
// gib Zeiger auf Daten
- USHORT nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
+ sal_uInt16 nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
pSprms += nSize;
nRemLen -= nSize;
}
@@ -638,7 +638,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// most of the time.
if ( nTabPos != 0 )
{
- const USHORT nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
+ const sal_uInt16 nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
bool bDoAdjust = false;
if ( nDesired < aLVL.nDxaLeft )
@@ -694,8 +694,8 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// in WW8PAR6.CXX rufen ganz normal ihr NewAttr() oder GetFmtAttr()
// und diese merken am besetzten Reader-ItemSet-Pointer, dass dieser
// spezielle ItemSet relevant ist - und nicht ein Stack oder Style!
- USHORT nOldFlags1 = rReader.GetToggleAttrFlags();
- USHORT nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
+ sal_uInt16 nOldFlags1 = rReader.GetToggleAttrFlags();
+ sal_uInt16 nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
short nLen = aLVL.nLenGrpprlChpx;
sal_uInt8* pSprms1 = &aGrpprlChpx[0];
while (0 < nLen)
@@ -1056,7 +1056,7 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple)
sPrefix += String::CreateFromInt32(nUniqueList++);
// #i86652#
sal_uInt16 nRul =
- rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, FALSE,
+ rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
SwNumRule* pMyNumRule = rDoc.GetNumRuleTbl()[nRul];
@@ -1386,7 +1386,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
else if (aLFOLVL.bStartAt)
{
aNumFmt.SetStart(
- writer_cast<USHORT>(aLFOLVL.nStartAt));
+ writer_cast<sal_uInt16>(aLFOLVL.nStartAt));
}
//
// 2.2.2.3 das NumFmt in die NumRule aufnehmen
@@ -1477,7 +1477,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
if (bRet)
{
- for (BYTE n = 0; n < MAXLEVEL; ++n )
+ for (sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
//The SvxNumberFormat compare, not the SwNumFmt compare
const SvxNumberFormat &rO = rOne.Get(n);
@@ -1493,7 +1493,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
}
SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
- const BYTE nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
+ const sal_uInt8 nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
{
sal_uInt16 nLFOInfos = pLFOInfos ? pLFOInfos->Count() : 0;
if( nLFOInfos <= nLFOPosition )
@@ -1551,7 +1551,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
SwNumRule *pRet = pLFOInfo->pNumRule;
bool bRestart(false);
- USHORT nStart(0);
+ sal_uInt16 nStart(0);
bool bNewstart(false);
/*
Note: If you fiddle with this then you have to make sure that #i18322#
@@ -1591,7 +1591,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
else
{
bNewstart = true;
- nStart = writer_cast<USHORT>
+ nStart = writer_cast<sal_uInt16>
(pLFOInfo->maOverrides[nLevel].nStartAt);
}
}
@@ -2098,10 +2098,10 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula,
(*pPlcxMan)++;
nStart = pPlcxMan->Where();
}
- ULONG nOffset = nPicLocFc;
+ sal_uLong nOffset = nPicLocFc;
aSave.Restore(this);
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nOffset);
PicRead( pDataStream, &aPic, bVer67);
@@ -2146,8 +2146,8 @@ sal_Bool SwMSConvertControls::InsertFormula(WW8FormulaControl &rFormula)
void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
SvStream *pDataStream)
{
- UINT8 nField;
- UINT8 nHeaderByte;
+ sal_uInt8 nField;
+ sal_uInt8 nHeaderByte;
int nType=0;
*pDataStream >> nHeaderByte;
@@ -2286,7 +2286,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
awt::Size aRet;
struct CtrlFontMapEntry
{
- USHORT nWhichId;
+ sal_uInt16 nWhichId;
const sal_Char* pPropNm;
};
const CtrlFontMapEntry aMapTable[] =
@@ -2548,7 +2548,7 @@ WW8FormulaEditBox::WW8FormulaEditBox(SwWW8ImplReader &rR)
sal_Bool SwMSConvertControls::InsertControl(
const uno::Reference< form::XFormComponent > & rFComp,
const awt::Size& rSize, uno::Reference< drawing::XShape > *pShape,
- BOOL bFloatingCtrl)
+ sal_Bool bFloatingCtrl)
{
const uno::Reference< container::XIndexContainer > &rComps = GetFormComps();
uno::Any aTmp( &rFComp, ::getCppuType((const uno::Reference<
@@ -2575,8 +2575,8 @@ sal_Bool SwMSConvertControls::InsertControl(
xCreate, uno::UNO_QUERY );
//I lay a small bet that this will change to
- //INT16 nTemp=TextContentAnchorType::AS_CHARACTER;
- INT16 nTemp;
+ //sal_Int16 nTemp=TextContentAnchorType::AS_CHARACTER;
+ sal_Int16 nTemp;
if (bFloatingCtrl)
nTemp= text::TextContentAnchorType_AT_PARAGRAPH;
else
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 725981e57c05..cd91a87d1f08 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -67,10 +67,10 @@
struct OLE_MFP
{
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int in 1/100 mm
- INT16 yExt; // 0xa int in 1/100 mm
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int in 1/100 mm
+ sal_Int16 yExt; // 0xa int in 1/100 mm
+ sal_Int16 hMF; // 0xc int
};
using namespace ::com::sun::star;
@@ -100,7 +100,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
OSL_ENSURE( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
- INT32 nOrgWidth,
+ sal_Int32 nOrgWidth,
nOrgHeight,
nScaleX,
nScaleY,
@@ -141,7 +141,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
STREAM_STD_READ | STREAM_NOCREATE);
SvStorageStream* pSt = xSrc2;
pSt->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- ULONG nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
+ sal_uLong nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
// Mini-Placable-Header lesen
if (nRead != sizeof(*pMfp))
return false;
@@ -196,8 +196,8 @@ static bool SwWw6ReadMacPICTStream(Graphic& rGraph, SvStorageRef& rSrc1)
SvStorageStreamRef xSrc4 = rSrc1->OpenSotStream( CREATE_CONST_ASC( "\3PICT" ));
SvStorageStream* pStp = xSrc4;
pStp->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- BYTE aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
- ULONG nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
+ sal_uInt8 aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
+ sal_uLong nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
if (nReadTst != sizeof(aTestA))
return false;
@@ -425,7 +425,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
if (bOleOk)
{
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
pDataStream->Seek(STREAM_SEEK_TO_END);
SvStream *pTmpData = 0;
if (nObjLocFc < pDataStream->Tell())
@@ -441,7 +441,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
STREAM_STD_READ | STREAM_NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
- BYTE nByte = 0;
+ sal_uInt8 nByte = 0;
*xObjInfoSrc >> nByte;
if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
nAspect = embed::Aspects::MSOLE_ICON;
@@ -459,17 +459,17 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
}
void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
- INT32 nTblPos, INT32 nTblSiz, SwDoc& rDocOut )
+ sal_Int32 nTblPos, sal_Int32 nTblSiz, SwDoc& rDocOut )
{
::std::vector<String> aAuthorNames;
WW8ReadSTTBF( !bVer67, rStrm, nTblPos, nTblSiz, bVer67 ? 2 : 0,
eStructCharSet, aAuthorNames );
- USHORT nCount = static_cast< USHORT >(aAuthorNames.size());
- for( USHORT nAuthor = 0; nAuthor < nCount; ++nAuthor )
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(aAuthorNames.size());
+ for( sal_uInt16 nAuthor = 0; nAuthor < nCount; ++nAuthor )
{
// Store author in doc
- USHORT nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
+ sal_uInt16 nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
// Store matchpair
if( !pAuthorInfos )
pAuthorInfos = new sw::util::AuthorInfos;
@@ -484,14 +484,14 @@ void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
*/
// insert or delete content (change char attributes resp.)
void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
- const BYTE* pData, short nLen )
+ const sal_uInt8* pData, short nLen )
{
// there *must* be a SprmCIbstRMark[Del] and a SprmCDttmRMark[Del]
// pointing to the very same char position as our SprmCFRMark[Del]
if (!pPlcxMan)
return;
- const BYTE* pSprmCIbstRMark;
- const BYTE* pSprmCDttmRMark;
+ const sal_uInt8* pSprmCIbstRMark;
+ const sal_uInt8* pSprmCDttmRMark;
if( nsRedlineType_t::REDLINE_FORMAT == eType )
{
pSprmCIbstRMark = pData+1;
@@ -504,7 +504,7 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
of the change, (possibly a word bug) so we must use the "get a full
list" varient of HasCharSprm and take the last one as the true one.
*/
- std::vector<const BYTE *> aResult;
+ std::vector<const sal_uInt8 *> aResult;
bool bIns = (nsRedlineType_t::REDLINE_INSERT == eType);
if( bVer67 )
{
@@ -529,16 +529,16 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
else
{
// start of new revision mark, if not there default to first entry
- USHORT nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
+ sal_uInt16 nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
sw::util::AuthorInfo aEntry(nWWAutNo);
- USHORT nPos;
+ sal_uInt16 nPos;
if (pAuthorInfos && pAuthorInfos->Seek_Entry(&aEntry, &nPos))
{
if (const sw::util::AuthorInfo* pAuthor = pAuthorInfos->GetObject(nPos))
{
- UINT32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
+ sal_uInt32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
DateTime aStamp(sw::ms::DTTM2DateTime(nWWDate));
- USHORT nAutorNo = pAuthor->nOurId;
+ sal_uInt16 nAutorNo = pAuthor->nOurId;
SwFltRedline aNewAttr(eType, nAutorNo, aStamp);
NewAttr(aNewAttr);
@@ -548,19 +548,19 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
}
// insert new content
-void SwWW8ImplReader::Read_CFRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_INSERT, pData, nLen );
}
// delete old content
-void SwWW8ImplReader::Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_DELETE, pData, nLen );
}
// change properties of content ( == char formating)
-void SwWW8ImplReader::Read_CPropRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
// complex (len is always 7)
// 1 byte - chp.fPropRMark
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index ab9a07d646a0..be19f7453432 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -286,10 +286,10 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
// read parameters "1-3" or 1-3 with both values between 1 and nMax
-bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax)
+bool _ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, sal_uInt16 nMax)
{
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
xub_StrLen n = GoToTokenParam();
if( STRING_NOTFOUND != n )
{
@@ -300,8 +300,8 @@ bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax
String sStart( sParams.GetToken(0, '-', nIndex) );
if( STRING_NOTFOUND != nIndex )
{
- nStart = static_cast<USHORT>(sStart.ToInt32());
- nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32());
+ nStart = static_cast<sal_uInt16>(sStart.ToInt32());
+ nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32());
}
}
if( pFrom ) *pFrom = nStart;
@@ -555,14 +555,14 @@ static SvxExtNumType GetNumberPara(String& rStr, bool bAllowPageDesc = false)
-bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
+bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang)
{
bool bRet(false);
const SvxLanguageItem *pLang =
(const SvxLanguageItem*)GetFmtAttr(RES_CHRATR_LANGUAGE);
OSL_ENSURE(pLang, "impossible");
- USHORT nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
+ sal_uInt16 nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
if (nLang != nDefault)
{
@@ -574,12 +574,12 @@ bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
return bRet;
}
-String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
+String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, sal_uInt16 nLang)
{
//Get the system date in the correct final language layout, convert to
//a known language and modify the 2 digit year part to be 4 digit, and
//convert back to the correct language layout.
- ULONG nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
+ sal_uLong nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
SvNumberformat aFormat = const_cast<SvNumberformat &>
(*(pFormatter->GetEntry(nIndex)));
@@ -599,17 +599,17 @@ String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
}
short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
- USHORT &rLang, int nWhichDefault, bool bHijri)
+ sal_uInt16 &rLang, int nWhichDefault, bool bHijri)
{
bool bRTL = false;
if (pPlcxMan && !bVer67)
{
- const BYTE *pResult = pPlcxMan->HasCharSprm(0x85A);
+ const sal_uInt8 *pResult = pPlcxMan->HasCharSprm(0x85A);
if (pResult && *pResult)
bRTL = true;
}
RES_CHRATR eLang = bRTL ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
- const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< USHORT >(eLang));
+ const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< sal_uInt16 >(eLang));
OSL_ENSURE(pLang, "impossible");
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
@@ -639,8 +639,8 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
if (bHijri)
sParams.Insert(CREATE_CONST_ASC("[~hijri]"), 0);
- UINT16 nCheckPos = 0;
- INT16 nType = NUMBERFORMAT_DEFINED;
+ sal_uInt16 nCheckPos = 0;
+ sal_Int16 nType = NUMBERFORMAT_DEFINED;
rFormat = 0;
pFormatter->PutandConvertEntry(sParams, nCheckPos, nType, rFormat,
@@ -649,7 +649,7 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
return bHasTime ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE;
}
- ULONG nFmtIdx =
+ sal_uLong nFmtIdx =
sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri,
GetFib().lid);
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
@@ -1032,9 +1032,9 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
if (bNested)
return 0;
- USHORT n = ( aF.nId <= eMax ) ? aF.nId : static_cast< USHORT >(eMax); // alle > 91 werden 92
- USHORT nI = n / 32; // # des UINT32
- ULONG nMask = 1 << ( n % 32 ); // Maske fuer Bits
+ sal_uInt16 n = ( aF.nId <= eMax ) ? aF.nId : static_cast< sal_uInt16 >(eMax); // alle > 91 werden 92
+ sal_uInt16 nI = n / 32; // # des sal_uInt32
+ sal_uLong nMask = 1 << ( n % 32 ); // Maske fuer Bits
if( nFieldTagAlways[nI] & nMask ) // Flag: Tag it
return Read_F_Tag( &aF ); // Resultat nicht als Text
@@ -1221,7 +1221,7 @@ void SwWW8ImplReader::MakeTagString( String& rStr, const String& rOrg )
rStr.Erase( MAX_FIELDLEN - 4 );
}
-void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
+void SwWW8ImplReader::InsertTagField( const sal_uInt16 nId, const String& rTagText )
{
String aName( CREATE_CONST_ASC( "WwFieldTag" ) );
if( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_DO_ID ) ) // Nummer?
@@ -1239,7 +1239,7 @@ void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
SwFieldType* pFT = rDoc.InsertFldType(
SwSetExpFieldType( &rDoc, aName, nsSwGetSetExpType::GSE_STRING ) );
SwSetExpField aFld( (SwSetExpFieldType*)pFT, rTagText ); // SUB_INVISIBLE
- USHORT nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
+ sal_uInt16 nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
aFld.SetSubType(nSubType | nsSwGetSetExpType::GSE_STRING);
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
@@ -1385,7 +1385,7 @@ long SwWW8ImplReader::MapBookmarkVariables(const WW8FieldDesc* pF,
If there was no bookmark associated with this set field, then we create a
pseudo one and insert it in the document.
*/
- USHORT nIndex;
+ sal_uInt16 nIndex;
pPlcxMan->GetBook()->MapName(rOrigName);
String sName = pPlcxMan->GetBook()->GetBookmark(
pF->nSCode, pF->nSCode + pF->nLen, nIndex);
@@ -1595,9 +1595,9 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
{
- USHORT nSub=0;
+ sal_uInt16 nSub=0;
// RegInfoFormat, DefaultFormat fuer DocInfoFelder
- USHORT nReg = DI_SUB_AUTHOR;
+ sal_uInt16 nReg = DI_SUB_AUTHOR;
bool bDateTime = false;
if( 85 == pF->nId )
@@ -1674,11 +1674,11 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
= "REVISIONNUMBER";
static const sal_Char* aName54 // Spanish
= "SNUBBEL BUBBEL";
- static const USHORT nFldCnt = 5;
+ static const sal_uInt16 nFldCnt = 5;
// additional fields are to be coded soon! :-)
- static const USHORT nLangCnt = 4;
+ static const sal_uInt16 nLangCnt = 4;
static const sal_Char *aNameSet_26[nFldCnt][nLangCnt+1] =
{
{aName10, aName11, aName12, aName13, aName14},
@@ -1689,8 +1689,8 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
};
bool bFldFound= false;
- USHORT nFIdx;
- for(USHORT nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
+ sal_uInt16 nFIdx;
+ for(sal_uInt16 nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
{
for(nFIdx = 0; !bFldFound && (nFldCnt > nFIdx); ++nFIdx)
{
@@ -1762,7 +1762,7 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
if (bDateTime)
{
short nDT = GetTimeDatePara(rStr, nFormat, nLang, pF->nId);
@@ -1837,7 +1837,7 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
short nDT = GetTimeDatePara(rStr, nFormat, nLang, ww::eDATE, bHijri);
if( NUMBERFORMAT_UNDEFINED == nDT ) // no D/T-Formatstring
@@ -1904,7 +1904,7 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, String &rStr)
eF_ResT SwWW8ImplReader::Read_F_Anz( WW8FieldDesc* pF, String& rStr )
{ // SeitenZahl - Feld
- USHORT nSub = DS_PAGE;
+ sal_uInt16 nSub = DS_PAGE;
switch ( pF->nId ){
case 27: nSub = DS_WORD; break; // Wordzahl
case 28: nSub = DS_CHAR; break; // Zeichenzahl
@@ -1927,7 +1927,7 @@ eF_ResT SwWW8ImplReader::Read_F_CurPage( WW8FieldDesc*, String& rStr )
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
static const sal_Char aDelim[] = "-.:\x97\x96";
- BYTE nDelim = nPgChpDelim;
+ sal_uInt8 nDelim = nPgChpDelim;
if( nDelim > 4 )
nDelim = 0;
@@ -2590,9 +2590,9 @@ void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
{
- USHORT nJustificationCode=0;
+ sal_uInt16 nJustificationCode=0;
String sFontName;
- UINT32 nFontSize=0;
+ sal_uInt32 nFontSize=0;
String sRuby;
String sText;
long nRet;
@@ -2606,12 +2606,12 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
if( sTemp.EqualsIgnoreCaseAscii( "jc", 0, 2 ) )
{
sTemp.Erase(0,2);
- nJustificationCode = static_cast<USHORT>(sTemp.ToInt32());
+ nJustificationCode = static_cast<sal_uInt16>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "hps", 0, 3 ) )
{
sTemp.Erase(0,3);
- nFontSize= static_cast<UINT32>(sTemp.ToInt32());
+ nFontSize= static_cast<sal_uInt32>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "Font:", 0, 5 ) )
{
@@ -2689,7 +2689,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
SwFmtRuby aRuby(sRuby);
const SwCharFmt *pCharFmt=0;
//Make a guess at which of asian of western we should be setting
- USHORT nScript;
+ sal_uInt16 nScript;
if (pBreakIt->GetBreakIter().is())
nScript = pBreakIt->GetBreakIter()->getScriptType(sRuby, 0);
else
@@ -2777,7 +2777,7 @@ bool SwWW8ImplReader::AddExtraOutlinesAsExtraStyles(SwTOXBase& rBase)
bool bExtras = false;
//This is the case if the winword outline numbering is set while the
//writer one is not
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutline())
@@ -2812,7 +2812,7 @@ static void EnsureMaxLevelForTemplates(SwTOXBase& rBase)
//Word included.
if ((rBase.GetLevel() != MAXLEVEL) && (nsSwTOXElement::TOX_TEMPLATE & rBase.GetCreateType()))
{
- for (USHORT nI = MAXLEVEL; nI > 0; --nI)
+ for (sal_uInt16 nI = MAXLEVEL; nI > 0; --nI)
{
String sStyles(rBase.GetStyleNames(nI-1));
if (rBase.GetStyleNames(nI-1).Len())
@@ -2854,12 +2854,12 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
else while( STRING_NOTFOUND != nIndex )
{
xub_StrLen nOldIndex=nIndex;
- USHORT nLevel = static_cast<USHORT>(
+ sal_uInt16 nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ';', nIndex).ToInt32());
if( STRING_NOTFOUND == nIndex )
{
nIndex = nOldIndex;
- nLevel = static_cast<USHORT>(
+ nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ',', nIndex).ToInt32());
}
@@ -2892,9 +2892,9 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
}
}
-USHORT wwSectionManager::CurrentSectionColCount() const
+sal_uInt16 wwSectionManager::CurrentSectionColCount() const
{
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
if (!maSegments.empty())
nIndexCols = maSegments.back().maSep.ccolM1 + 1;
return nIndexCols;
@@ -2916,10 +2916,10 @@ bool wwSectionManager::WillHavePageDescHere(SwNodeIndex aIdx) const
return bRet;
}
-USHORT lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
+sal_uInt16 lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
{
// GetFormMax() returns level + 1, hence the -1
- USHORT nRet = rForm.GetFormMax()-1;
+ sal_uInt16 nRet = rForm.GetFormMax()-1;
// If the max of this type of TOC is greater than the max of a word
// possible toc, then clip to the word max
@@ -2957,9 +2957,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
}
- USHORT nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
+ sal_uInt16 nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
const SwTOXType* pType = rDoc.GetTOXType( eTox, 0 );
SwForm aOrigForm(eTox);
@@ -2968,7 +2968,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
switch( eTox ){
case TOX_INDEX:
{
- USHORT eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
+ sal_uInt16 eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
// TOX_OUTLINELEVEL setzen wir genau dann, wenn
// die Parameter \o in 1 bis 9 liegen
@@ -2990,7 +2990,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if( sParams.Len() )
{
nIndexCols =
- static_cast<USHORT>(sParams.ToInt32());
+ static_cast<sal_uInt16>(sParams.ToInt32());
}
}
}
@@ -3005,9 +3005,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -3073,8 +3073,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// die Parameter \o in 1 bis 9 liegen
// oder der Parameter \f existiert
// oder GARKEINE Switches Parameter angegeben sind.
- USHORT eCreateFrom = 0;
- USHORT nMaxLevel = 0;
+ sal_uInt16 eCreateFrom = 0;
+ sal_uInt16 nMaxLevel = 0;
long nRet;
_ReadFieldParams aReadParam( rStr );
while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
@@ -3093,7 +3093,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'o':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( !aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
nVal = lcl_GetMaxValidWordTOCLevel(aOrigForm);
if( nMaxLevel < nVal )
@@ -3106,7 +3106,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'l':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
{
if( nMaxLevel < nVal )
@@ -3130,9 +3130,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -3178,7 +3178,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
case 'n': // don't print page numbers
{
// read START and END param
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
if( !aReadParam.GetTokenSttFromTo( &nStart, &nEnd,
WW8ListManager::nMaxLevel ) )
{
@@ -3190,7 +3190,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (aForm.GetFormMax() <= nEnd)
nEnd = aForm.GetFormMax()-1;
for (
- USHORT nLevel = nStart; nLevel <= nEnd;
+ sal_uInt16 nLevel = nStart; nLevel <= nEnd;
++nLevel
)
{
@@ -3243,12 +3243,12 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (bIsHyperlink)
{
SwForm aForm(pBase->GetTOXForm());
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
SwFormToken aLinkStart(TOKEN_LINK_START);
SwFormToken aLinkEnd(TOKEN_LINK_END);
// -> #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aForm.GetPattern(nLevel);
@@ -3273,7 +3273,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
{
//If we would be created from outlines, either explictly or by default
//then see if we need extra styles added to the outlines
- USHORT eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
+ sal_uInt16 eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
if (eEffectivelyFrom & nsSwTOXElement::TOX_OUTLINELEVEL)
{
if (AddExtraOutlinesAsExtraStyles(*pBase))
@@ -3284,7 +3284,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// the entry correctly, but I currently have no clue how to obtain
// the tab stop position. It is _not_ set at the paragraph style.
SwForm* pForm = 0;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
const SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
@@ -3340,10 +3340,10 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
*/
SwForm aOldForm( pBase->GetTOXForm() );
SwForm aForm( eType );
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
// #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aOldForm.GetPattern(nLevel);
@@ -3382,7 +3382,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// #i21237# - propagate tab stops from paragraph styles
// used in TOX to patterns of the TOX
- pBase->AdjustTabStops(rDoc, TRUE);
+ pBase->AdjustTabStops(rDoc, sal_True);
// #i10028# - inserting a toc implicltly acts like a parabreak in word and writer
if (pPaM->GetPoint()->nContent.GetIndex())
@@ -3537,7 +3537,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
{
TOXTypes eTox = ( !bIdx ) ? TOX_CONTENT : TOX_INDEX; // Default
- USHORT nLevel = 1;
+ sal_uInt16 nLevel = 1;
xub_StrLen n;
String sFldTxt;
@@ -3573,7 +3573,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
&& sParams.GetChar( 0 ) > '0'
&& sParams.GetChar( 0 ) <= '9' )
{
- nLevel = (USHORT)sParams.ToInt32();
+ nLevel = (sal_uInt16)sParams.ToInt32();
}
}
break;
@@ -3621,7 +3621,7 @@ void SwWW8ImplReader::ImportTox( int nFldId, String aStr )
lcl_ImportTox(rDoc, *pPaM, aStr, bIdx);
}
-void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
+void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen )
{
//Meaningless in a style
if (pAktColl || !pPlcxMan)
@@ -3632,7 +3632,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
// Vorsicht: Bei Feldnamen mit Umlauten geht das MEMICMP nicht!
const static sal_Char *aFldNames[] = { "\x06""INHALT", "\x02""XE", // dt.
"\x02""TC" }; // us
- const static BYTE aFldId[] = { 9, 4, 9 };
+ const static sal_uInt8 aFldId[] = { 9, 4, 9 };
if( nLen < 0 )
{
@@ -3651,7 +3651,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
WW8_CP nStartCp = pPlcxMan->Where() + pPlcxMan->GetCpOfs();
String sFieldName;
- USHORT nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
+ sal_uInt16 nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
nChunk, eStructCharSet );
nStartCp+=nFieldLen;
@@ -3697,7 +3697,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
for( int i = 0; i < 3; i++ )
{
const sal_Char* pName = aFldNames[i];
- USHORT nNameLen = *pName++;
+ sal_uInt16 nNameLen = *pName++;
if( sFieldName.EqualsIgnoreCaseAscii( pName, nC, nNameLen ) )
{
ImportTox( aFldId[i], sFieldName.Copy( nC + nNameLen ) );
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 47d98c371a4b..484fb3020c67 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -122,11 +122,11 @@ using namespace nsHdFtFlags;
#define MM_200 1134 // WW-Default fuer u.Seitenrand: 2.0 cm
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty = 0, const WW8PLCFx_SEPX* pSep = 0);
-ColorData SwWW8ImplReader::GetCol(BYTE nIco)
+ColorData SwWW8ImplReader::GetCol(sal_uInt8 nIco)
{
static const ColorData eSwWW8ColA[] =
{
@@ -150,24 +150,24 @@ inline sal_uInt32 MSRoundTweak(sal_uInt32 x)
# ( ausser OLST, dass weiterhin ein normales Attribut ist )
#**************************************************************************/
-static short ReadSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static short ReadSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
short nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static USHORT ReadUSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static sal_uInt16 ReadUSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- USHORT nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt16 nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static BYTE ReadBSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, BYTE nDefaultVal )
+static sal_uInt8 ReadBSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, sal_uInt8 nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- BYTE nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt8 nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
return nVal;
}
@@ -282,7 +282,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//Get the size of word's default styles font
sal_uInt32 nCharWidth=240;
- for (USHORT nI = 0; nI < pStyles->GetCount(); ++nI)
+ for (sal_uInt16 nI = 0; nI < pStyles->GetCount(); ++nI)
{
if (pCollA[nI].bValid && pCollA[nI].pFmt &&
pCollA[nI].GetWWStyleId() == 0)
@@ -296,9 +296,9 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//dxtCharSpace
if (rSection.maSep.dxtCharSpace)
{
- UINT32 nCharSpace = rSection.maSep.dxtCharSpace;
+ sal_uInt32 nCharSpace = rSection.maSep.dxtCharSpace;
//main lives in top 20 bits, and is signed.
- INT32 nMain = (nCharSpace & 0xFFFFF000);
+ sal_Int32 nMain = (nCharSpace & 0xFFFFF000);
nMain/=0x1000;
nCharWidth += nMain*20;
@@ -317,7 +317,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
rFmt.SetFmtAttr(aGrid);
}
-void SwWW8ImplReader::Read_ParaBiDi(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_FRAMEDIR);
@@ -352,27 +352,27 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection,
aCol.SetLineWidth(1);
}
- aCol.Init(nCols, writer_cast<USHORT>(nColSpace),
- writer_cast<USHORT>(nNettoWidth));
+ aCol.Init(nCols, writer_cast<sal_uInt16>(nColSpace),
+ writer_cast<sal_uInt16>(nNettoWidth));
// sprmSFEvenlySpaced
if (!rSection.maSep.fEvenlySpaced)
{
aCol._SetOrtho(false);
int nIdx = 1;
- for (USHORT i = 0; i < nCols; i++ )
+ for (sal_uInt16 i = 0; i < nCols; i++ )
{
SwColumn* pCol = aCol.GetColumns()[i];
sal_Int32 nLeft = rSection.maSep.rgdxaColumnWidthSpacing[nIdx-1]/2;
sal_Int32 nRight = rSection.maSep.rgdxaColumnWidthSpacing[nIdx+1]/2;
sal_Int32 nWishWidth = rSection.maSep.rgdxaColumnWidthSpacing[nIdx]
+ nLeft + nRight;
- pCol->SetWishWidth(writer_cast<USHORT>(nWishWidth));
- pCol->SetLeft(writer_cast<USHORT>(nLeft));
- pCol->SetRight(writer_cast<USHORT>(nRight));
+ pCol->SetWishWidth(writer_cast<sal_uInt16>(nWishWidth));
+ pCol->SetLeft(writer_cast<sal_uInt16>(nLeft));
+ pCol->SetRight(writer_cast<sal_uInt16>(nRight));
nIdx += 2;
}
- aCol.SetWishWidth(writer_cast<USHORT>(nNettoWidth));
+ aCol.SetWishWidth(writer_cast<sal_uInt16>(nNettoWidth));
}
rFmt.SetFmtAttr(aCol);
return true;
@@ -437,7 +437,7 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
SetCols(rFmt, rSection, rSection.GetTextAreaWidth());
}
-USHORT lcl_MakeSafeNegativeSpacing(USHORT nIn)
+sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn)
{
if (nIn > SHRT_MAX)
nIn = 0;
@@ -460,11 +460,11 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (rSection.maSep.pgbOffsetFrom == 1)
{
- USHORT nDist;
+ sal_uInt16 nDist;
if (aBox.GetLeft())
{
nDist = aBox.GetDistance(BOX_LINE_LEFT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
aSizeArray[WW8_LEFT] =
aSizeArray[WW8_LEFT] - nDist + aBox.GetDistance(BOX_LINE_LEFT);
}
@@ -472,7 +472,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetRight())
{
nDist = aBox.GetDistance(BOX_LINE_RIGHT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
aSizeArray[WW8_RIGHT] =
aSizeArray[WW8_RIGHT] - nDist + aBox.GetDistance(BOX_LINE_RIGHT);
}
@@ -480,7 +480,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetTop())
{
nDist = aBox.GetDistance(BOX_LINE_TOP);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
aSizeArray[WW8_TOP] =
aSizeArray[WW8_TOP] - nDist + aBox.GetDistance(BOX_LINE_TOP);
}
@@ -488,7 +488,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetBottom())
{
nDist = aBox.GetDistance(BOX_LINE_BOTTOM);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
aSizeArray[WW8_BOT] =
aSizeArray[WW8_BOT] - nDist + aBox.GetDistance(BOX_LINE_BOTTOM);
}
@@ -497,20 +497,20 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
}
if (aBox.GetLeft())
- aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
+ aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
if (aBox.GetRight())
- aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
+ aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
if (aBox.GetTop())
- aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
+ aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
if (aBox.GetBottom())
{
//#i30088# and #i30074# - do a final sanity check on
//bottom value. Do not allow a resulting zero if bottom
//Border margin value was not originally zero.
if(aUL.GetLower() != 0)
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - aSizeArray[WW8_BOT])));
else
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
}
aSet.Put(aLR);
@@ -609,7 +609,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aHdUL.SetLower( writer_cast<USHORT>(rData.nSwHLo - cMinHdFtHeight) );
+ aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) );
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -618,7 +618,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// #i48832# - set correct spacing between header and body.
const SwTwips nHdLowerSpace( Abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo );
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace));
- aHdUL.SetLower( static_cast< USHORT >(nHdLowerSpace) );
+ aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) );
// <--
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -637,7 +637,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aFtUL.SetUpper( writer_cast<USHORT>(rData.nSwFUp - cMinHdFtHeight) );
+ aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) );
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -646,7 +646,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// #i48832# - set correct spacing between footer and body.
const SwTwips nFtUpperSpace( Abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp );
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace));
- aFtUL.SetUpper( static_cast< USHORT >(nFtUpperSpace) );
+ aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) );
// <--
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -655,8 +655,8 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
}
}
- SvxULSpaceItem aUL(writer_cast<USHORT>(rData.nSwUp),
- writer_cast<USHORT>(rData.nSwLo), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(rData.nSwUp),
+ writer_cast<sal_uInt16>(rData.nSwLo), RES_UL_SPACE);
rFmt.SetFmtAttr(aUL);
}
@@ -738,7 +738,7 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection)
aInfo.SetRestartEachPage(rSection.maSep.lnc == 0);
- aInfo.SetPosFromLeft(writer_cast<USHORT>(rSection.maSep.dxaLnn));
+ aInfo.SetPosFromLeft(writer_cast<sal_uInt16>(rSection.maSep.dxaLnn));
//Paint only for every n line
aInfo.SetCountBy(rSection.maSep.nLnnMod);
@@ -840,12 +840,12 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aLastSection = maSegments.back();
//Here
- USHORT nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
+ sal_uInt16 nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
//BEGIN read section values
wwSection aNewSection(*mrReader.pPaM->GetPoint());
- static const USHORT aVer2Ids0[] =
+ static const sal_uInt16 aVer2Ids0[] =
{
/*sprmSBkc*/ 117,
/*sprmSFTitlePage*/ 118,
@@ -855,7 +855,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 133
};
- static const USHORT aVer67Ids0[] =
+ static const sal_uInt16 aVer67Ids0[] =
{
/*sprmSBkc*/ 142,
/*sprmSFTitlePage*/ 143,
@@ -865,7 +865,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 158
};
- static const USHORT aVer8Ids0[] =
+ static const sal_uInt16 aVer8Ids0[] =
{
/*sprmSBkc*/ 0x3009,
/*sprmSFTitlePage*/ 0x300A,
@@ -875,7 +875,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 0x3019
};
- const USHORT* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
+ const sal_uInt16* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
if (!maSegments.empty())
{
@@ -885,7 +885,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
// 2 New page
// 3 Even page
// 4 Odd page
- if (const BYTE* pSprmBkc = pSep->HasSprm(pIds[0]))
+ if (const sal_uInt8* pSprmBkc = pSep->HasSprm(pIds[0]))
aNewSection.maSep.bkc = *pSprmBkc;
}
@@ -925,7 +925,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
for (int i = 0; i < nCols; ++i)
{
//sprmSDxaColWidth
- const BYTE* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), BYTE( i ) );
+ const sal_uInt8* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), sal_uInt8( i ) );
OSL_ENSURE( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
sal_uInt16 nWidth = pSW ? SVBT16ToShort(pSW + 1) : 1440;
@@ -935,7 +935,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (i < nCols-1)
{
//sprmSDxaColSpacing
- const BYTE* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), BYTE( i ) );
+ const sal_uInt8* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), sal_uInt8( i ) );
OSL_ENSURE( pSD, "+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt" );
if( pSD )
@@ -948,7 +948,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
}
- static const USHORT aVer2Ids1[] =
+ static const sal_uInt16 aVer2Ids1[] =
{
/*sprmSBOrientation*/ 137,
/*sprmSXaPage*/ 139,
@@ -962,7 +962,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 116
};
- static const USHORT aVer67Ids1[] =
+ static const sal_uInt16 aVer67Ids1[] =
{
/*sprmSBOrientation*/ 162,
/*sprmSXaPage*/ 164,
@@ -976,7 +976,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 141
};
- static const USHORT aVer8Ids1[] =
+ static const sal_uInt16 aVer8Ids1[] =
{
/*sprmSBOrientation*/ 0x301d,
/*sprmSXaPage*/ 0xB01F,
@@ -1002,8 +1002,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.yaPage = ReadUSprm(pSep, pIds[2], lLetterHeight);
// 3. LR-Raender
- static const USHORT nLef[] = { MM_250, 1800 };
- static const USHORT nRig[] = { MM_250, 1800 };
+ static const sal_uInt16 nLef[] = { MM_250, 1800 };
+ static const sal_uInt16 nRig[] = { MM_250, 1800 };
aNewSection.maSep.dxaLeft = ReadUSprm( pSep, pIds[3], nLef[nLIdx]);
aNewSection.maSep.dxaRight = ReadUSprm( pSep, pIds[4], nRig[nLIdx]);
@@ -1027,23 +1027,23 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (eVer >= ww::eWW6)
{
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
aNewSection.maSep.iHeadingPgn = *p;
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
aNewSection.maSep.cnsPgn = *p;
}
- if(const BYTE* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
+ if(const sal_uInt8* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
aNewSection.maSep.dmBinFirst = *pSprmSDmBinFirst;
- if (const BYTE* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
+ if (const sal_uInt8* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
aNewSection.maSep.dmBinOther = *pSprmSDmBinOther;
- static const USHORT nTop[] = { MM_250, 1440 };
- static const USHORT nBot[] = { MM_200, 1440 };
+ static const sal_uInt16 nTop[] = { MM_250, 1440 };
+ static const sal_uInt16 nBot[] = { MM_200, 1440 };
- static const USHORT aVer2Ids2[] =
+ static const sal_uInt16 aVer2Ids2[] =
{
/*sprmSDyaTop*/ 143,
/*sprmSDyaBottom*/ 144,
@@ -1055,7 +1055,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLnnMin*/ 135
};
- static const USHORT aVer67Ids2[] =
+ static const sal_uInt16 aVer67Ids2[] =
{
/*sprmSDyaTop*/ 168,
/*sprmSDyaBottom*/ 169,
@@ -1066,7 +1066,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDxaLnn*/ 155,
/*sprmSLnnMin*/ 160
};
- static const USHORT aVer8Ids2[] =
+ static const sal_uInt16 aVer8Ids2[] =
{
/*sprmSDyaTop*/ 0x9023,
/*sprmSDyaBottom*/ 0x9024,
@@ -1090,7 +1090,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.wTextFlow = ReadUSprm(pSep, 0x5033, 0);
aNewSection.maSep.clm = ReadUSprm( pSep, 0x5032, 0 );
aNewSection.maSep.dyaLinePitch = ReadUSprm(pSep, 0x9031, 360);
- if (const BYTE* pS = pSep->HasSprm(0x7030))
+ if (const sal_uInt8* pS = pSep->HasSprm(0x7030))
aNewSection.maSep.dxtCharSpace = SVBT32ToUInt32(pS);
//sprmSPgbProp
@@ -1104,16 +1104,16 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
// check if Line Numbering must be activated or resetted
- if (const BYTE* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
+ if (const sal_uInt8* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
aNewSection.maSep.nLnnMod = *pSprmSNLnnMod;
- if (const BYTE* pSprmSLnc = pSep->HasSprm( pIds[5] ))
+ if (const sal_uInt8* pSprmSLnc = pSep->HasSprm( pIds[5] ))
aNewSection.maSep.lnc = *pSprmSLnc;
- if (const BYTE* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
+ if (const sal_uInt8* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
aNewSection.maSep.dxaLnn = SVBT16ToShort( pSprmSDxaLnn );
- if (const BYTE* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
+ if (const sal_uInt8* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
aNewSection.maSep.lnnMin = *pSprmSLnnMin;
if (eVer <= ww::eWW7)
@@ -1164,7 +1164,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode )
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode )
{
// copy first header content section
if (nCode & WW8_HEADER_FIRST)
@@ -1208,7 +1208,7 @@ void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
// Hilfsroutinen fuer Grafiken und Apos und Tabellen
//------------------------------------------------------
-static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
+static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const sal_uInt8* pS)
{
if( pS )
{
@@ -1221,19 +1221,19 @@ static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
return 0 != pS;
}
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty, const WW8PLCFx_SEPX* pSep)
{
-//returns a BYTE filled with a bit for each position that had a sprm
+//returns a sal_uInt8 filled with a bit for each position that had a sprm
//setting that border
- BYTE nBorder = false;
+ sal_uInt8 nBorder = false;
if( pSep )
{
if( !bVer67 )
{
- BYTE* pSprm[4];
+ sal_uInt8* pSprm[4];
// sprmSBrcTop, sprmSBrcLeft, sprmSBrcBottom, sprmSBrcRight
if( pSep->Find4Sprms( 0x702B, 0x702C, 0x702D, 0x702E,
@@ -1247,12 +1247,12 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
else
{
- static const USHORT aVer67Ids[5] = { 38, 39, 40, 41, 42 };
+ static const sal_uInt16 aVer67Ids[5] = { 38, 39, 40, 41, 42 };
- static const USHORT aVer8Ids[5] =
+ static const sal_uInt16 aVer8Ids[5] =
{ 0x6424, 0x6425, 0x6426, 0x6427, 0x6428 };
- const USHORT* pIds = bVer67 ? aVer67Ids : aVer8Ids;
+ const sal_uInt16* pIds = bVer67 ? aVer67Ids : aVer8Ids;
if( pPap )
{
@@ -1273,8 +1273,8 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
return nBorder;
}
-void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
WW8_BordersSO::eBorderCode eCodeIdx;
@@ -1461,9 +1461,9 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCo
}
void Set1Border(bool bVer67, SvxBoxItem &rBox, const WW8_BRC& rBor,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
- BYTE nCol;
+ sal_uInt8 nCol;
short nSpace, nIdx;
short nLineThickness = rBor.DetermineBorderProperties(bVer67,&nSpace,&nCol,
&nIdx);
@@ -1518,10 +1518,10 @@ bool WW8_BRC::IsZeroed(bool bVer67) const
}
bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc,
- short *pSizeArray, BYTE nSetBorders) const
+ short *pSizeArray, sal_uInt8 nSetBorders) const
{
bool bChange = false;
- static const USHORT aIdArr[ 10 ] =
+ static const sal_uInt16 aIdArr[ 10 ] =
{
WW8_TOP, BOX_LINE_TOP,
WW8_LEFT, BOX_LINE_LEFT,
@@ -1639,19 +1639,19 @@ static void FlySecur1(short& rSize, const bool bBorder)
rSize = nMin;
}
-inline bool SetValSprm( INT16* pVar, WW8PLCFx_Cp_FKP* pPap, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
{
- const BYTE* pS = pPap->HasSprm( nId );
+ const sal_uInt8* pS = pPap->HasSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
-inline bool SetValSprm( INT16* pVar, const WW8RStyle* pStyle, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
{
- const BYTE* pS = pStyle->HasParaSprm( nId );
+ const sal_uInt8* pS = pStyle->HasParaSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
@@ -1709,12 +1709,12 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
}
// Read fuer normalen Text
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if( bVer67 )
{
SetValSprm( &nSp26, pPap, 26 ); // X-Position //sprmPDxaAbs
@@ -1764,7 +1764,7 @@ void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
nSp29 = nOrigSp29;
}
-void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
+void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
{
WW8PLCFMan* pPlcxMan = pIo->pPlcxMan;
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
@@ -1778,14 +1778,14 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
break; // (*pPap)++ geht bei FastSave schief
// -> bei FastSave kein Test auf Grafik-APO
SvStream* pIoStrm = pIo->pStrm;
- ULONG nPos = pIoStrm->Tell();
+ sal_uLong nPos = pIoStrm->Tell();
WW8PLCFxSave1 aSave;
pPlcxMan->GetPap()->Save( aSave );
bGrafApo = false;
do{ // Block zum rausspringen
- BYTE nTxt[2];
+ sal_uInt8 nTxt[2];
pIoStrm->Read( nTxt, 2 ); // lies Text
if( nTxt[0] != 0x01 || nTxt[1] != 0x0d )// nur Grafik + CR ?
@@ -1795,7 +1795,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// In APO ?
//sprmPPc
- const BYTE* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
+ const sal_uInt8* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
// Nein -> Grafik-Apo
if( !pS ){
@@ -1805,7 +1805,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
ww::WordVersion eVer = pIo->GetFib().GetFIBVersion();
WW8FlyPara *pNowStyleApo=0;
- USHORT nColl = pPap->GetIstd();
+ sal_uInt16 nColl = pPap->GetIstd();
ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
while (eSti != ww::stiNil && 0 == (pNowStyleApo = pIo->pCollA[nColl].pWWFly))
{
@@ -1829,12 +1829,12 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// Read fuer Apo-Defs in Styledefs
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8RStyle* pStyle)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if (bVer67)
{
SetValSprm( &nSp26, pStyle, 26 ); // X-Position
@@ -1907,8 +1907,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy )
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy )
{
(void) rPaM;
(void) nPgLeft;
@@ -2060,18 +2060,18 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// the left and right border distances are different.
// no adjustments possible, if frame has automatic width.
// determine left border distance
- INT16 nLeBorderMgn( 0L );
+ sal_Int16 nLeBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeBorderMgn);
nLeBorderMgn = nLeBorderMgn + nTemp;
}
// determine right border distance
- INT16 nRiBorderMgn( 0L );
+ sal_Int16 nRiBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
&nRiBorderMgn);
nRiBorderMgn = nRiBorderMgn + nTemp;
}
@@ -2125,8 +2125,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
Word has a curious bug where the offset stored do not take into
account the internal distance from the corner both
*/
- INT16 nLeLMgn = 0;
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nLeLMgn = 0;
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeLMgn);
nLeLMgn = nLeLMgn + nTemp;
@@ -2144,7 +2144,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// convert "<X> from top page text area" to
// "<X + page top margin> from page"
eVRel = text::RelOrientation::PAGE_FRAME;
- nYPos = static_cast< INT16 >( nYPos + nWWPgTop );
+ nYPos = static_cast< sal_Int16 >( nYPos + nWWPgTop );
}
FlySecur1( nWidth, rWW.bBorderLines ); // passen Raender ?
@@ -2192,7 +2192,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
//we no longer need to hack around the header/footer problems
SwFmtSurround aSurround(pFS->eSurround);
if ( pFS->eSurround == SURROUND_IDEAL )
- aSurround.SetAnchorOnly( TRUE );
+ aSurround.SetAnchorOnly( sal_True );
Put( aSurround );
short aSizeArray[5]={0};
@@ -2279,8 +2279,8 @@ WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk)
{
//Close any open character properties and duplicate them inside the
//first table cell
- USHORT nCnt = static_cast< USHORT >(pCtrlStck->Count());
- for (USHORT i=0; i < nCnt; i++)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(pCtrlStck->Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
const SwFltStackEntry* pEntry = (*pCtrlStck)[ i ];
if(pEntry->bLocked)
@@ -2425,7 +2425,7 @@ bool SwWW8ImplReader::IsDropCap()
WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
if (pPap)
{
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPap->HasSprm(46);
else
@@ -2739,7 +2739,7 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
}
// holt Attribut aus der FmtColl / Stack / Doc
-const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
+const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich )
{
const SfxPoolItem* pRet = 0;
if (pAktColl)
@@ -2784,7 +2784,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
# Spezial WW - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Special(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{
@@ -2795,7 +2795,7 @@ void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
}
// Read_Obj wird fuer fObj und fuer fOle2 benutzt !
-void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Obj(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
bObj = false;
@@ -2815,7 +2815,7 @@ void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
}
}
-void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_PicLoc(sal_uInt16 , const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -2832,13 +2832,13 @@ void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (pAktColl && (0 < nLen))
{
if (SwWW8StyInf* pSI = GetStyle(nAktColl))
{
- pSI->nOutlineLevel = static_cast< BYTE >(
+ pSI->nOutlineLevel = static_cast< sal_uInt8 >(
( (1 <= pSI->GetWWStyleId()) && (9 >= pSI->GetWWStyleId()) )
? pSI->GetWWStyleId()-1
: (pData ? *pData : 0) );
@@ -2846,7 +2846,7 @@ void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( !bIgnoreText )
{
@@ -2881,7 +2881,7 @@ void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
}
}
-SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
+SwWW8StyInf *SwWW8ImplReader::GetStyle(sal_uInt16 nColl) const
{
return nColl < nColls ? &pCollA[nColl] : 0;
}
@@ -2892,14 +2892,14 @@ SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
// Read_BoldUsw fuer Italic, Bold, Kapitaelchen, Versalien, durchgestrichen,
// Contour und Shadow
-void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
const int nContigiousWestern = 8;
const int nWestern = nContigiousWestern + 1;
const int nEastern = 2;
const int nCTL = 2;
const int nIds = nWestern + nEastern + nCTL;
- static const USHORT nEndIds[ nIds ] =
+ static const sal_uInt16 nEndIds[ nIds ] =
{
RES_CHRATR_WEIGHT, RES_CHRATR_POSTURE,
RES_CHRATR_CROSSEDOUT, RES_CHRATR_CONTOUR,
@@ -2915,7 +2915,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
- BYTE nI;
+ sal_uInt8 nI;
// die Attribut-Nr fuer "doppelt durchgestrichen" tanzt aus der Reihe
if (0x2A53 == nId)
nI = nContigiousWestern; // The out of sequence western id
@@ -2923,11 +2923,11 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
{
// The contigious western ids
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 60);
+ nI = static_cast< sal_uInt8 >(nId - 60);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 85);
+ nI = static_cast< sal_uInt8 >(nId - 85);
else
- nI = static_cast< BYTE >(nId - 0x0835);
+ nI = static_cast< sal_uInt8 >(nId - 0x0835);
}
sal_uInt16 nMask = 1 << nI;
@@ -2955,7 +2955,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan && eVersion > ww::eWW2)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -2996,7 +2996,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SetToggleAttr( nI, bOn );
}
-void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
+void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8*, short nLen)
{
if (nLen > 0)
bBidi = true;
@@ -3005,22 +3005,22 @@ void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
}
// Read_BoldUsw for BiDi Italic, Bold
-void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
+void SwWW8ImplReader::Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8* pData,
short nLen)
{
- static const USHORT nEndIds[2] =
+ static const sal_uInt16 nEndIds[2] =
{
RES_CHRATR_CTL_WEIGHT, RES_CHRATR_CTL_POSTURE,
};
- BYTE nI;
+ sal_uInt8 nI;
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 80);
+ nI = static_cast< sal_uInt8 >(nId - 80);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 111);
+ nI = static_cast< sal_uInt8 >(nId - 111);
else
- nI = static_cast< BYTE >(nId - 0x085C);
+ nI = static_cast< sal_uInt8 >(nId - 0x085C);
OSL_ENSURE(nI <= 1, "not happening");
if (nI > 1)
@@ -3038,7 +3038,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -3075,7 +3075,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SetToggleBiDiAttr(nI, bOn);
}
-void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn)
{
switch (nAttrId)
{
@@ -3100,7 +3100,7 @@ void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
@@ -3162,11 +3162,11 @@ void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3178,11 +3178,11 @@ void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3194,7 +3194,7 @@ void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuper( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_ESCAPEMENT );
@@ -3202,7 +3202,7 @@ void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
}
short nEs;
- BYTE nProp;
+ sal_uInt8 nProp;
switch( *pData )
{
case 1:
@@ -3264,7 +3264,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
bool bIsGraphicPlacementHack = false;
- USHORT nPos;
+ sal_uInt16 nPos;
if (pCtrlStck->GetFmtStackAttr(RES_CHRATR_ESCAPEMENT, &nPos))
{
SwPaM aRegion(*pPaM->GetPoint());
@@ -3286,7 +3286,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
return bIsGraphicPlacementHack;
}
-void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -3299,13 +3299,13 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
// Font-Position in HalfPoints
short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *pData ) : SVBT16ToShort( pData );
- INT32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
+ sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
const SvxFontHeightItem* pF
= (const SvxFontHeightItem*)GetFmtAttr(RES_CHRATR_FONTSIZE);
OSL_ENSURE(pF, "Expected to have the fontheight available here");
// #i59022: Check ensure nHeight != 0. Div by zero otherwise.
- INT32 nHeight = 240;
+ sal_Int32 nHeight = 240;
if (pF != NULL && pF->GetHeight() != 0)
nHeight = pF->GetHeight();
nPos2 /= nHeight; // ... nun in % ( gerundet )
@@ -3317,7 +3317,7 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
NewAttr( aEs );
}
-void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short nLen )
{
FontUnderline eUnderline = UNDERLINE_NONE;
bool bWordLine = false;
@@ -3334,7 +3334,7 @@ void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
// erst mal ggfs. *bold* einschalten!
if( bAlsoBold )
{
- BYTE nOn = 1;
+ sal_uInt8 nOn = 1;
Read_BoldUsw( 0x0835, &nOn, nLen );
eUnderline = UNDERLINE_SINGLE;
}
@@ -3385,7 +3385,7 @@ NoBracket 78 CA 06 - 02 00 00 02 34 52
<> 78 CA 06 - 02 03 00 02 34 52
{} 78 CA 06 - 02 04 00 02 34 52
*/
-void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
+void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData,
short nLen )
{
if( nLen < 0 ) // close the tag
@@ -3421,7 +3421,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
}
}
-void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtColor( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0x6870))
@@ -3431,7 +3431,7 @@ void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0;
@@ -3453,7 +3453,7 @@ sal_uInt32 wwUtility::BGRToRGB(sal_uInt32 nColor)
return nColor;
}
-void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
@@ -3466,7 +3466,7 @@ void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
}
}
-bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
+bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
String& rName, FontPitch& rePitch, CharSet& reCharSet )
{
// Die Defines, aus denen diese Tabellen erzeugt werden, stehen in windows.h
@@ -3505,7 +3505,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
}
// pF->ff : Family
- BYTE b = pF->ff;
+ sal_uInt8 b = pF->ff;
// make sure Font Family Code is set correctly
// at least for the most important fonts
@@ -3546,7 +3546,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
sFontName12, sFontName13
};
- for( USHORT n = 0; n < FONTNAMETAB_SZ; n++ )
+ for( sal_uInt16 n = 0; n < FONTNAMETAB_SZ; n++ )
{
const sal_Char* pCmp = aFontNameTab[ n ];
xub_StrLen nLen = *pCmp++;
@@ -3564,8 +3564,8 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
return true;
}
-bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
- USHORT nWhich)
+bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
+ sal_uInt16 nWhich)
{
FontFamily eFamily;
String aName;
@@ -3660,7 +3660,7 @@ void SwWW8ImplReader::ResetCJKCharSetVars()
maFontSrcCJKCharSets.pop();
}
-void SwWW8ImplReader::openFont(USHORT nFCode, USHORT nId)
+void SwWW8ImplReader::openFont(sal_uInt16 nFCode, sal_uInt16 nId)
{
if (SetNewFontAttr(nFCode, true, nId) && pAktColl && pStyles)
{
@@ -3674,7 +3674,7 @@ void SwWW8ImplReader::openFont(USHORT nFCode, USHORT nId)
}
}
-void SwWW8ImplReader::closeFont(USHORT nId)
+void SwWW8ImplReader::closeFont(sal_uInt16 nId)
{
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
if (nId == RES_CHRATR_CJK_FONT)
@@ -3686,7 +3686,7 @@ void SwWW8ImplReader::closeFont(USHORT nId)
/*
Font ein oder ausschalten:
*/
-void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontCode( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (!bSymbol) // falls bSymbol, gilt der am Symbol
{ // (siehe sprmCSymbol) gesetzte Font !
@@ -3723,7 +3723,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
else
{
- USHORT nFCode = SVBT16ToShort( pData ); // Font-Nummer
+ sal_uInt16 nFCode = SVBT16ToShort( pData ); // Font-Nummer
openFont(nFCode, nId);
if (eVersion <= ww::eWW6)
{
@@ -3734,7 +3734,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontSize( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3765,7 +3765,7 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
else
{
// Font-Size in half points e.g. 10 = 1440 / ( 72 * 2 )
- USHORT nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
+ sal_uInt16 nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
nFSize*= 10;
SvxFontHeightItem aSz( nFSize, 100, nId );
@@ -3797,14 +3797,14 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
-void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{ // Ende des Attributes
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
return;
}
- BYTE nfChsDiff = SVBT8ToByte( pData );
+ sal_uInt8 nfChsDiff = SVBT8ToByte( pData );
if( nfChsDiff )
eHardCharSet = rtl_getTextEncodingFromWindowsCharset( *(pData + 1) );
@@ -3812,7 +3812,7 @@ void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
}
-void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Language( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3838,7 +3838,7 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
else
{
- USHORT nLang = SVBT16ToShort( pData ); // Language-Id
+ sal_uInt16 nLang = SVBT16ToShort( pData ); // Language-Id
NewAttr(SvxLanguageItem((const LanguageType)nLang, nId));
}
}
@@ -3846,14 +3846,14 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
/*
Einschalten des Zeichen-Styles:
*/
-void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_TXTATR_CHARFMT );
nCharFmt = -1;
return;
}
- USHORT nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
+ sal_uInt16 nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
if( nId >= nColls || !pCollA[nId].pFmt // ungueltige Id ?
|| pCollA[nId].bColl ) // oder Para-Style ?
@@ -3867,17 +3867,17 @@ void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
/*
enger oder weiter als normal:
*/
-void SwWW8ImplReader::Read_Kern( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_KERNING );
return;
}
- INT16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
+ sal_Int16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
NewAttr( SvxKerningItem( nKern, RES_CHRATR_KERNING ) );
}
-void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
+void SwWW8ImplReader::Read_FontKern( sal_uInt16, const sal_uInt8* , short nLen )
{
if( nLen < 0 ) // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_AUTOKERN );
@@ -3885,7 +3885,7 @@ void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
NewAttr(SvxAutoKernItem(true, RES_CHRATR_AUTOKERN));
}
-void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0xCA71))
@@ -3911,7 +3911,7 @@ void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -3933,7 +3933,7 @@ void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen <= 0 )
{
@@ -3946,7 +3946,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
}
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0; // Auto -> Black
@@ -3961,7 +3961,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
# Absatz - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 ) // Ende des Attributes
{
@@ -3980,7 +3980,7 @@ void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
}
// Sprm 16, 17
-void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (nLen < 0) // End of the Attributes
{
@@ -4006,7 +4006,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
SwNumRule * pNumRule = pTxtNode->GetNumRule();
if( pNumRule )
{
- BYTE nLvl = static_cast< BYTE >(pTxtNode->GetActualListLevel());
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(pTxtNode->GetActualListLevel());
const SwNumFmt* pFmt = pNumRule->GetNumFmt( nLvl );
if ( pFmt && pFmt->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
@@ -4077,7 +4077,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
*/
if (pPlcxMan && pCollA[nAktColl].bHasBrokenWW6List)
{
- const BYTE *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
+ const sal_uInt8 *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
if (pIsZeroed && *pIsZeroed == 0)
{
const SvxLRSpaceItem &rLR =
@@ -4108,7 +4108,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
}
// Sprm 20
-void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// Kommentear siehe Read_UL()
if (bStyNormal && bWWBugNormal)
@@ -4145,7 +4145,7 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// bei proportional betraegt er min( 0cm, FontSize*(nFach-1) ) sowohl "vor"
// wie auch "nach"
- USHORT nSpaceTw = 0;
+ sal_uInt16 nSpaceTw = 0;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
@@ -4155,15 +4155,15 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// nach Absprache mit AMA ist die Begrenzung unsinnig
if( n>200 ) n = 200; // SW_UI-Maximum
- aLSpc.SetPropLineSpace( (const BYTE)n );
+ aLSpc.SetPropLineSpace( (const sal_uInt8)n );
const SvxFontHeightItem* pH = (const SvxFontHeightItem*)
GetFmtAttr( RES_CHRATR_FONTSIZE );
- nSpaceTw = (USHORT)( n * pH->GetHeight() / 100 );
+ nSpaceTw = (sal_uInt16)( n * pH->GetHeight() / 100 );
}
else // Fixed / Minimum
{
// bei negativen Space ist der Abstand exakt, sonst minimum
- nSpaceTw = (USHORT)nSpace;
+ nSpaceTw = (sal_uInt16)nSpace;
aLSpc.SetLineHeight( nSpaceTw );
aLSpc.GetLineSpaceRule() = eLnSpc;
}
@@ -4181,7 +4181,7 @@ sal_uInt16 SwWW8ImplReader::GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing)
return 280; //Seems to be always 14points in this case
}
-void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_DontAddEqual(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
return;
@@ -4190,7 +4190,7 @@ void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
maTracer.Log(sw::log::eDontAddSpaceForEqualStyles);
}
-void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4217,7 +4217,7 @@ void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
}
}
-void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoAfter(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4245,7 +4245,7 @@ void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
}
// Sprm 21, 22
-void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
// Nun eine Umpopelung eines WW-Fehlers: Bei nProduct == 0c03d wird
// faelschlicherweise ein DyaAfter 240 ( delta y abstand after, amn.d.?b.)
@@ -4290,7 +4290,7 @@ void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
NewAttr( aUL );
}
-void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
nIdctHint = 0;
@@ -4298,7 +4298,7 @@ void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
nIdctHint = *pData;
}
-void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4337,7 +4337,7 @@ void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
bool SwWW8ImplReader::IsRightToLeft()
{
bool bRTL = false;
- const BYTE *pDir =
+ const sal_uInt8 *pDir =
pPlcxMan ? pPlcxMan->GetPapPLCF()->HasSprm(0x2441) : 0;
if (pDir)
bRTL = *pDir ? true : false;
@@ -4351,7 +4351,7 @@ bool SwWW8ImplReader::IsRightToLeft()
return bRTL;
}
-void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_RTLJustify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4394,7 +4394,7 @@ void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoolItem( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -4423,7 +4423,7 @@ void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_EMPHASIS_MARK );
@@ -4434,7 +4434,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
//there is use it, if there is not fall back to the currently set one.
//Only the cjk language setting seems to matter to word, the western
//one is ignored
- const BYTE *pLang =
+ const sal_uInt8 *pLang =
pPlcxMan ? pPlcxMan->GetChpPLCF()->HasSprm(0x486E) : 0;
if (pLang)
@@ -4484,7 +4484,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_SCALEW );
@@ -4498,7 +4498,7 @@ void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_RELIEF );
@@ -4525,7 +4525,7 @@ void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_BLINK);
@@ -4553,7 +4553,7 @@ void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen
SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
{
- BYTE b = rSHD.GetFore();
+ sal_uInt8 b = rSHD.GetFore();
OSL_ENSURE(b < 17, "ww8: colour out of range");
if (b >= 17)
b = 0;
@@ -4574,7 +4574,7 @@ SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
{
- static const ULONG eMSGrayScale[] =
+ static const sal_uLong eMSGrayScale[] =
{
// Nul-Brush
0, // 0
@@ -4661,7 +4661,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
if( nIndex >= SAL_N_ELEMENTS(eMSGrayScale))
nIndex = 0;
- ULONG nWW8BrushStyle = eMSGrayScale[nIndex];
+ sal_uLong nWW8BrushStyle = eMSGrayScale[nIndex];
switch (nWW8BrushStyle)
{
@@ -4687,7 +4687,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
}
}
-void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (!bVer67 && pPlcxMan && pPlcxMan->GetPapPLCF()->HasSprm(0xC64D))
return;
@@ -4713,7 +4713,7 @@ void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if (nLen <= 0)
{
@@ -4735,7 +4735,7 @@ void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
}
}
-sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
+sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData,
bool
#if OSL_DEBUG_LEVEL > 1
bVer67
@@ -4761,7 +4761,7 @@ sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
return aShade.aColor.GetColor();
}
-void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
+void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8* , short nLen)
{
if( nLen < 0 )
{
@@ -4780,7 +4780,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
bHasBorder = true;
WW8_BRC5 aBrcs; // Top, Left, Bottom, Right, Between
- BYTE nBorder;
+ sal_uInt8 nBorder;
if( pAktColl )
nBorder = ::lcl_ReadBorders(bVer67, aBrcs, 0, pStyles);
@@ -4816,17 +4816,17 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
maTracer.Log(sw::log::eBorderDistOutside);
if ((nBorder & WW8_LEFT)==WW8_LEFT) {
- aBox.SetDistance( (USHORT)aInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Left(), BOX_LINE_LEFT );
}
if ((nBorder & WW8_TOP)==WW8_TOP) {
- aBox.SetDistance( (USHORT)aInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Top(), BOX_LINE_TOP );
}
if ((nBorder & WW8_RIGHT)==WW8_RIGHT) {
- aBox.SetDistance( (USHORT)aInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Right(), BOX_LINE_RIGHT );
}
if ((nBorder & WW8_BOT)==WW8_BOT) {
- aBox.SetDistance( (USHORT)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
}
NewAttr( aBox );
@@ -4839,7 +4839,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
}
}
-void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// set Hyphenation flag
if( nLen <= 0 )
@@ -4862,7 +4862,7 @@ void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -4871,7 +4871,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
else
{
- BYTE nL = ( *pData & 1 ) ? 2 : 0;
+ sal_uInt8 nL = ( *pData & 1 ) ? 2 : 0;
NewAttr( SvxWidowsItem( nL, RES_PARATR_WIDOWS ) ); // Aus -> nLines = 0
NewAttr( SvxOrphansItem( nL, RES_PARATR_ORPHANS ) );
@@ -4882,7 +4882,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
+void SwWW8ImplReader::Read_UsePgsuSettings(sal_uInt16,const sal_uInt8* pData,short nLen)
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SNAPTOGRID);
@@ -4895,7 +4895,7 @@ void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
}
}
-void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_VERTALIGN);
@@ -4928,7 +4928,7 @@ void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SPLIT );
@@ -4936,7 +4936,7 @@ void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtSplitItem( ( *pData & 1 ) == 0, RES_PARATR_SPLIT ) );
}
-void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_KEEP );
@@ -4944,7 +4944,7 @@ void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtKeepItem( ( *pData & 1 ) != 0 , RES_KEEP) );
}
-void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BREAK );
@@ -4953,7 +4953,7 @@ void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
( *pData & 1 ) ? SVX_BREAK_PAGE_BEFORE : SVX_BREAK_NONE, RES_BREAK ) );
}
-void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
+void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short )
{
if (pAktColl) // only for Styledef, sonst anders geloest
{
@@ -4969,7 +4969,7 @@ void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
bool SwWW8ImplReader::ParseTabPos(WW8_TablePos *pTabPos, WW8PLCFx_Cp_FKP* pPap)
{
bool bRet = false;
- const BYTE *pRes=0;
+ const sal_uInt8 *pRes=0;
memset(pTabPos, 0, sizeof(WW8_TablePos));
if (0 != (pRes = pPap->HasSprm(0x360D)))
{
@@ -5016,7 +5016,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
if( pRes->nSprmId < 280 )
{
- BYTE nIdx = static_cast< BYTE >(pRes->nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(pRes->nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
return (this->*aWwSprmTab[nIdx])(pRes);
@@ -5027,7 +5027,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
return 0;
}
-void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
+void SwWW8ImplReader::EndExtSprm(sal_uInt16 nSprmId)
{
typedef sal_uInt16 (SwWW8ImplReader:: *FNReadRecordExt)();
@@ -5040,7 +5040,7 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
/* 4 (260) */ 0 // Annotation
};
- BYTE nIdx = static_cast< BYTE >(nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
(this->*aWwSprmTab[nIdx])();
@@ -5051,11 +5051,11 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
#**************************************************************************/
// Funktion zum Einlesen von Sprms. Par1: SprmId
-typedef void (SwWW8ImplReader:: *FNReadRecord)( USHORT, const BYTE*, short );
+typedef void (SwWW8ImplReader:: *FNReadRecord)( sal_uInt16, const sal_uInt8*, short );
struct SprmReadInfo
{
- USHORT nId;
+ sal_uInt16 nId;
FNReadRecord pReadFnc;
};
@@ -6182,7 +6182,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
// Hilfsroutinen : SPRM finden
//-----------------------------------------
-const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
+const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(sal_uInt16 nId) const
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
const wwSprmDispatcher *pDispatcher;
@@ -6209,7 +6209,7 @@ const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
//-----------------------------------------
// Hilfsroutinen : SPRMs
//-----------------------------------------
-void SwWW8ImplReader::EndSprm( USHORT nId )
+void SwWW8ImplReader::EndSprm( sal_uInt16 nId )
{
if( ( nId > 255 ) && ( nId < 0x0800 ) ) return;
@@ -6219,7 +6219,7 @@ void SwWW8ImplReader::EndSprm( USHORT nId )
(this->*rSprm.pReadFnc)( nId, 0, -1 );
}
-short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
+short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
{
if (!nId)
nId = mpSprmParser->GetSprmId(pPos);
@@ -6230,8 +6230,8 @@ short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
const SprmReadInfo& rSprm = GetSprmReadInfo(nId);
- USHORT nFixedLen = mpSprmParser->DistanceToData(nId);
- USHORT nL = mpSprmParser->GetSprmSize(nId, pPos);
+ sal_uInt16 nFixedLen = mpSprmParser->DistanceToData(nId);
+ sal_uInt16 nL = mpSprmParser->GetSprmSize(nId, pPos);
if (rSprm.pReadFnc)
(this->*rSprm.pReadFnc)(nId, pPos + nFixedLen, nL - nFixedLen);
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 553a05543514..eaaa1e0b609a 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -850,45 +850,45 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
//-end
-inline BYTE Get_Byte( BYTE *& p )
+inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
{
- BYTE n = SVBT8ToByte( *(SVBT8*)p );
+ sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p );
p += 1;
return n;
}
-inline USHORT Get_UShort( BYTE *& p )
+inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
{
- USHORT n = SVBT16ToShort( *(SVBT16*)p );
+ sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p );
p += 2;
return n;
}
-inline short Get_Short( BYTE *& p )
+inline short Get_Short( sal_uInt8 *& p )
{
return Get_UShort(p);
}
-inline ULONG Get_ULong( BYTE *& p )
+inline sal_uLong Get_ULong( sal_uInt8 *& p )
{
- ULONG n = SVBT32ToUInt32( *(SVBT32*)p );
+ sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p );
p += 4;
return n;
}
-inline long Get_Long( BYTE *& p )
+inline long Get_Long( sal_uInt8 *& p )
{
return Get_ULong(p);
}
-WW8SprmIter::WW8SprmIter(const BYTE* pSprms_, long nLen_,
+WW8SprmIter::WW8SprmIter(const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rParser)
: mrSprmParser(rParser), pSprms( pSprms_), nRemLen( nLen_)
{
UpdateMyMembers();
}
-void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_)
+void WW8SprmIter::SetSprms(const sal_uInt8* pSprms_, long nLen_)
{
pSprms = pSprms_;
nRemLen = nLen_;
@@ -899,7 +899,7 @@ void WW8SprmIter::advance()
{
if (nRemLen > 0 )
{
- USHORT nSize = nAktSize;
+ sal_uInt16 nSize = nAktSize;
if (nSize > nRemLen)
nSize = nRemLen;
pSprms += nSize;
@@ -925,7 +925,7 @@ void WW8SprmIter::UpdateMyMembers()
}
}
-const BYTE* WW8SprmIter::FindSprm(USHORT nId)
+const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
{
while(GetSprms())
{
@@ -952,12 +952,12 @@ WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(ww::WordVersion eVersion,
{
}
-ULONG WW8PLCFx_PCDAttrs::GetIdx() const
+sal_uLong WW8PLCFx_PCDAttrs::GetIdx() const
{
return 0;
}
-void WW8PLCFx_PCDAttrs::SetIdx( ULONG )
+void WW8PLCFx_PCDAttrs::SetIdx( sal_uLong )
{
}
@@ -990,11 +990,11 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
return;
}
- UINT16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
+ sal_uInt16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
if ( nPrm & 1 )
{
// PRM Variant 2
- UINT16 nSprmIdx = nPrm >> 1;
+ sal_uInt16 nSprmIdx = nPrm >> 1;
if( nSprmIdx >= nGrpprls )
{
@@ -1004,7 +1004,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
p->nSprmsLen = 0;
return;
}
- const BYTE* pSprms = pGrpprls[ nSprmIdx ];
+ const sal_uInt8* pSprms = pGrpprls[ nSprmIdx ];
p->nSprmsLen = SVBT16ToShort( pSprms ); // Length
pSprms += 2;
@@ -1019,8 +1019,8 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
if (IsSevenMinus(GetFIBVersion()))
{
- aShortSprm[0] = (BYTE)( ( nPrm & 0xfe) >> 1 );
- aShortSprm[1] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nPrm & 0xfe) >> 1 );
+ aShortSprm[1] = (sal_uInt8)( nPrm >> 8 );
p->nSprmsLen = ( nPrm ) ? 2 : 0; // Laenge
// store Postion of internal mini storage in Data Pointer
@@ -1030,7 +1030,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
{
p->pMemPos = 0;
p->nSprmsLen = 0;
- BYTE nSprmListIdx = (BYTE)((nPrm & 0xfe) >> 1);
+ sal_uInt8 nSprmListIdx = (sal_uInt8)((nPrm & 0xfe) >> 1);
if( nSprmListIdx )
{
// process Sprm Id Matching as explained in MS Doku
@@ -1039,7 +1039,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
// see file: s62f39.htm
//
// Since isprm is 7 bits, rgsprmPrm can hold 0x80 entries.
- static const USHORT aSprmId[0x80] =
+ static const sal_uInt16 aSprmId[0x80] =
{
// sprmNoop, sprmNoop, sprmNoop, sprmNoop
0x0000,0x0000,0x0000,0x0000,
@@ -1111,14 +1111,14 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
};
// find real Sprm Id:
- USHORT nSprmId = aSprmId[ nSprmListIdx ];
+ sal_uInt16 nSprmId = aSprmId[ nSprmListIdx ];
if( nSprmId )
{
// move Sprm Id and Sprm Param to internal mini storage:
- aShortSprm[0] = (BYTE)( ( nSprmId & 0x00ff) );
- aShortSprm[1] = (BYTE)( ( nSprmId & 0xff00) >> 8 );
- aShortSprm[2] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nSprmId & 0x00ff) );
+ aShortSprm[1] = (sal_uInt8)( ( nSprmId & 0xff00) >> 8 );
+ aShortSprm[2] = (sal_uInt8)( nPrm >> 8 );
// store Sprm Length in member:
p->nSprmsLen = ( nPrm ) ? 3 : 0;
@@ -1148,17 +1148,17 @@ WW8PLCFx_PCD::~WW8PLCFx_PCD()
delete pPcdI;
}
-ULONG WW8PLCFx_PCD::GetIMax() const
+sal_uLong WW8PLCFx_PCD::GetIMax() const
{
return pPcdI ? pPcdI->GetIMax() : 0;
}
-ULONG WW8PLCFx_PCD::GetIdx() const
+sal_uLong WW8PLCFx_PCD::GetIdx() const
{
return pPcdI ? pPcdI->GetIdx() : 0;
}
-void WW8PLCFx_PCD::SetIdx( ULONG nIdx )
+void WW8PLCFx_PCD::SetIdx( sal_uLong nIdx )
{
if (pPcdI)
pPcdI->SetIdx( nIdx );
@@ -1246,11 +1246,11 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
return WW8_CP_MAX;
}
bool bIsUnicode = false;
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( !bVer67 )
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart, bIsUnicode );
- INT32 nUnicodeFactor = bIsUnicode ? 2 : 1;
+ sal_Int32 nUnicodeFactor = bIsUnicode ? 2 : 1;
if( nStartPos < nFcStart )
nStartPos = nFcStart;
@@ -1266,7 +1266,7 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
//-----------------------------------------
short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
- BYTE *pCol, short *pIdx) const
+ sal_uInt8 *pCol, short *pIdx) const
{
/*
Word does not factor the width of the border into the width/height
@@ -1275,12 +1275,12 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
our calculations
*/
short nMSTotalWidth;
- BYTE nCol;
+ sal_uInt8 nCol;
short nIdx,nSpace;
if( bVer67 )
{
- UINT16 aBrc1 = SVBT16ToShort(aBits1);
- nCol = static_cast< BYTE >((aBrc1 >> 6) & 0x1f); // aBor.ico
+ sal_uInt16 aBrc1 = SVBT16ToShort(aBits1);
+ nCol = static_cast< sal_uInt8 >((aBrc1 >> 6) & 0x1f); // aBor.ico
nSpace = (aBrc1 & 0xF800) >> 11;
nMSTotalWidth = aBrc1 & 0x07;
@@ -1495,7 +1495,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
if( pPieceIter ) // Complex File ?
{
bool bIsUnicode = false;
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
for (pPieceIter->SetIdx(0);
pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++)
@@ -1507,7 +1507,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
OSL_ENSURE( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
break;
}
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( 8 <= pWw8Fib->nVersion )
{
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart,
@@ -1518,7 +1518,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
if (pWw8Fib->fExtChar)
bIsUnicode=true;
}
- INT32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
+ sal_Int32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
/*
If this cp is inside this piece, or its the last piece and we are
@@ -1634,10 +1634,10 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
return 0;
WW8_FC nClxPos = pWwF->fcClx;
- INT32 nClxLen = pWwF->lcbClx;
- INT32 nLeft = nClxLen;
- INT16 nGrpprl = 0;
- BYTE clxt;
+ sal_Int32 nClxLen = pWwF->lcbClx;
+ sal_Int32 nLeft = nClxLen;
+ sal_Int16 nGrpprl = 0;
+ sal_uInt8 clxt;
pStr->Seek( nClxPos );
while( 1 ) // Zaehle Zahl der Grpprls
@@ -1648,7 +1648,7 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
break; // PLCFfpcd gefunden
if( 1 == clxt ) // clxtGrpprl ?
nGrpprl++;
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
@@ -1657,24 +1657,24 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
}
pStr->Seek( nClxPos );
nLeft = nClxLen;
- pPieceGrpprls = new BYTE*[nGrpprl + 1];
- memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(BYTE *) );
+ pPieceGrpprls = new sal_uInt8*[nGrpprl + 1];
+ memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(sal_uInt8 *) );
nPieceGrpprls = nGrpprl;
- INT16 nAktGrpprl = 0; // lies Grpprls ein
+ sal_Int16 nAktGrpprl = 0; // lies Grpprls ein
while( 1 )
{
*pStr >> clxt;
nLeft--;
if( 2 == clxt) // PLCFfpcd ?
break; // PLCFfpcd gefunden
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
return 0; // schiefgegangen
if( 1 == clxt ) // clxtGrpprl ?
{
- BYTE* p = new BYTE[nLen+2]; // alloziere
+ sal_uInt8* p = new sal_uInt8[nLen+2]; // alloziere
ShortToSVBT16(nLen, p); // trage Laenge ein
pStr->Read( p+2, nLen ); // lies grpprl
pPieceGrpprls[nAktGrpprl++] = p; // trage in Array ein
@@ -1700,7 +1700,7 @@ void WW8ScannerBase::DeletePieceTable()
{
if( pPieceGrpprls )
{
- for( BYTE** p = pPieceGrpprls; *p; p++ )
+ for( sal_uInt8** p = pPieceGrpprls; *p; p++ )
delete[] (*p);
delete[] pPieceGrpprls;
pPieceGrpprls = 0;
@@ -1817,7 +1817,7 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt,
// Extended ATRD
if (pWwFib->fcAtrdExtra && pWwFib->lcbAtrdExtra)
{
- pExtendedAtrds = new BYTE[pWwFib->lcbAtrdExtra];
+ pExtendedAtrds = new sal_uInt8[pWwFib->lcbAtrdExtra];
long nOldPos = pTblSt->Tell();
pTblSt->Seek(pWwFib->fcAtrdExtra);
pTblSt->Read(pExtendedAtrds, pWwFib->lcbAtrdExtra);
@@ -1894,14 +1894,14 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
return true; // Bei Fehler nicht abbrechen
if( !rPLCF.Get( nP, pData ) )
return false;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1909,7 +1909,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
return false;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 )
{
// Field Separator ?
@@ -1918,7 +1918,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
if( !rPLCF.Get( nP, pData ) )
return false;
- while ((((BYTE*)pData)[0] & 0x1f ) == 0x13)
+ while ((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13)
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1934,7 +1934,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
{
void* pData;
- ULONG nOldIdx = rPLCF.GetIdx();
+ sal_uLong nOldIdx = rPLCF.GetIdx();
rF.nLen = rF.nId = rF.nOpt = rF.bCodeNest = rF.bResNest = 0;
@@ -1943,10 +1943,10 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
goto Err;
- rF.nId = ((BYTE*)pData)[1];
+ rF.nId = ((sal_uInt8*)pData)[1];
if( !rPLCF.Get( rF.nLCode, pData ) )
goto Err;
@@ -1955,7 +1955,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rF.nSCode++; // ohne Marken
rF.nLCode -= rF.nSCode; // Pos zu Laenge
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1964,13 +1964,13 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
goto Err;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
rPLCF++;
if( !rPLCF.Get( rF.nLRes, pData ) )
goto Err;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1989,11 +1989,11 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
}
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) == 0x15 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x15 )
{
// Field Ende ?
// INDEX-Fld hat Bit7 gesetzt!?!
- rF.nOpt = ((BYTE*)pData)[1]; // Ja -> Flags uebernehmen
+ rF.nOpt = ((sal_uInt8*)pData)[1]; // Ja -> Flags uebernehmen
}else{
rF.nId = 0; // Nein -> Feld ungueltig
}
@@ -2016,7 +2016,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
bool bAtEndSeekRel1)
{
ByteString aByteStr;
- UINT8 b;
+ sal_uInt8 b;
rStrm >> b;
if (b)
@@ -2024,7 +2024,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
// Alloc methode automatically sets Zero at the end
sal_Char* pByteData = aByteStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( pByteData, b );
+ sal_uLong nWasRead = rStrm.Read( pByteData, b );
if( nWasRead != b )
aByteStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
}
@@ -2036,9 +2036,9 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
return String( aByteStr, eEnc );
}
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
{
- UINT16 b(0);
+ sal_uInt16 b;
if( nChars )
b = nChars;
@@ -2051,16 +2051,16 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
// Alloc methode automatically sets Zero at the end
sal_Unicode* pData = aStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
- if( nWasRead != static_cast<ULONG>(b*2) )
+ sal_uLong nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
+ if( nWasRead != static_cast<sal_uLong>(b*2) )
{
- b = static_cast<UINT16>(nWasRead / 2);
+ b = static_cast<sal_uInt16>(nWasRead / 2);
aStr.ReleaseBufferAccess( b );
pData = aStr.GetBufferAccess();
}
#ifdef OSL_BIGENDIAN
- ULONG n;
+ sal_uLong n;
sal_Unicode *pWork;
for( n = 0, pWork = pData; n < b; ++n, ++pWork )
*pWork = SWAPSHORT( *pWork );
@@ -2073,9 +2073,9 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
return aStr;
}
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm)
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm)
{
- ULONG nWasRead=0;
+ sal_uLong nWasRead=0;
if (nLen)
{
nWasRead = rStrm.Read( rStr.AllocBuffer( nLen ), nLen);
@@ -2115,12 +2115,12 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
nLen = USHRT_MAX - 1;
if( bIsUnicode )
- rStr.Append(WW8Read_xstz(rStrm, (USHORT)nLen, false));
+ rStr.Append(WW8Read_xstz(rStrm, (sal_uInt16)nLen, false));
else
{
// Alloc method automatically sets Zero at the end
ByteString aByteStr;
- SafeReadString(aByteStr,(USHORT)nLen,rStrm);
+ SafeReadString(aByteStr,(sal_uInt16)nLen,rStrm);
rStr += String( aByteStr, eEnc );
}
nTotalRead += nLen;
@@ -2144,7 +2144,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
// Pointer auf Pos- u. Struct-Array
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ];
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
long nOldPos = pSt->Tell();
@@ -2156,7 +2156,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
nIdx = 0;
#endif // OSL_BIGENDIAN
if( nStruct ) // Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
else
pPLCF_Contents = 0; // kein Inhalt
if( nStartPos >= 0 )
@@ -2259,7 +2259,7 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
// Ctor fuer *andere* als Fkps
// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos ) : pPLCF_PosArray(0), nIdx(0), nStru(nStruct)
{
OSL_ENSURE( nPLCF, "WW8PLCF: nPLCF ist Null!" );
@@ -2277,8 +2277,8 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
// != 0, dann wird ein unvollstaendiger PLCF vervollstaendigt. Das ist bei
// WW6 bei Resourcenmangel und bei WordPad (W95) immer noetig. Bei nStartPos
// < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
nStru(nStruct)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2292,7 +2292,7 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
SeekPos( nStartPos );
}
-void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
+void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF )
{
bool failure = false;
@@ -2318,7 +2318,7 @@ void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
nIdx = 0;
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
pSt->Seek( nOldPos );
@@ -2333,12 +2333,12 @@ void WW8PLCF::MakeFailedPLCF()
{
nIMax = 0;
delete[] pPLCF_PosArray;
- pPLCF_PosArray = new INT32[2];
+ pPLCF_PosArray = new sal_Int32[2];
pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
-void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
+void WW8PLCF::GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN )
{
OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
@@ -2352,9 +2352,9 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
{
size_t nSiz = 6 * nIMax + 4;
size_t nElems = ( nSiz + 3 ) / 4;
- pPLCF_PosArray = new INT32[ nElems ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ nElems ]; // Pointer auf Pos-Array
- for (INT32 i = 0; i < ncpN && !pSt->GetError(); ++i)
+ for (sal_Int32 i = 0; i < ncpN && !pSt->GetError(); ++i)
{
// Baue FC-Eintraege
pSt->Seek( ( nPN + i ) << 9 ); // erster FC-Eintrag jedes Fkp
@@ -2371,7 +2371,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
sal_Size nLastFkpPos = ( ( nPN + nIMax - 1 ) << 9 );
pSt->Seek( nLastFkpPos + 511 ); // Anz. Fkp-Eintraege des letzten Fkp
- BYTE nb;
+ sal_uInt8 nb;
*pSt >> nb;
pSt->Seek( nLastFkpPos + nb * 4 ); // letzer FC-Eintrag des letzten Fkp
@@ -2385,10 +2385,10 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
if (!failure)
{
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
- BYTE* p = pPLCF_Contents;
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
+ sal_uInt8* p = pPLCF_Contents;
- for (INT32 i = 0; i < ncpN; ++i) // Baue PNs
+ for (sal_Int32 i = 0; i < ncpN; ++i) // Baue PNs
{
ShortToSVBT16(static_cast<sal_uInt16>(nPN + i), p);
p+=2;
@@ -2416,8 +2416,8 @@ bool WW8PLCF::SeekPos(WW8_CP nPos)
if( (1 > nIdx) || (nP < pPLCF_PosArray[ nIdx-1 ]) )
nIdx = 1;
- INT32 nI = nIdx ? nIdx : 1;
- INT32 nEnd = nIMax;
+ sal_Int32 nI = nIdx ? nIdx : 1;
+ sal_Int32 nEnd = nIMax;
for(int n = (1==nIdx ? 1 : 2); n; --n )
{
@@ -2466,7 +2466,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
:nStru( nStruct )
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
long nOldPos = pSt->Tell();
@@ -2478,7 +2478,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
pSt->Seek( nOldPos );
}
@@ -2537,7 +2537,7 @@ bool WW8PLCFpcd_Iter::Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const
return true;
}
-INT32 WW8PLCFpcd_Iter::Where() const
+sal_Int32 WW8PLCFpcd_Iter::Where() const
{
if ( nIdx >= rPLCF.nIMax )
return SAL_MAX_INT32;
@@ -2552,12 +2552,12 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
return (mnFC < rSecond.mnFC);
}
-bool IsReplaceAllSprm(USHORT nSpId)
+bool IsReplaceAllSprm(sal_uInt16 nSpId)
{
return (0x6645 == nSpId || 0x6646 == nSpId);
}
-bool IsExpandableSprm(USHORT nSpId)
+bool IsExpandableSprm(sal_uInt16 nSpId)
{
return 0x646B == nSpId;
}
@@ -2595,7 +2595,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
if (aEntry.mnLen && eVersion == ww::eWW2)
{
Word2CHPX aChpx = ReadWord2Chpx(*pSt, nFilePos + nOfs + 1, static_cast< sal_uInt8 >(aEntry.mnLen));
- std::vector<BYTE> aSprms = ChpxToSprms(aChpx);
+ std::vector<sal_uInt8> aSprms = ChpxToSprms(aChpx);
aEntry.mnLen = static_cast< sal_uInt16 >(aSprms.size());
if (aEntry.mnLen)
{
@@ -2648,7 +2648,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
aEntry.mnLen=0; //Too short, ignore
}
- USHORT nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
+ sal_uInt16 nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
/*
If we replace then we throw away the old data, if we
@@ -2661,9 +2661,9 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
sal_uInt16 nOrigLen = bExpand ? aEntry.mnLen : 0;
sal_uInt8 *pOrigData = bExpand ? aEntry.mpData : 0;
- UINT32 nCurr = pDataSt->Tell();
+ sal_uInt32 nCurr = pDataSt->Tell();
- UINT32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
+ sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
pDataSt->Seek(nPos);
*pDataSt >> aEntry.mnLen;
aEntry.mpData =
@@ -2693,7 +2693,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
#ifdef DEBUGSPRMREADER
{
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
while(aIter.GetSprms())
@@ -2798,7 +2798,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SeekPos(WW8_FC nFc)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
const
{
rLen = 0;
@@ -2812,7 +2812,7 @@ BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen
rStart = maEntries[mnIdx].mnFC;
rEnd = maEntries[mnIdx + 1].mnFC;
- BYTE* pSprms = GetLenAndIStdAndSprms( rLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( rLen );
return pSprms;
}
@@ -2826,32 +2826,32 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx(sal_uInt8 nI)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
{
rLen = maEntries[mnIdx].mnLen;
return maEntries[mnIdx].mpData;
}
-const BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId )
{
if (mnIdx >= mnIMax)
return 0;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
return aIter.FindSprm(nId);
}
-bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(USHORT nId,
- std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult)
{
if (mnIdx >= mnIMax)
return false;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
@@ -2884,12 +2884,12 @@ long WW8PLCFx::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen )
}
// ...Idx2: Default: ignorieren
-ULONG WW8PLCFx::GetIdx2() const
+sal_uLong WW8PLCFx::GetIdx2() const
{
return 0;
}
-void WW8PLCFx::SetIdx2(ULONG )
+void WW8PLCFx::SetIdx2(sal_uLong )
{
}
@@ -2948,7 +2948,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
return false; // PLCF fertig abgearbeitet
}
(*pPLCF)++;
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
@@ -3008,15 +3008,15 @@ WW8PLCFx_Fc_FKP::~WW8PLCFx_Fc_FKP()
delete pPCDAttrs;
}
-ULONG WW8PLCFx_Fc_FKP::GetIdx() const
+sal_uLong WW8PLCFx_Fc_FKP::GetIdx() const
{
- ULONG u = pPLCF->GetIdx() << 8;
+ sal_uLong u = pPLCF->GetIdx() << 8;
if (pFkp)
u |= pFkp->GetIdx();
return u;
}
-void WW8PLCFx_Fc_FKP::SetIdx( ULONG nIdx )
+void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
{
if( !( nIdx & 0xffffff00L ) )
{
@@ -3048,7 +3048,7 @@ bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
void* pPage;
if( pFkp && pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ) )
{
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
if (nPo != pFkp->GetFilePos())
pFkp = 0;
@@ -3073,7 +3073,7 @@ WW8_FC WW8PLCFx_Fc_FKP::Where()
return Where(); // am einfachsten rekursiv
}
-BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
{
rLen = 0; // Default
rStart = rEnd = WW8_FC_MAX;
@@ -3084,7 +3084,7 @@ BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& r
return 0;
}
- BYTE* pPos = pFkp->Get( rStart, rEnd, rLen );
+ sal_uInt8* pPos = pFkp->Get( rStart, rEnd, rLen );
if( rStart == WW8_FC_MAX ) //Not found
return 0;
return pPos;
@@ -3105,7 +3105,7 @@ WW8PLCFx& WW8PLCFx_Fc_FKP::operator ++( int )
return *this;
}
-USHORT WW8PLCFx_Fc_FKP::GetIstd() const
+sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const
{
return pFkp ? pFkp->GetIstd() : 0xFFFF;
}
@@ -3127,7 +3127,7 @@ void WW8PLCFx_Fc_FKP::GetPCDSprms( WW8PLCFxDesc& rDesc )
}
}
-const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::HasSprm( sal_uInt16 nId )
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3139,7 +3139,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return 0;
}
- const BYTE* pRes = pFkp->HasSprm( nId );
+ const sal_uInt8* pRes = pFkp->HasSprm( nId );
if( !pRes )
{
@@ -3157,7 +3157,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return pRes;
}
-bool WW8PLCFx_Fc_FKP::HasSprm(USHORT nId, std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult)
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3229,17 +3229,17 @@ void WW8PLCFx_Cp_FKP::ResetAttrStartEnd()
bLineEnd = false;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIMax() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIMax() const
{
return pPcd ? pPcd->GetIMax() : 0;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIdx() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIdx() const
{
return pPcd ? pPcd->GetIdx() : 0;
}
-void WW8PLCFx_Cp_FKP::SetPCDIdx( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetPCDIdx( sal_uLong nIdx )
{
if( pPcd )
pPcd->SetIdx( nIdx );
@@ -3291,7 +3291,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
*/
if( !pPieceIter )
return;
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
bool bOk = pPieceIter->SeekPos(nOrigCp);
pPieceIter->SetIdx( nOldPos );
if (!bOk)
@@ -3318,7 +3318,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
//We set the piece iterator to the piece that contains the
//character, now we have the correct piece for this character
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
p->nStartPos = nOrigCp;
pPieceIter->SeekPos( p->nStartPos);
@@ -3396,7 +3396,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
break;
}
bIsUnicode = false;
- INT32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
+ sal_Int32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
if (IsEightPlus(GetFIBVersion()))
{
@@ -3480,7 +3480,7 @@ WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTblSt,
GetFIBVersion() <= ww::eWW2 ? 6 : 12, nStartCp)
: 0;
- pSprms = new BYTE[nArrMax]; // maximum length
+ pSprms = new sal_uInt8[nArrMax]; // maximum length
}
WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
@@ -3489,12 +3489,12 @@ WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
delete[] pSprms;
}
-ULONG WW8PLCFx_SEPX::GetIdx() const
+sal_uLong WW8PLCFx_SEPX::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_SEPX::SetIdx( ULONG nIdx )
+void WW8PLCFx_SEPX::SetIdx( sal_uLong nIdx )
{
if( pPLCF ) pPLCF->SetIdx( nIdx );
}
@@ -3524,7 +3524,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
}
else
{
- sal_uInt32 nPo = SVBT32ToUInt32( (BYTE*)pData+2 );
+ sal_uInt32 nPo = SVBT32ToUInt32( (sal_uInt8*)pData+2 );
if (nPo == 0xFFFFFFFF)
{
p->nStartPos = p->nEndPos = WW8_CP_MAX; // Sepx empty
@@ -3538,7 +3538,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
// read len
if (GetFIBVersion() <= ww::eWW2) // eWW6 ?, docs say yes, but...
{
- BYTE nSiz(0);
+ sal_uInt8 nSiz(0);
*pStrm >> nSiz;
nSprmSiz = nSiz;
}
@@ -3549,7 +3549,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
{ // passt nicht
delete[] pSprms;
nArrMax = nSprmSiz; // Hole mehr Speicher
- pSprms = new BYTE[nArrMax];
+ pSprms = new sal_uInt8[nArrMax];
}
pStrm->Read( pSprms, nSprmSiz ); // read Sprms
@@ -3566,15 +3566,15 @@ WW8PLCFx& WW8PLCFx_SEPX::operator ++( int )
return *this;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const
{
return HasSprm( nId, pSprms, nSprmSiz);
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const
{
- const BYTE *pRet = 0;
+ const sal_uInt8 *pRet = 0;
if (pPLCF)
{
WW8SprmIter aIter(pOtherSprms, nOtherSprmSiz, maSprmParser);
@@ -3583,8 +3583,8 @@ const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
return pRet;
}
-bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4) const
+bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4) const
{
if( !pPLCF )
return 0;
@@ -3595,12 +3595,12 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
p3 = 0;
p4 = 0;
- BYTE* pSp = pSprms;
- USHORT i=0;
+ sal_uInt8* pSp = pSprms;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
bool bOk = true;
if( nAktId == nId1 )
p1 = pSp + maSprmParser.DistanceToData(nId1);
@@ -3614,33 +3614,33 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
bOk = false;
bFound |= bOk;
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
return bFound;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, BYTE n2nd ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
{
if( !pPLCF )
return 0;
- BYTE* pSp = pSprms;
+ sal_uInt8* pSp = pSprms;
- USHORT i=0;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
if (nAktId == nId)
{
- BYTE *pRet = pSp + maSprmParser.DistanceToData(nId);
+ sal_uInt8 *pRet = pSp + maSprmParser.DistanceToData(nId);
if (*pRet == n2nd)
return pRet;
}
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
@@ -3667,7 +3667,7 @@ WW8PLCFx_SubDoc::~WW8PLCFx_SubDoc()
delete pTxt;
}
-ULONG WW8PLCFx_SubDoc::GetIdx() const
+sal_uLong WW8PLCFx_SubDoc::GetIdx() const
{
// Wahrscheinlich pTxt... nicht noetig
if( pRef )
@@ -3675,7 +3675,7 @@ ULONG WW8PLCFx_SubDoc::GetIdx() const
return 0;
}
-void WW8PLCFx_SubDoc::SetIdx( ULONG nIdx )
+void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx )
{
if( pRef )
{
@@ -3705,7 +3705,7 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
if (!pRef)
return;
- ULONG nNr = pRef->GetIdx();
+ sal_uLong nNr = pRef->GetIdx();
void *pData;
WW8_CP nFoo;
@@ -3792,12 +3792,12 @@ WW8PLCFx_FLD::~WW8PLCFx_FLD()
delete pPLCF;
}
-ULONG WW8PLCFx_FLD::GetIdx() const
+sal_uLong WW8PLCFx_FLD::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_FLD::SetIdx( ULONG nIdx )
+void WW8PLCFx_FLD::SetIdx( sal_uLong nIdx )
{
if( pPLCF )
pPLCF->SetIdx( nIdx );
@@ -3819,7 +3819,7 @@ bool WW8PLCFx_FLD::StartPosIsFieldStart()
sal_Int32 nTest;
if (
(!pPLCF || !pPLCF->Get(nTest, pData) ||
- ((((BYTE*)pData)[0] & 0x1f) != 0x13))
+ ((((sal_uInt8*)pData)[0] & 0x1f) != 0x13))
)
return false;
return true;
@@ -3837,7 +3837,7 @@ bool WW8PLCFx_FLD::EndPosIsFieldEnd()
void* pData;
sal_Int32 nTest;
- if ( pPLCF->Get(nTest, pData) && ((((BYTE*)pData)[0] & 0x1f) == 0x15) )
+ if ( pPLCF->Get(nTest, pData) && ((((sal_uInt8*)pData)[0] & 0x1f) == 0x15) )
bRet = true;
pPLCF->SetIdx(n);
@@ -3911,23 +3911,23 @@ bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
//-----------------------------------------
/* to be optimized like this: */
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
std::vector<ww::bytes>* pExtraArray, ::std::vector<String>* pValueArray)
{
if(nLen==0) // Handle Empty STTBF
return;
- ULONG nOldPos = rStrm.Tell();
+ sal_uLong nOldPos = rStrm.Tell();
rStrm.Seek( nStart );
- UINT16 nLen2;
+ sal_uInt16 nLen2;
rStrm >> nLen2; // bVer67: total length of structure
// bVer8 : count of strings
if( bVer8 )
{
- UINT16 nStrings;
+ sal_uInt16 nStrings;
bool bUnicode = (0xFFFF == nLen2);
if( bUnicode )
rStrm >> nStrings;
@@ -3936,13 +3936,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
rStrm >> nExtraLen;
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
rArray.push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3970,13 +3970,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
// read the value of the document variables, if requested.
if (pValueArray)
{
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
pValueArray->push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3987,7 +3987,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
}
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
if( nLen2 != nLen )
{
OSL_ENSURE( nLen2 == nLen, "Fib length and read length are different" );
@@ -3995,9 +3995,9 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
nLen = USHRT_MAX;
else if (nLen < 2 )
nLen = 2;
- nLen2 = static_cast<UINT16>(nLen);
+ nLen2 = static_cast<sal_uInt16>(nLen);
}
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
for( nLen2 -= 2; nRead < nLen2; )
{
rStrm >> nBChar; ++nRead;
@@ -4071,28 +4071,28 @@ WW8PLCFx_Book::~WW8PLCFx_Book()
delete pBook[0];
}
-ULONG WW8PLCFx_Book::GetIdx() const
+sal_uLong WW8PLCFx_Book::GetIdx() const
{
return nIMax ? pBook[0]->GetIdx() : 0;
}
-void WW8PLCFx_Book::SetIdx( ULONG nI )
+void WW8PLCFx_Book::SetIdx( sal_uLong nI )
{
if( nIMax )
pBook[0]->SetIdx( nI );
}
-ULONG WW8PLCFx_Book::GetIdx2() const
+sal_uLong WW8PLCFx_Book::GetIdx2() const
{
return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0;
}
-void WW8PLCFx_Book::SetIdx2( ULONG nI )
+void WW8PLCFx_Book::SetIdx2( sal_uLong nI )
{
if( nIMax )
{
pBook[1]->SetIdx( nI & 0x7fffffff );
- nIsEnd = (USHORT)( ( nI >> 31 ) & 1 ); // 0 oder 1
+ nIsEnd = (sal_uInt16)( ( nI >> 31 ) & 1 ); // 0 oder 1
}
}
@@ -4147,8 +4147,8 @@ WW8PLCFx& WW8PLCFx_Book::operator ++( int )
{
(*pBook[nIsEnd])++;
- ULONG l0 = pBook[0]->Where();
- ULONG l1 = pBook[1]->Where();
+ sal_uLong l0 = pBook[0]->Where();
+ sal_uLong l1 = pBook[1]->Where();
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -4173,13 +4173,13 @@ long WW8PLCFx_Book::GetLen() const
OSL_ENSURE( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
+ sal_uInt16 nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
long nNum = pBook[1]->GetPos( nEndIdx );
nNum -= nStartPos;
return nNum;
}
-void WW8PLCFx_Book::SetStatus(USHORT nIndex, eBookStatus eStat )
+void WW8PLCFx_Book::SetStatus(sal_uInt16 nIndex, eBookStatus eStat )
{
OSL_ENSURE(nIndex < nIMax, "set status of non existing bookmark!");
pStatus[nIndex] = (eBookStatus)( pStatus[nIndex] | eStat );
@@ -4209,17 +4209,17 @@ long WW8PLCFx_Book::GetHandle() const
}
}
-String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, USHORT &nIndex)
+String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
{
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
if( pBook[0] && pBook[1] )
{
WW8_CP nStartAkt, nEndAkt;
do
{
void* p;
- USHORT nEndIdx;
+ sal_uInt16 nEndIdx;
if( pBook[0]->GetData( i, nStartAkt, p ) && p )
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -4253,9 +4253,9 @@ String WW8PLCFx_Book::GetUniqueBookmarkName(String &suggestedName)
if (aRet.CompareTo(s)==0) {
int len=aRet.Len();
int p=len-1;
- while(p>0 && aRet.GetChar(static_cast<USHORT>(p))>='0' && aRet.GetChar(static_cast<USHORT>(p))<='9')
+ while(p>0 && aRet.GetChar(static_cast<sal_uInt16>(p))>='0' && aRet.GetChar(static_cast<sal_uInt16>(p))<='9')
p--;
- aRet=String(aRet, 0, static_cast<USHORT>(p+1));
+ aRet=String(aRet, 0, static_cast<sal_uInt16>(p+1));
aRet += String::CreateFromInt32( nBookmarkId++ );
i=0; // start search from beginning
} else {
@@ -4271,7 +4271,7 @@ bool WW8PLCFx_Book::MapName(String& rName)
return false;
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
do
{
if (COMPARE_EQUAL == rName.CompareIgnoreCaseToAscii(aBookNames[i]))
@@ -4395,9 +4395,9 @@ void WW8PLCFMan::GetNewNoSprms( WW8PLCFxDesc& rDesc )
rDesc.nOrigSprmsLen = rDesc.nSprmsLen;
}
-USHORT WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
+sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
{
- USHORT nId;
+ sal_uInt16 nId;
if (p == pFld)
nId = eFLD;
@@ -4426,7 +4426,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
memset( aD, 0, sizeof( aD ) );
nLineEnd = WW8_CP_MAX;
nManType = nType;
- USHORT i;
+ sal_uInt16 i;
if( MAN_MAINTEXT == nType )
{
@@ -4569,7 +4569,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
if( p->pPLCFx->IsSprm() )
{
// Vorsicht: nEndPos muss bereits
- p->pIdStk = new std::stack<USHORT>;
+ p->pIdStk = new std::stack<sal_uInt16>;
if ((p == pChp) || (p == pPap))
{
WW8_CP nTemp = p->nEndPos+p->nCpOfs;
@@ -4591,20 +4591,20 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
WW8PLCFMan::~WW8PLCFMan()
{
- for( USHORT i=0; i<nPLCF; i++)
+ for( sal_uInt16 i=0; i<nPLCF; i++)
delete aD[i].pIdStk;
}
// 0. welche Attr.-Klasse,
// 1. ob ein Attr.-Start ist,
// 2. CP, wo ist naechste Attr.-Aenderung
-USHORT WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
+sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
{
OSL_ENSURE(nPLCF,"What the hell");
long nNext = LONG_MAX; // SuchReihenfolge:
- USHORT nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
+ sal_uInt16 nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
bool bStart = true; // dann Anfaenge finden ( ( SEP ), PAP, CHP )
- USHORT i;
+ sal_uInt16 i;
const WW8PLCFxDesc* pD;
for (i=0; i < nPLCF; i++)
{
@@ -4661,7 +4661,7 @@ void WW8PLCFMan::SeekPos( long nNewCp )
void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Save( rSave.aS[n++] );
if( pPcdA )
@@ -4674,7 +4674,7 @@ void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
void WW8PLCFMan::RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave )
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Restore( rSave.aS[n++] );
if( pPcdA )
@@ -4774,7 +4774,7 @@ void WW8PLCFMan::GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
pRes->nSprmId = 0;
}
-bool WW8PLCFMan::TransferOpenSprms(std::stack<USHORT> &rStack)
+bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack)
{
for (int i = 0; i < nPLCF; ++i)
{
@@ -4797,7 +4797,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
p->bFirstSprm = false;
if( bStart )
{
- USHORT nLastId = GetId(p);
+ sal_uInt16 nLastId = GetId(p);
p->pIdStk->push(nLastId); // merke Id fuer Attribut-Ende
if( p->nSprmsLen )
@@ -4807,7 +4807,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
if( p->pMemPos )
{
// Length of last sprm
- USHORT nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
+ sal_uInt16 nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
// Gesamtlaenge Sprms um SprmLaenge verringern
p->nSprmsLen -= nSprmL;
@@ -4959,7 +4959,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
WW8PLCFMan& WW8PLCFMan::operator ++(int)
{
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if (nIdx < nPLCF)
{
WW8PLCFxDesc* p = &aD[nIdx];
@@ -4982,7 +4982,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
{
memset( pRes, 0, sizeof( WW8PLCFManResult ) );
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if( nIdx >= nPLCF )
{
@@ -5018,7 +5018,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
}
}
-USHORT WW8PLCFMan::GetColl() const
+sal_uInt16 WW8PLCFMan::GetColl() const
{
if( pPap->pPLCFx )
return pPap->pPLCFx->GetIstd();
@@ -5034,18 +5034,18 @@ WW8PLCFx_FLD* WW8PLCFMan::GetFld() const
return (WW8PLCFx_FLD*)pFld->pPLCFx;
}
-const BYTE* WW8PLCFMan::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasParaSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pPap->pPLCFx)->HasSprm( nId );
}
-const BYTE* WW8PLCFMan::HasCharSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasCharSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm( nId );
}
-bool WW8PLCFMan::HasCharSprm(USHORT nId,
- std::vector<const BYTE *> &rResult) const
+bool WW8PLCFMan::HasCharSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm(nId, rResult);
}
@@ -5067,12 +5067,12 @@ void WW8PLCFx::Restore( const WW8PLCFxSave1& rSave )
SetStartFc( rSave.nStartFC );
}
-ULONG WW8PLCFx_Cp_FKP::GetIdx2() const
+sal_uLong WW8PLCFx_Cp_FKP::GetIdx2() const
{
return GetPCDIdx();
}
-void WW8PLCFx_Cp_FKP::SetIdx2( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetIdx2( sal_uLong nIdx )
{
SetPCDIdx( nIdx );
}
@@ -5244,13 +5244,13 @@ ww::WordVersion WW8Fib::GetFIBVersion() const
return eVer;
}
-WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
+WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset)
: nFibError( 0 )
{
memset(this, 0, sizeof(*this));
- BYTE aBits1;
- BYTE aBits2;
- BYTE aVer8Bits1; // nur ab WinWord 8 benutzt
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits2;
+ sal_uInt8 aVer8Bits1; // nur ab WinWord 8 benutzt
rSt.Seek( nOffset );
/*
Wunsch-Nr vermerken, File-Versionsnummer ermitteln
@@ -5262,8 +5262,8 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> nProduct;
if( 0 != rSt.GetError() )
{
- INT16 nFibMin;
- INT16 nFibMax;
+ sal_Int16 nFibMin;
+ sal_Int16 nFibMax;
// note: 6 stands for "6 OR 7", 7 stands for "ONLY 7"
switch( nVersion )
{
@@ -5299,10 +5299,10 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
ww::WordVersion eVer = GetFIBVersion();
// Hilfs-Varis fuer Ver67:
- INT16 pnChpFirst_Ver67=0;
- INT16 pnPapFirst_Ver67=0;
- INT16 cpnBteChp_Ver67=0;
- INT16 cpnBtePap_Ver67=0;
+ sal_Int16 pnChpFirst_Ver67=0;
+ sal_Int16 pnPapFirst_Ver67=0;
+ sal_Int16 cpnBteChp_Ver67=0;
+ sal_Int16 cpnBtePap_Ver67=0;
// und auf gehts: FIB einlesen
rSt >> lid;
@@ -5316,12 +5316,12 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld
// Inhalt von aVer8Bits1
//
- // BYTE fMac :1;
- // BYTE fEmptySpecial :1;
- // BYTE fLoadOverridePage :1;
- // BYTE fFuturesavedUndo :1;
- // BYTE fWord97Saved :1;
- // BYTE :3;
+ // sal_uInt8 fMac :1;
+ // sal_uInt8 fEmptySpecial :1;
+ // sal_uInt8 fLoadOverridePage :1;
+ // sal_uInt8 fFuturesavedUndo :1;
+ // sal_uInt8 fWord97Saved :1;
+ // sal_uInt8 :3;
rSt >> chse;
rSt >> chseTables;
rSt >> fcMin;
@@ -5337,7 +5337,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> wMagicRevised;
rSt >> wMagicCreatedPrivate;
rSt >> wMagicRevisedPrivate;
- rSt.SeekRel( 9 * sizeof( INT16 ) );
+ rSt.SeekRel( 9 * sizeof( sal_Int16 ) );
/*
// dies sind die 9 unused Felder:
@@ -5361,11 +5361,11 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> cbMac;
// 2 Longs uebergehen, da unwichtiger Quatsch
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
// weitere 2 Longs nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
rSt >> ccpText;
rSt >> ccpFtn;
@@ -5378,7 +5378,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres Long nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 1 * sizeof( INT32) );
+ rSt.SeekRel( 1 * sizeof( sal_Int32) );
else
{
// Einschub fuer WW8 *****************************************************
@@ -5479,7 +5479,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres short nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
{
- rSt.SeekRel( 1*sizeof( INT16) );
+ rSt.SeekRel( 1*sizeof( sal_Int16) );
// folgende 4 Shorts existieren nur bei Ver67;
rSt >> pnChpFirst_Ver67;
@@ -5635,7 +5635,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
}
-WW8Fib::WW8Fib(BYTE nVer)
+WW8Fib::WW8Fib(sal_uInt8 nVer)
{
memset(this, 0, sizeof(*this));
nVersion = nVer;
@@ -5708,11 +5708,11 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
bool bVer8 = 8 == nVersion;
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
@@ -5722,7 +5722,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, lid );
Set_UInt16( pData, pnNext );
- UINT16 nBits16 = 0;
+ sal_uInt16 nBits16 = 0;
if( fDot ) nBits16 |= 0x0001;
if( fGlsy) nBits16 |= 0x0002;
if( fComplex ) nBits16 |= 0x0004;
@@ -5746,7 +5746,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, nKey );
Set_UInt8( pData, envr );
- BYTE nBits8 = 0;
+ sal_uInt8 nBits8 = 0;
if( bVer8 )
{
if( fMac ) nBits8 |= 0x0001;
@@ -5774,7 +5774,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, wMagicRevised );
Set_UInt16( pData, wMagicCreatedPrivate );
Set_UInt16( pData, wMagicRevisedPrivate );
- pData += 9 * sizeof( INT16 );
+ pData += 9 * sizeof( sal_Int16 );
Set_UInt16( pData, lidFE );
Set_UInt16( pData, clw );
}
@@ -5797,20 +5797,20 @@ bool WW8Fib::Write(SvStream& rStrm)
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ fcMin - nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ fcMin - nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, fcMin - nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
// 2 Longs uebergehen, da unwichtiger Quatsch
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
// weitere 2 Longs nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
Set_UInt32( pData, ccpText );
Set_UInt32( pData, ccpFtn );
@@ -5823,7 +5823,7 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres Long nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 1 * sizeof( INT32);
+ pData += 1 * sizeof( sal_Int32);
// Einschub fuer WW8 *****************************************************
if( bVer8 )
@@ -5924,11 +5924,11 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres short nur bei Ver67 ueberspringen
if( !bVer8 )
{
- pData += 1*sizeof( INT16);
- Set_UInt16( pData, (UINT16)pnChpFirst );
- Set_UInt16( pData, (UINT16)pnPapFirst );
- Set_UInt16( pData, (UINT16)cpnBteChp );
- Set_UInt16( pData, (UINT16)cpnBtePap );
+ pData += 1*sizeof( sal_Int16);
+ Set_UInt16( pData, (sal_uInt16)pnChpFirst );
+ Set_UInt16( pData, (sal_uInt16)pnPapFirst );
+ Set_UInt16( pData, (sal_uInt16)cpnBteChp );
+ Set_UInt16( pData, (sal_uInt16)cpnBtePap );
}
Set_UInt32( pData, fcPlcfdoaMom ); // nur bei Ver67, in Ver8 unused
@@ -6001,8 +6001,8 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt32( pData, lcbPlcfTch );
pData += 0x3FA - 0x38A;
- Set_UInt16( pData, (UINT16)0x0002);
- Set_UInt16( pData, (UINT16)0x00D9);
+ Set_UInt16( pData, (sal_uInt16)0x0002);
+ Set_UInt16( pData, (sal_uInt16)0x00D9);
pData += 0x41A - 0x3FE;
Set_UInt32( pData, fcAtrdExtra );
@@ -6018,13 +6018,13 @@ bool WW8Fib::Write(SvStream& rStrm)
return 0 == rStrm.GetError();
}
-rtl_TextEncoding WW8Fib::GetFIBCharset(UINT16 chs)
+rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
{
OSL_ENSURE(chs <= 0x100, "overflowed winword charset set");
rtl_TextEncoding eCharSet =
(0x0100 == chs)
? RTL_TEXTENCODING_APPLE_ROMAN
- : rtl_getTextEncodingFromWindowsCharset( static_cast<BYTE>(chs) );
+ : rtl_getTextEncodingFromWindowsCharset( static_cast<sal_uInt8>(chs) );
return eCharSet;
}
@@ -6038,7 +6038,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
rSt.Seek(nStyleStart);
- USHORT cbStshi = 0; // 2 bytes size of the following STSHI structure
+ sal_uInt16 cbStshi = 0; // 2 bytes size of the following STSHI structure
if (rFib.GetFIBVersion() <= ww::eWW2)
{
@@ -6051,10 +6051,10 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
// lies die Laenge der in der Datei gespeicherten Struktur
rSt >> cbStshi;
- UINT16 nRead = cbStshi;
+ sal_uInt16 nRead = cbStshi;
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> cstd;
@@ -6110,10 +6110,10 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
{
WW8_STD* pStd = 0;
- UINT16 cbStd;
+ sal_uInt16 cbStd;
rSt >> cbStd; // lies Laenge
- UINT16 nRead = cbSTDBaseInFile;
+ sal_uInt16 nRead = cbSTDBaseInFile;
if( cbStd >= cbSTDBaseInFile )
{
// Fixed part vollst. vorhanden
@@ -6124,7 +6124,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> a16Bit;
@@ -6257,7 +6257,7 @@ struct WW8_FFN_Ver8 : public WW8_FFN_BASE
sal_Char fs[ 24 ]; // 0x10 FONTSIGNATURE
// ab Ver8 als Unicode
- UINT16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
+ sal_uInt16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
// records name of font.
// Maximal size of szFfn is 65 characters.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
@@ -6313,10 +6313,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.Seek( rFib.fcSttbfffn );
- INT32 nFFn = rFib.lcbSttbfffn - 2;
+ sal_Int32 nFFn = rFib.lcbSttbfffn - 2;
// allocate Font Array
- BYTE* pA = new BYTE[ nFFn ];
+ sal_uInt8* pA = new sal_uInt8[ nFFn ];
memset(pA, 0, nFFn);
WW8_FFN* p = (WW8_FFN*)pA;
@@ -6353,7 +6353,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( nLeft < 1 ) // can we read the given ammount of bytes ?
break;
// increase p by nNextSiz Bytes
- p = (WW8_FFN *)( ( (BYTE*)p ) + nNextSiz );
+ p = (WW8_FFN *)( ( (sal_uInt8*)p ) + nNextSiz );
}
}
@@ -6366,7 +6366,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( eVersion <= ww::eWW2 )
{
WW8_FFN_BASE* pVer2 = (WW8_FFN_BASE*)pA;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer2->cbFfnM1;
@@ -6374,8 +6374,8 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->fTrueType = 0;
p->ff = 0;
- p->wWeight = ( *(((BYTE*)pVer2) + 1) );
- p->chs = ( *(((BYTE*)pVer2) + 2) );
+ p->wWeight = ( *(((sal_uInt8*)pVer2) + 1) );
+ p->chs = ( *(((sal_uInt8*)pVer2) + 2) );
/*
#i8726# 7- seems to encode the name in the same encoding as
the font, e.g load the doc in 97 and save to see the unicode
@@ -6386,17 +6386,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
eEnc = RTL_TEXTENCODING_MS_1252;
p->sFontname = String ( (((const sal_Char*)pVer2) + 1 + 2), eEnc);
- pVer2 = (WW8_FFN_BASE*)( ((BYTE*)pVer2) + pVer2->cbFfnM1 + 1 );
+ pVer2 = (WW8_FFN_BASE*)( ((sal_uInt8*)pVer2) + pVer2->cbFfnM1 + 1 );
}
}
else if( eVersion < ww::eWW8 )
{
WW8_FFN_Ver6* pVer6 = (WW8_FFN_Ver6*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer6->cbFfnM1;
- c2 = *(((BYTE*)pVer6) + 1);
+ c2 = *(((sal_uInt8*)pVer6) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6431,17 +6431,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->sFontname.APPEND_CONST_ASC(";Symbol");
}
}
- pVer6 = (WW8_FFN_Ver6*)( ((BYTE*)pVer6) + pVer6->cbFfnM1 + 1 );
+ pVer6 = (WW8_FFN_Ver6*)( ((sal_uInt8*)pVer6) + pVer6->cbFfnM1 + 1 );
}
}
else
{
WW8_FFN_Ver8* pVer8 = (WW8_FFN_Ver8*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer8->cbFfnM1;
- c2 = *(((BYTE*)pVer8) + 1);
+ c2 = *(((sal_uInt8*)pVer8) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6454,10 +6454,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
#ifdef __WW8_NEEDS_COPY
{
- BYTE nLen = 0x28;
- BYTE nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
- nLength = std::min( nLength, BYTE( pVer8->cbFfnM1+1 ) );
- for( UINT16* pTmp = pVer8->szFfn;
+ sal_uInt8 nLen = 0x28;
+ sal_uInt8 nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
+ nLength = std::min( nLength, sal_uInt8( pVer8->cbFfnM1+1 ) );
+ for( sal_uInt16* pTmp = pVer8->szFfn;
nLen < nLength; ++pTmp, nLen+=2 )
{
*pTmp = SVBT16ToShort( *(SVBT16*)pTmp );
@@ -6476,14 +6476,14 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
lcl_checkFontname( p->sFontname );
// Zeiger auf Ursprungsarray einen Font nach hinten setzen
- pVer8 = (WW8_FFN_Ver8*)( ((BYTE*)pVer8) + pVer8->cbFfnM1 + 1 );
+ pVer8 = (WW8_FFN_Ver8*)( ((sal_uInt8*)pVer8) + pVer8->cbFfnM1 + 1 );
}
}
}
delete[] pA;
}
-const WW8_FFN* WW8Fonts::GetFont( USHORT nNum ) const
+const WW8_FFN* WW8Fonts::GetFont( sal_uInt16 nNum ) const
{
if( !pFontA || nNum >= nMax )
return 0;
@@ -6526,7 +6526,7 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
to point to the beginning of the next section's group of headers and
footers in this PLCF, UpdateIndex does that task.
*/
- for( BYTE nI = 0x1; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x1; nI <= 0x20; nI <<= 1 )
if( nI & rDop.grpfIhdt ) // Bit gesetzt ?
nIdxOffset++;
@@ -6534,10 +6534,10 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
// und der Fussnoten
}
-bool WW8PLCF_HdFt::GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart,
+bool WW8PLCF_HdFt::GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart,
long& rLen)
{
- BYTE nI = 0x01;
+ sal_uInt8 nI = 0x01;
short nIdx = nIdxOffset;
while (true)
{
@@ -6572,10 +6572,10 @@ bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen)
return true;
}
-void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
+void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
{
// Caution: Description is not correct
- for( BYTE nI = 0x01; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x01; nI <= 0x20; nI <<= 1 )
if( nI & grpfIhdt )
nIdxOffset++;
}
@@ -6584,14 +6584,14 @@ void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
// WW8Dop
//-----------------------------------------
-WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
{
memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
fDontUseHTMLAutoSpacing = true; //default
fAcetateShowAtn = true; //default
const sal_uInt32 nMaxDopSize = 0x268;
- BYTE* pDataPtr = new BYTE[ nMaxDopSize ];
- BYTE* pData = pDataPtr;
+ sal_uInt8* pDataPtr = new sal_uInt8[ nMaxDopSize ];
+ sal_uInt8* pData = pDataPtr;
sal_uInt32 nRead = nMaxDopSize < nSize ? nMaxDopSize : nSize;
rSt.Seek( nPos );
@@ -6603,9 +6603,9 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
memset( pData + nRead, 0, nMaxDopSize - nRead );
// dann mal die Daten auswerten
- UINT32 a32Bit;
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt32 a32Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = Get_UShort( pData ); // 0 0x00
fFacingPages = 0 != ( a16Bit & 0x0001 ) ;
@@ -6761,7 +6761,7 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
cDBC = Get_Long( pData ); // 480 0x1e0
cDBCFtnEdn = Get_Long( pData ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
nfcFtnRef = Get_Short( pData ); // 492 0x1ec
nfcEdnRef = Get_Short( pData ); // 494 0x1ee
@@ -6860,7 +6860,7 @@ WW8Dop::WW8Dop() : bUseThaiLineBreakingRules(false)
fAcetateShowAtn = true;
}
-void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions(sal_uInt32 a32Bit)
{
fNoTabForInd = ( a32Bit & 0x00000001 ) ;
fNoSpaceRaiseLower = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6897,9 +6897,9 @@ void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
fUsePrinterMetrics = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fNoTabForInd) a32Bit |= 0x00000001;
if (fNoSpaceRaiseLower) a32Bit |= 0x00000002;
if (fSupressSpbfAfterPageBreak) a32Bit |= 0x00000004;
@@ -6936,7 +6936,7 @@ UINT32 WW8Dop::GetCompatabilityOptions() const
}
// i#78591#
-void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions2(sal_uInt32 a32Bit)
{
fCompatabilityOptions_Unknown2_1 = ( a32Bit & 0x00000001 );
fCompatabilityOptions_Unknown2_2 = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6972,9 +6972,9 @@ void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
fCompatabilityOptions_Unknown2_32 = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions2() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions2() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fCompatabilityOptions_Unknown2_1) a32Bit |= 0x00000001;
if (fCompatabilityOptions_Unknown2_2) a32Bit |= 0x00000002;
if (fDontUseHTMLAutoSpacing) a32Bit |= 0x00000004;
@@ -7021,13 +7021,13 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
rFib.fcDop = rStrm.Tell();
rFib.lcbDop = nLen;
- BYTE aData[ nMaxDopLen ];
+ sal_uInt8 aData[ nMaxDopLen ];
memset( aData, 0, nMaxDopLen );
- BYTE* pData = aData;
+ sal_uInt8* pData = aData;
// dann mal die Daten auswerten
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = 0; // 0 0x00
if (fFacingPages)
@@ -7184,7 +7184,7 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
Set_UInt32( pData, cDBC ); // 480 0x1e0
Set_UInt32( pData, cDBCFtnEdn ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
Set_UInt16( pData, nfcFtnRef ); // 492 0x1ec
Set_UInt16( pData, nfcEdnRef ); // 494 0x1ee
@@ -7216,9 +7216,9 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
return 0 == rStrm.GetError();
}
-void WW8DopTypography::ReadFromMem(BYTE *&pData)
+void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData)
{
- USHORT a16Bit = Get_UShort(pData);
+ sal_uInt16 a16Bit = Get_UShort(pData);
fKerningPunct = (a16Bit & 0x0001);
iJustification = (a16Bit & 0x0006) >> 1;
iLevelOfKinsoku = (a16Bit & 0x0018) >> 3;
@@ -7229,7 +7229,7 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
cchFollowingPunct = Get_Short(pData);
cchLeadingPunct = Get_Short(pData);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
rgxchFPunct[i] = Get_Short(pData);
for (i=0; i < nMaxLeading; ++i)
@@ -7247,9 +7247,9 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
}
-void WW8DopTypography::WriteToMem(BYTE *&pData) const
+void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
{
- USHORT a16Bit = fKerningPunct;
+ sal_uInt16 a16Bit = fKerningPunct;
a16Bit |= (iJustification << 1) & 0x0006;
a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
a16Bit |= (f2on1 << 5) & 0x002;
@@ -7260,16 +7260,16 @@ void WW8DopTypography::WriteToMem(BYTE *&pData) const
Set_UInt16(pData,cchFollowingPunct);
Set_UInt16(pData,cchLeadingPunct);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
Set_UInt16(pData,rgxchFPunct[i]);
for (i=0; i < nMaxLeading; ++i)
Set_UInt16(pData,rgxchLPunct[i]);
}
-USHORT WW8DopTypography::GetConvertedLang() const
+sal_uInt16 WW8DopTypography::GetConvertedLang() const
{
- USHORT nLang;
+ sal_uInt16 nLang;
//I have assumed peoples republic/taiwan == simplified/traditional
//This isn't a documented issue, so we might have it all wrong,
@@ -7311,11 +7311,11 @@ USHORT WW8DopTypography::GetConvertedLang() const
//-----------------------------------------
// Sprms
//-----------------------------------------
-USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
+sal_uInt16 wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
const
{
SprmInfo aSprm = GetSprmInfo(nId);
- USHORT nL = 0; // number of Bytes to read
+ sal_uInt16 nL = 0; // number of Bytes to read
//sprmPChgTabs
switch( nId )
@@ -7323,11 +7323,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case 23:
case 0xC615:
if( pSprm[1 + mnDelta] != 255 )
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
else
{
- BYTE nDel = pSprm[2 + mnDelta];
- BYTE nIns = pSprm[3 + mnDelta + 4 * nDel];
+ sal_uInt8 nDel = pSprm[2 + mnDelta];
+ sal_uInt8 nIns = pSprm[3 + mnDelta + 4 * nDel];
nL = 2 + 4 * nDel + 3 * nIns;
}
@@ -7344,12 +7344,12 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case L_VAR:
// Variable 1-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
break;
case L_VAR2:
// Variable 2-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
+ nL = static_cast< sal_uInt16 >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
break;
default:
OSL_ENSURE(!this, "Unknown sprm varient");
@@ -7361,11 +7361,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
}
// one or two bytes at the beginning at the sprm id
-USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
+sal_uInt16 wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
{
ASSERT_RET_ON_FAIL(pSp, "Why GetSprmId with pSp of 0", 0);
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (ww::IsSevenMinus(meVersion))
{
@@ -7384,17 +7384,17 @@ USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
}
// with tokens and length byte
-USHORT wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
+sal_uInt16 wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
{
return GetSprmTailLen(nId, pSprm) + 1 + mnDelta + SprmDataOfs(nId);
}
-BYTE wwSprmParser::SprmDataOfs(USHORT nId) const
+sal_uInt8 wwSprmParser::SprmDataOfs(sal_uInt16 nId) const
{
return GetSprmInfo(nId).nVari;
}
-USHORT wwSprmParser::DistanceToData(USHORT nId) const
+sal_uInt16 wwSprmParser::DistanceToData(sal_uInt16 nId) const
{
return 1 + mnDelta + SprmDataOfs(nId);
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 897938b39033..96300f4fbe5a 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -115,7 +115,7 @@ class wwSprmParser
{
private:
ww::WordVersion meVersion;
- BYTE mnDelta;
+ sal_uInt8 mnDelta;
const wwSprmSearcher *mpKnownSprms;
static const wwSprmSearcher* GetWW8SprmSearcher();
static const wwSprmSearcher* GetWW6SprmSearcher();
@@ -123,7 +123,7 @@ private:
SprmInfo GetSprmInfo(sal_uInt16 nId) const;
- BYTE SprmDataOfs(sal_uInt16 nId) const;
+ sal_uInt8 SprmDataOfs(sal_uInt16 nId) const;
enum SprmType {L_FIX=0, L_VAR=1, L_VAR2=2};
public:
@@ -132,15 +132,15 @@ public:
/// Return the SPRM id at the beginning of this byte sequence
sal_uInt16 GetSprmId(const sal_uInt8* pSp) const;
- USHORT GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
+ sal_uInt16 GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
/// Get known len of a sprms head, the bytes of the sprm id + any bytes
/// reserved to hold a variable length
- USHORT DistanceToData(sal_uInt16 nId) const;
+ sal_uInt16 DistanceToData(sal_uInt16 nId) const;
/// Get len of a sprms data area, ignoring the bytes of the sprm id and
/// ignoring any len bytes. Reports the remaining data after those bytes
- USHORT GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
+ sal_uInt16 GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
/// The minimum acceptable sprm len possible for this type of parser
int MinSprmLen() const { return (IsSevenMinus(meVersion)) ? 2 : 3; }
@@ -164,7 +164,7 @@ String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
exactly ONE byte is skipped If nChars is set then that number of characters
(not bytes) is read, if its not set, the first character read is the length
*/
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1);
/**
reads array of strings (see MS documentation: STring TaBle stored in File)
@@ -172,8 +172,8 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
attention: the *extra data* of each string are SKIPPED and ignored
*/
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<String>* pValueArray = 0);
struct WW8FieldDesc
@@ -183,16 +183,16 @@ struct WW8FieldDesc
WW8_CP nLCode; ///< Laenge
WW8_CP nSRes; ///< Anfang Ergebnis
WW8_CP nLRes; ///< Laenge ( == 0, falls kein Ergebnis )
- USHORT nId; ///< WW-Id fuer Felder
- BYTE nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
- BYTE bCodeNest:1; ///< Befehl rekursiv verwendet
- BYTE bResNest:1; ///< Befehl in Resultat eingefuegt
+ sal_uInt16 nId; ///< WW-Id fuer Felder
+ sal_uInt8 nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
+ sal_uInt8 bCodeNest:1; ///< Befehl rekursiv verwendet
+ sal_uInt8 bResNest:1; ///< Befehl in Resultat eingefuegt
};
struct WW8PLCFxSave1
{
- ULONG nPLCFxPos;
- ULONG nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
+ sal_uLong nPLCFxPos;
+ sal_uLong nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
long nPLCFxMemOfs;
WW8_CP nStartCp; ///< for cp based iterator like PAP and CHP
long nCpOfs;
@@ -209,8 +209,8 @@ struct WW8PLCFxSave1
class WW8PLCFspecial // Iterator fuer PLCFs
{
private:
- INT32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax; ///< Anzahl der Elemente
long nIdx; ///< Merker, wo wir gerade sind
long nStru;
@@ -224,7 +224,7 @@ public:
bool SeekPos(long nPos); // geht ueber FC- bzw. CP-Wert
// bzw. naechste groesseren Wert
bool SeekPosExact(long nPos);
- INT32 Where() const
+ sal_Int32 Where() const
{ return ( nIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nIdx]; }
bool Get(WW8_CP& rStart, void*& rpValue) const;
bool GetData(long nIdx, WW8_CP& rPos, void*& rpValue) const;
@@ -234,7 +234,7 @@ public:
return ( nInIdx >= nIMax ) ? 0
: (const void*)&pPLCF_Contents[nInIdx * nStru];
}
- INT32 GetPos( long nInIdx ) const
+ sal_Int32 GetPos( long nInIdx ) const
{ return ( nInIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nInIdx]; }
WW8PLCFspecial& operator ++( int ) { nIdx++; return *this; }
@@ -247,24 +247,24 @@ class WW8SprmIter
private:
const wwSprmParser &mrSprmParser;
// these members will be updated
- const BYTE* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
- const BYTE* pAktParams; // start of akt. SPRM's parameters
- USHORT nAktId;
- USHORT nAktSize;
+ const sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
+ const sal_uInt8* pAktParams; // start of akt. SPRM's parameters
+ sal_uInt16 nAktId;
+ sal_uInt16 nAktSize;
long nRemLen; // length of remaining SPRMs (including akt. SPRM)
void UpdateMyMembers();
public:
- explicit WW8SprmIter( const BYTE* pSprms_, long nLen_,
+ explicit WW8SprmIter( const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rSprmParser);
- void SetSprms( const BYTE* pSprms_, long nLen_ );
- const BYTE* FindSprm(USHORT nId);
+ void SetSprms( const sal_uInt8* pSprms_, long nLen_ );
+ const sal_uInt8* FindSprm(sal_uInt16 nId);
void advance();
- const BYTE* GetSprms() const
+ const sal_uInt8* GetSprms() const
{ return ( pSprms && (0 < nRemLen) ) ? pSprms : 0; }
- const BYTE* GetAktParams() const { return pAktParams; }
- USHORT GetAktId() const { return nAktId; }
+ const sal_uInt8* GetAktParams() const { return pAktParams; }
+ sal_uInt16 GetAktId() const { return nAktId; }
private:
//No copying
WW8SprmIter(const WW8SprmIter&);
@@ -276,40 +276,40 @@ class WW8PLCF // Iterator fuer PLCFs
{
private:
WW8_CP* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
- INT32 nIMax; // Anzahl der Elemente
- INT32 nIdx;
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32 nIMax; // Anzahl der Elemente
+ sal_Int32 nIdx;
int nStru;
- void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF );
+ void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF );
/*
Falls im Dok ein PLC fehlt und die FKPs solo dastehen,
machen wir uns hiermit einen PLC:
*/
- void GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN );
+ void GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN );
void MakeFailedPLCF();
public:
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos = -1 );
/*
folgender Ctor generiert ggfs. einen PLC aus nPN und ncpN
*/
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN );
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN );
~WW8PLCF(){ delete[] pPLCF_PosArray; }
- INT32 GetIdx() const { return nIdx; }
- void SetIdx( INT32 nI ) { nIdx = nI; }
- INT32 GetIMax() const { return nIMax; }
+ sal_Int32 GetIdx() const { return nIdx; }
+ void SetIdx( sal_Int32 nI ) { nIdx = nI; }
+ sal_Int32 GetIMax() const { return nIMax; }
bool SeekPos(WW8_CP nPos);
WW8_CP Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCF& operator ++( int ) { if( nIdx < nIMax ) nIdx++; return *this; }
- const void* GetData( INT32 nInIdx ) const
+ const void* GetData( sal_Int32 nInIdx ) const
{
return ( nInIdx >= nIMax ) ? 0 :
(const void*)&pPLCF_Contents[nInIdx * nStru];
@@ -320,8 +320,8 @@ public:
class WW8PLCFpcd
{
friend class WW8PLCFpcd_Iter;
- INT32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax;
long nStru;
public:
@@ -345,7 +345,7 @@ public:
void SetIdx( long nI ) { nIdx = nI; }
long GetIMax() const { return rPLCF.nIMax; }
bool SeekPos(long nPos);
- INT32 Where() const;
+ sal_Int32 Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCFpcd_Iter& operator ++( int )
{
@@ -380,16 +380,16 @@ public:
: meVer(eVersion), bIsSprm(bSprm), bDirty(false) {}
virtual ~WW8PLCFx() {}
bool IsSprm() const { return bIsSprm; }
- virtual ULONG GetIdx() const = 0;
- virtual void SetIdx( ULONG nIdx ) = 0;
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const = 0;
+ virtual void SetIdx( sal_uLong nIdx ) = 0;
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos) = 0;
virtual WW8_FC Where() = 0;
virtual void GetSprms( WW8PLCFxDesc* p );
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int ) = 0;
- virtual USHORT GetIstd() const { return 0xffff; }
+ virtual sal_uInt16 GetIstd() const { return 0xffff; }
virtual void Save( WW8PLCFxSave1& rSave ) const;
virtual void Restore( const WW8PLCFxSave1& rSave );
ww::WordVersion GetFIBVersion() const { return meVer; }
@@ -404,10 +404,10 @@ class WW8PLCFx_PCDAttrs : public WW8PLCFx
private:
WW8PLCFpcd_Iter* pPcdI;
WW8PLCFx_PCD* pPcd;
- BYTE** const pGrpprls; // Attribute an Piece-Table
+ sal_uInt8** const pGrpprls; // Attribute an Piece-Table
SVBT32 aShortSprm; // mini storage: can contain ONE sprm with
// 1 byte param
- UINT16 nGrpprls; // Attribut Anzahl davon
+ sal_uInt16 nGrpprls; // Attribut Anzahl davon
//No copying
WW8PLCFx_PCDAttrs(const WW8PLCFx_PCDAttrs&);
@@ -415,8 +415,8 @@ private:
public:
WW8PLCFx_PCDAttrs(ww::WordVersion eVersion, WW8PLCFx_PCD* pPLCFx_PCD,
const WW8ScannerBase* pBase );
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -439,9 +439,9 @@ public:
WW8PLCFx_PCD(ww::WordVersion eVersion, WW8PLCFpcd* pPLCFpcd,
WW8_CP nStartCp, bool bVer67P);
virtual ~WW8PLCFx_PCD();
- virtual ULONG GetIMax() const;
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIMax() const;
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
@@ -454,7 +454,7 @@ public:
void SetClipStart(WW8_CP nIn) { nClipStart = nIn; }
WW8_CP GetClipStart() { return nClipStart; }
- static INT32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
+ static sal_Int32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
{
bIsUnicodeAddress = 0 == (0x40000000 & nfc);
return bIsUnicodeAddress ? nfc : (nfc & 0x3fffFFFF) / 2;
@@ -520,20 +520,20 @@ public:
mnIdx++;
return *this;
}
- BYTE* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
+ sal_uInt8* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
sal_uInt16 GetIstd() const { return maEntries[mnIdx].mnIStd; }
/*
liefert einen echten Pointer auf das Sprm vom Typ nId,
falls ein solches im Fkp drin ist.
*/
- BYTE* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
+ sal_uInt8* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
/*
ruft GetLenAndIStdAndSprms() auf...
*/
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
const wwSprmParser &GetSprmParser() const { return maSprmParser; }
};
@@ -571,16 +571,16 @@ public:
WW8PLCFx_Fc_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt,
const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL );
virtual ~WW8PLCFx_Fc_FKP();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_FC nFcPos);
virtual WW8_FC Where();
- BYTE* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
+ sal_uInt8* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int );
- virtual USHORT GetIstd() const;
+ virtual sal_uInt16 GetIstd() const;
void GetPCDSprms( WW8PLCFxDesc& rDesc );
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
bool HasFkp() const { return (0 != pFkp); }
};
@@ -592,8 +592,8 @@ private:
WW8PLCFx_PCD* pPcd;
WW8PLCFpcd_Iter *pPieceIter;
WW8_CP nAttrStart, nAttrEnd;
- BYTE bLineEnd : 1;
- BYTE bComplex : 1;
+ sal_uInt8 bLineEnd : 1;
+ sal_uInt8 bComplex : 1;
//No copying
WW8PLCFx_Cp_FKP(const WW8PLCFx_Cp_FKP&);
@@ -603,11 +603,11 @@ public:
const WW8ScannerBase& rBase, ePLCFT ePl );
virtual ~WW8PLCFx_Cp_FKP();
void ResetAttrStartEnd();
- ULONG GetPCDIMax() const;
- ULONG GetPCDIdx() const;
- void SetPCDIdx( ULONG nIdx );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ sal_uLong GetPCDIMax() const;
+ sal_uLong GetPCDIdx() const;
+ void SetPCDIdx( sal_uLong nIdx );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_CP Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -623,9 +623,9 @@ private:
wwSprmParser maSprmParser;
SvStream* pStrm;
WW8PLCF* pPLCF;
- BYTE* pSprms;
- USHORT nArrMax;
- UINT16 nSprmSiz;
+ sal_uInt8* pSprms;
+ sal_uInt16 nArrMax;
+ sal_uInt16 nSprmSiz;
//no copying
WW8PLCFx_SEPX(const WW8PLCFx_SEPX&);
@@ -634,19 +634,19 @@ public:
WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTblxySt, const WW8Fib& rFib,
WW8_CP nStartCp );
virtual ~WW8PLCFx_SEPX();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
long GetIMax() const { return ( pPLCF ) ? pPLCF->GetIMax() : 0; }
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
virtual WW8PLCFx& operator ++( int );
- const BYTE* HasSprm( USHORT nId ) const;
- const BYTE* HasSprm( USHORT nId, BYTE n2nd ) const;
- const BYTE* HasSprm( USHORT nId, const BYTE* pOtherSprms,
+ const sal_uInt8* HasSprm( sal_uInt16 nId ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const;
- bool Find4Sprms(USHORT nId1, USHORT nId2, USHORT nId3, USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4 ) const;
+ bool Find4Sprms(sal_uInt16 nId1, sal_uInt16 nId2, sal_uInt16 nId3, sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4 ) const;
};
/// Iterator fuer Fuss-/Endnoten und Anmerkungen
@@ -663,8 +663,8 @@ public:
WW8PLCFx_SubDoc(SvStream* pSt, ww::WordVersion eVersion, WW8_CP nStartCp,
long nFcRef, long nLenRef, long nFcTxt, long nLenTxt, long nStruc = 0);
virtual ~WW8PLCFx_SubDoc();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
@@ -693,8 +693,8 @@ private:
public:
WW8PLCFx_FLD(SvStream* pSt, const WW8Fib& rMyFib, short nType);
virtual ~WW8PLCFx_FLD();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms(WW8PLCFxDesc* p);
@@ -714,7 +714,7 @@ private:
::std::vector<String> aBookNames; // Name
eBookStatus* pStatus;
long nIMax; // Number of Booknotes
- USHORT nIsEnd;
+ sal_uInt16 nIsEnd;
int nBookmarkId; // counter incremented by GetUniqueBookmarkName.
//No copying
@@ -724,10 +724,10 @@ public:
WW8PLCFx_Book(SvStream* pTblSt,const WW8Fib& rFib);
virtual ~WW8PLCFx_Book();
long GetIMax() const { return nIMax; }
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen );
@@ -738,9 +738,9 @@ public:
long GetLen() const;
bool GetIsEnd() const { return nIsEnd ? true : false; }
long GetHandle() const;
- void SetStatus( USHORT nIndex, eBookStatus eStat );
+ void SetStatus( sal_uInt16 nIndex, eBookStatus eStat );
bool MapName(String& rName);
- String GetBookmark(long nStart,long nEnd, USHORT &nIndex);
+ String GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex);
eBookStatus GetStatus() const;
String GetUniqueBookmarkName(String &suggestedName);
};
@@ -754,11 +754,11 @@ struct WW8PLCFManResult
long nMemLen; // Laenge dazu
long nCp2OrIdx; // footnote-textpos oder Index in PLCF
WW8_CP nAktCp; // wird nur vom Aufrufer benutzt
- const BYTE* pMemPos;// Mem-Pos fuer Sprms
- USHORT nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
+ const sal_uInt8* pMemPos;// Mem-Pos fuer Sprms
+ sal_uInt16 nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
// (2..255) oder Pseudo-Sprm-Id (256..260)
// bzw. ab Winword-Ver8 die Sprm-Id (800..)
- BYTE nFlags; // Absatz- oder Section-Anfang
+ sal_uInt8 nFlags; // Absatz- oder Section-Anfang
};
enum ManMaskTypes
@@ -779,8 +779,8 @@ enum ManTypes // enums for PLCFMan-ctor
struct WW8PLCFxDesc
{
WW8PLCFx* pPLCFx;
- ::std::stack<USHORT>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
- const BYTE* pMemPos;// wo liegen die Sprm(s)
+ ::std::stack<sal_uInt16>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
+ const sal_uInt8* pMemPos;// wo liegen die Sprm(s)
long nOrigSprmsLen;
WW8_CP nStartPos;
@@ -825,7 +825,7 @@ private:
WW8_CP nLineEnd; // zeigt *hinter* das <CR>
long nLastWhereIdxCp; // last result of WhereIdx()
- USHORT nPLCF; // so viele PLCFe werden verwaltet
+ sal_uInt16 nPLCF; // so viele PLCFe werden verwaltet
ManTypes nManType;
bool mbDoingDrawTextBox; //Normally we adjust the end of attributes
//so that the end of a paragraph occurs
@@ -836,11 +836,11 @@ private:
WW8PLCFxDesc *pChp, *pPap, *pSep, *pFld, *pFtn, *pEdn, *pBkm, *pPcd,
*pPcdA, *pAnd;
WW8PLCFspecial *pFdoa, *pTxbx, *pTxbxBkd,*pMagicTables, *pSubdocs;
- BYTE* pExtendedAtrds;
+ sal_uInt8* pExtendedAtrds;
const WW8Fib* pWwFib;
- USHORT WhereIdx(bool* pbStart=0, long* pPos=0) const;
+ sal_uInt16 WhereIdx(bool* pbStart=0, long* pPos=0) const;
void AdjustEnds(WW8PLCFxDesc& rDesc);
void GetNewSprms(WW8PLCFxDesc& rDesc);
void GetNewNoSprms(WW8PLCFxDesc& rDesc);
@@ -850,7 +850,7 @@ private:
void GetNoSprmEnd(short nIdx, WW8PLCFManResult* pRes) const;
void AdvSprm(short nIdx, bool bStart);
void AdvNoSprm(short nIdx, bool bStart);
- USHORT GetId(const WW8PLCFxDesc* p ) const;
+ sal_uInt16 GetId(const WW8PLCFxDesc* p ) const;
public:
WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
bool bDoingDrawTextBox = false);
@@ -864,7 +864,7 @@ public:
bool Get(WW8PLCFManResult* pResult) const;
WW8PLCFMan& operator ++( int );
- USHORT GetColl() const; // index of actual Style
+ sal_uInt16 GetColl() const; // index of actual Style
WW8PLCFx_FLD* GetFld() const;
WW8PLCFx_SubDoc* GetEdn() const { return (WW8PLCFx_SubDoc*)pEdn->pPLCFx; }
WW8PLCFx_SubDoc* GetFtn() const { return (WW8PLCFx_SubDoc*)pFtn->pPLCFx; }
@@ -873,11 +873,11 @@ public:
long GetCpOfs() const { return pChp->nCpOfs; } // for Header/Footer...
/* fragt, ob *aktueller Absatz* einen Sprm diesen Typs hat */
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
/* fragt, ob *aktueller Textrun* einen Sprm diesen Typs hat */
- const BYTE* HasCharSprm( USHORT nId ) const;
- bool HasCharSprm(USHORT nId, std::vector<const BYTE *> &rResult) const;
+ const sal_uInt8* HasCharSprm( sal_uInt16 nId ) const;
+ bool HasCharSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) const;
WW8PLCFx_Cp_FKP* GetChpPLCF() const
{ return (WW8PLCFx_Cp_FKP*)pChp->pPLCFx; }
@@ -886,7 +886,7 @@ public:
WW8PLCFx_SEPX* GetSepPLCF() const
{ return (WW8PLCFx_SEPX*)pSep->pPLCFx; }
WW8PLCFxDesc* GetPap() const { return pPap; }
- bool TransferOpenSprms(std::stack<USHORT> &rStack);
+ bool TransferOpenSprms(std::stack<sal_uInt16> &rStack);
void SeekPos( long nNewCp );
void SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const;
void RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave );
@@ -895,7 +895,7 @@ public:
WW8PLCFspecial* GetTxbxBkd() const { return pTxbxBkd; }
WW8PLCFspecial* GetMagicTables() const { return pMagicTables; }
WW8PLCFspecial* GetWkbPLCF() const { return pSubdocs; }
- BYTE* GetExtendedAtrds() const { return pExtendedAtrds; }
+ sal_uInt8* GetExtendedAtrds() const { return pExtendedAtrds; }
ManTypes GetManType() const { return nManType; }
bool GetDoingDrawTextBox() const { return mbDoingDrawTextBox; }
};
@@ -943,15 +943,15 @@ private:
WW8PLCFspecial* pHdFtTxbxBkd; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pMagicTables; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pSubdocs; // subdoc references in master document
- BYTE* pExtendedAtrds; // Extended ATRDs
+ sal_uInt8* pExtendedAtrds; // Extended ATRDs
WW8PLCFx_Book* pBook; // Bookmarks
WW8PLCFpcd* pPiecePLCF; // fuer FastSave ( Basis-PLCF ohne Iterator )
WW8PLCFpcd_Iter* pPieceIter; // fuer FastSave ( Iterator dazu )
WW8PLCFx_PCD* pPLCFx_PCD; // dito
WW8PLCFx_PCDAttrs* pPLCFx_PCDAttrs;
- BYTE** pPieceGrpprls; // Attribute an Piece-Table
- UINT16 nPieceGrpprls; // Anzahl davon
+ sal_uInt8** pPieceGrpprls; // Attribute an Piece-Table
+ sal_uInt16 nPieceGrpprls; // Anzahl davon
WW8PLCFpcd* OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF );
void DeletePieceTable();
@@ -995,17 +995,17 @@ public:
7 == "only WinWord 95"
8 == "WinWord 97 or newer"
*/
- BYTE nVersion;
+ sal_uInt8 nVersion;
/*
error status
*/
- ULONG nFibError;
+ sal_uLong nFibError;
/*
vom Ctor aus dem FIB gelesene Daten
(entspricht nur ungefaehr der tatsaechlichen Struktur
des Winword-FIB)
*/
- UINT16 wIdent; // 0x0 int magic number
+ sal_uInt16 wIdent; // 0x0 int magic number
/*
File Information Block (FIB) values:
WinWord 1.0 = 33
@@ -1019,20 +1019,20 @@ public:
Word 2003 = 268
Word 2007 = 274
*/
- UINT16 nFib; // 0x2 FIB version written
- UINT16 nProduct; // 0x4 product version written by
- INT16 lid; // 0x6 language stamp---localized version;
+ sal_uInt16 nFib; // 0x2 FIB version written
+ sal_uInt16 nProduct; // 0x4 product version written by
+ sal_Int16 lid; // 0x6 language stamp---localized version;
WW8_PN pnNext; // 0x8
- UINT16 fDot :1; // 0xa 0001
- UINT16 fGlsy :1;
- UINT16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
- UINT16 fHasPic :1; // 0008 file contains 1 or more pictures
- UINT16 cQuickSaves :4; // 00F0 count of times file was quicksaved
- UINT16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
- UINT16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
- UINT16 fReadOnlyRecommended :1;
- UINT16 fWriteReservation :1;
+ sal_uInt16 fDot :1; // 0xa 0001
+ sal_uInt16 fGlsy :1;
+ sal_uInt16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
+ sal_uInt16 fHasPic :1; // 0008 file contains 1 or more pictures
+ sal_uInt16 cQuickSaves :4; // 00F0 count of times file was quicksaved
+ sal_uInt16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
+ sal_uInt16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
+ sal_uInt16 fReadOnlyRecommended :1;
+ sal_uInt16 fWriteReservation :1;
// named "0Table", when 1, this fib refers to the
// table stream named "1Table". Normally, a file
// will have only one table stream, but under unusual
@@ -1040,55 +1040,55 @@ public:
// both names. In that case, this flag must be used
// to decide which table stream is valid.
- UINT16 fExtChar :1; // 1000 =1, when using extended character set in file
- UINT16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
+ sal_uInt16 fExtChar :1; // 1000 =1, when using extended character set in file
+ sal_uInt16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
- UINT16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
+ sal_uInt16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
- UINT16 nFibBack; // 0xc
- UINT16 nHash; // 0xe file encrypted hash
- UINT16 nKey; // 0x10 file encrypted key
- UINT8 envr; // 0x12 environment in which file was created
+ sal_uInt16 nFibBack; // 0xc
+ sal_uInt16 nHash; // 0xe file encrypted hash
+ sal_uInt16 nKey; // 0x10 file encrypted key
+ sal_uInt8 envr; // 0x12 environment in which file was created
// 0 created by Win Word / 1 created by Mac Word
- BYTE fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
- BYTE fEmptySpecial :1;
- BYTE fLoadOverridePage :1;
- BYTE fFuturesavedUndo :1;
- BYTE fWord97Saved :1;
- BYTE fWord2000Saved :1;
- BYTE :2;
-
- UINT16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
+ sal_uInt8 fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
+ sal_uInt8 fEmptySpecial :1;
+ sal_uInt8 fLoadOverridePage :1;
+ sal_uInt8 fFuturesavedUndo :1;
+ sal_uInt8 fWord97Saved :1;
+ sal_uInt8 fWord2000Saved :1;
+ sal_uInt8 :2;
+
+ sal_uInt16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
// 0 = ANSI / 256 Macintosh character set.
- UINT16 chseTables; // 0x16 default extended character set id for text in
+ sal_uInt16 chseTables; // 0x16 default extended character set id for text in
// internal data structures: 0 = ANSI, 256 = Macintosh
WW8_FC fcMin; // 0x18 file offset of first character of text
WW8_FC fcMac; // 0x1c file offset of last character of text + 1
// Einschub fuer WW8 *****************************************************
- UINT16 csw; // Count of fields in the array of "shorts"
+ sal_uInt16 csw; // Count of fields in the array of "shorts"
// Marke: "rgsw" Beginning of the array of shorts
- UINT16 wMagicCreated; // unique number Identifying the File's creator
+ sal_uInt16 wMagicCreated; // unique number Identifying the File's creator
// 0x6A62 is the creator ID for Word and is reserved.
// Other creators should choose a different value.
- UINT16 wMagicRevised; // identifies the File's last modifier
- UINT16 wMagicCreatedPrivate; // private data
- UINT16 wMagicRevisedPrivate; // private data
+ sal_uInt16 wMagicRevised; // identifies the File's last modifier
+ sal_uInt16 wMagicCreatedPrivate; // private data
+ sal_uInt16 wMagicRevisedPrivate; // private data
/*
- INT16 pnFbpChpFirst_W6; // not used
- INT16 pnChpFirst_W6; // not used
- INT16 cpnBteChp_W6; // not used
- INT16 pnFbpPapFirst_W6; // not used
- INT16 pnPapFirst_W6; // not used
- INT16 cpnBtePap_W6; // not used
- INT16 pnFbpLvcFirst_W6; // not used
- INT16 pnLvcFirst_W6; // not used
- INT16 cpnBteLvc_W6; // not used
+ sal_Int16 pnFbpChpFirst_W6; // not used
+ sal_Int16 pnChpFirst_W6; // not used
+ sal_Int16 cpnBteChp_W6; // not used
+ sal_Int16 pnFbpPapFirst_W6; // not used
+ sal_Int16 pnPapFirst_W6; // not used
+ sal_Int16 cpnBtePap_W6; // not used
+ sal_Int16 pnFbpLvcFirst_W6; // not used
+ sal_Int16 pnLvcFirst_W6; // not used
+ sal_Int16 cpnBteLvc_W6; // not used
*/
- INT16 lidFE; // Language id if document was written by Far East version
+ sal_Int16 lidFE; // Language id if document was written by Far East version
// of Word (i.e. FIB.fFarEast is on)
- UINT16 clw; // Number of fields in the array of longs
+ sal_uInt16 clw; // Number of fields in the array of longs
// Ende des Einschubs fuer WW8 *******************************************
@@ -1106,7 +1106,7 @@ public:
WW8_CP ccpHdrTxbx; // 0x50 length of header textbox subdocument text stream
// Einschub fuer WW8 *****************************************************
- INT32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written
// to the file in a linked list of 512-byte pieces
// starting with this pn.
@@ -1114,13 +1114,13 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnChpFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnChpFirst; // the page number of the lowest numbered page in the
// document that records CHPX FKP information
- INT32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbteChpx
// is less than this, the PLCFbteChpx is incomplete.
*/
- INT32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
@@ -1128,24 +1128,24 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnPapFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnPapFirst; // the page number of the lowest numbered page in the
// document that records PAPX FKP information
- INT32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
*/
- INT32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
- INT32 pnLvcFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnLvcFirst; // the page number of the lowest numbered page in the
// document that records LVC FKP information
- INT32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
- INT32 fcIslandFirst; // ?
- INT32 fcIslandLim; // ?
- UINT16 cfclcb; // Number of fields in the array of FC/LCB pairs.
+ sal_Int32 fcIslandFirst; // ?
+ sal_Int32 fcIslandLim; // ?
+ sal_uInt16 cfclcb; // Number of fields in the array of FC/LCB pairs.
// Ende des Einschubs fuer WW8 *******************************************
@@ -1153,105 +1153,105 @@ public:
WW8_FC fcStshfOrig; // file offset of original allocation for STSH in table
// stream. During fast save Word will attempt to reuse
// this allocation if STSH is small enough to fit.
- INT32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
+ sal_Int32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
WW8_FC fcStshf; // 0x60 file offset of STSH in file.
- INT32 lcbStshf; // 0x64 count of bytes of current STSH allocation
+ sal_Int32 lcbStshf; // 0x64 count of bytes of current STSH allocation
WW8_FC fcPlcffndRef; // 0x68 file offset of footnote reference PLCF.
- INT32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
+ sal_Int32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
// == 0 if no footnotes defined in document.
WW8_FC fcPlcffndTxt; // 0x70 file offset of footnote text PLCF.
- INT32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
+ sal_Int32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
// == 0 if no footnotes defined in document
WW8_FC fcPlcfandRef; // 0x78 file offset of annotation reference PLCF.
- INT32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
+ sal_Int32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
WW8_FC fcPlcfandTxt; // 0x80 file offset of annotation text PLCF.
- INT32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
+ sal_Int32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
WW8_FC fcPlcfsed; // 8x88 file offset of section descriptor PLCF.
- INT32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
+ sal_Int32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
WW8_FC fcPlcfpad; // 0x90 file offset of paragraph descriptor PLCF
- INT32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
+ sal_Int32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
// ==0 if file was never viewed in Outline view.
// Should not be written by third party creators
WW8_FC fcPlcfphe; // 0x98 file offset of PLCF of paragraph heights.
- INT32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
+ sal_Int32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
// ==0 when file is non-complex.
WW8_FC fcSttbfglsy; // 0xa0 file offset of glossary string table.
- INT32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
+ sal_Int32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfglsy; // 0xa8 file offset of glossary PLCF.
- INT32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
+ sal_Int32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfhdd; // 0xb0 byte offset of header PLCF.
- INT32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
+ sal_Int32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
// == 0 if document contains no headers
WW8_FC fcPlcfbteChpx; // 0xb8 file offset of character property bin table.PLCF.
- INT32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
+ sal_Int32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
WW8_FC fcPlcfbtePapx; // 0xc0 file offset of paragraph property bin table.PLCF.
- INT32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
+ sal_Int32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
WW8_FC fcPlcfsea; // 0xc8 file offset of PLCF reserved for private use. The SEA is 6 bytes long.
- INT32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
+ sal_Int32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
WW8_FC fcSttbfffn; // 0xd0 file offset of font information STTBF. See the FFN file structure definition.
- INT32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
+ sal_Int32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
WW8_FC fcPlcffldMom; // 0xd8 offset in doc stream to the PLCF of field positions in the main document.
- INT32 lcbPlcffldMom; // 0xdc
+ sal_Int32 lcbPlcffldMom; // 0xdc
WW8_FC fcPlcffldHdr; // 0xe0 offset in doc stream to the PLCF of field positions in the header subdocument.
- INT32 lcbPlcffldHdr; // 0xe4
+ sal_Int32 lcbPlcffldHdr; // 0xe4
WW8_FC fcPlcffldFtn; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument.
- INT32 lcbPlcffldFtn; // 0xec
+ sal_Int32 lcbPlcffldFtn; // 0xec
WW8_FC fcPlcffldAtn; // 0xf0 offset in doc stream to the PLCF of field positions in the annotation subdocument.
- INT32 lcbPlcffldAtn; // 0xf4
+ sal_Int32 lcbPlcffldAtn; // 0xf4
WW8_FC fcPlcffldMcr; // 0xf8 offset in doc stream to the PLCF of field positions in the macro subdocument.
- INT32 lcbPlcffldMcr; // 9xfc
+ sal_Int32 lcbPlcffldMcr; // 9xfc
WW8_FC fcSttbfbkmk; // 0x100 offset in document stream of the STTBF that records bookmark names in the main document
- INT32 lcbSttbfbkmk; // 0x104
+ sal_Int32 lcbSttbfbkmk; // 0x104
WW8_FC fcPlcfbkf; // 0x108 offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- INT32 lcbPlcfbkf; // 0x10c
+ sal_Int32 lcbPlcfbkf; // 0x10c
WW8_FC fcPlcfbkl; // 0x110 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition.
- INT32 lcbPlcfbkl; // 0x114 INT32
+ sal_Int32 lcbPlcfbkl; // 0x114 sal_Int32
WW8_FC fcCmds; // 0x118 FC
- INT32 lcbCmds; // 0x11c
+ sal_Int32 lcbCmds; // 0x11c
WW8_FC fcPlcfmcr; // 0x120 FC
- INT32 lcbPlcfmcr; // 0x124
+ sal_Int32 lcbPlcfmcr; // 0x124
WW8_FC fcSttbfmcr; // 0x128 FC
- INT32 lcbSttbfmcr; // 0x12c
+ sal_Int32 lcbSttbfmcr; // 0x12c
WW8_FC fcPrDrvr; // 0x130 file offset of the printer driver information (names of drivers, port etc...)
- INT32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
+ sal_Int32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
WW8_FC fcPrEnvPort; // 0x138 file offset of the print environment in portrait mode.
- INT32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
+ sal_Int32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
WW8_FC fcPrEnvLand; // 0x140 file offset of the print environment in landscape mode.
- INT32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
+ sal_Int32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
WW8_FC fcWss; // 0x148 file offset of Window Save State data structure. See WSS.
- INT32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
+ sal_Int32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
WW8_FC fcDop; // 0x150 file offset of document property data structure.
sal_uInt32 lcbDop; // 0x154 count of bytes of document properties.
@@ -1259,27 +1259,27 @@ public:
WW8_FC fcSttbfAssoc; // 0x158 offset to STTBF of associated strings. See STTBFASSOC.
- INT32 lcbSttbfAssoc; // 0x15C
+ sal_Int32 lcbSttbfAssoc; // 0x15C
WW8_FC fcClx; // 0x160 file offset of beginning of information for complex files.
- INT32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
+ sal_Int32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
WW8_FC fcPlcfpgdFtn; // 0x168 file offset of page descriptor PLCF for footnote subdocument.
- INT32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
+ sal_Int32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
WW8_FC fcAutosaveSource; // 0x170 file offset of the name of the original file.
- INT32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
+ sal_Int32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
WW8_FC fcGrpStAtnOwners; // 0x178 group of strings recording the names of the owners of annotations
- INT32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
+ sal_Int32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
WW8_FC fcSttbfAtnbkmk; // 0x180 file offset of the sttbf that records names of bookmarks in the annotation subdocument
- INT32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
+ sal_Int32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
// Einschubs fuer WW67 ***************************************************
- // INT16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
+ // sal_Int16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
/*
// folgende Felder existieren zwar so in der Datei,
@@ -1303,144 +1303,144 @@ public:
WW8_FC fcPlcfdoaMom; // 0x192 file offset of the FDOA (drawn object) PLCF for main document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
+ sal_Int32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
// ab Ver8 unused
WW8_FC fcPlcfdoaHdr; // 0x19A file offset of the FDOA (drawn object) PLCF for the header document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
+ sal_Int32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
// ab Ver8 unused
WW8_FC fcPlcfspaMom; // offset in table stream of the FSPA PLCF for main document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
+ sal_Int32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfspaHdr; // offset in table stream of the FSPA PLCF for header document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
+ sal_Int32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfAtnbkf; // 0x1B2 file offset of BKF (bookmark first) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPlcfAtnbkl; // 0x1BA file offset of BKL (bookmark last) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPms; // 0x1C2 file offset of PMS (Print Merge State) information block
- INT32 lcbPMS; // 0x1C6 length in bytes of PMS
+ sal_Int32 lcbPMS; // 0x1C6 length in bytes of PMS
WW8_FC fcFormFldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls
- INT32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
+ sal_Int32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
WW8_FC fcPlcfendRef; // 0x1D2 file offset of PLCFendRef which points to endnote references in the main document stream
- INT32 lcbPlcfendRef; // 0x1D6
+ sal_Int32 lcbPlcfendRef; // 0x1D6
WW8_FC fcPlcfendTxt; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document
// stream which corresponds with the PLCFendRef
- INT32 lcbPlcfendTxt; // 0x1DE
+ sal_Int32 lcbPlcfendTxt; // 0x1DE
WW8_FC fcPlcffldEdn; // 0x1E2 offset to PLCF of field positions in the endnote subdoc
- INT32 lcbPlcffldEdn; // 0x1E6
+ sal_Int32 lcbPlcffldEdn; // 0x1E6
WW8_FC fcPlcfpgdEdn; // 0x1EA offset to PLCF of page boundaries in the endnote subdoc.
- INT32 lcbPlcfpgdEdn; // 0x1EE
+ sal_Int32 lcbPlcfpgdEdn; // 0x1EE
WW8_FC fcDggInfo; // offset in table stream of the office art object table data.
// The format of office art object table data is found in a separate document.
// war in Ver67 nur leere Reserve
- INT32 lcbDggInfo; // length in bytes of the office art object table data
+ sal_Int32 lcbDggInfo; // length in bytes of the office art object table data
// war in Ver67 nur leere Reserve
WW8_FC fcSttbfRMark; // 0x1fa offset to STTBF that records the author abbreviations...
- INT32 lcbSttbfRMark; // 0x1fe
+ sal_Int32 lcbSttbfRMark; // 0x1fe
WW8_FC fcSttbfCaption; // 0x202 offset to STTBF that records caption titles...
- INT32 lcbSttbfCaption; // 0x206
+ sal_Int32 lcbSttbfCaption; // 0x206
WW8_FC fcSttbAutoCaption; // offset in table stream to the STTBF that records the object names and
// indices into the caption STTBF for objects which get auto captions.
- INT32 lcbSttbAutoCaption; // 0x20e
+ sal_Int32 lcbSttbAutoCaption; // 0x20e
WW8_FC fcPlcfwkb; // 0x212 offset to PLCF that describes the boundaries of contributing documents...
- INT32 lcbPlcfwkb; // 0x216
+ sal_Int32 lcbPlcfwkb; // 0x216
WW8_FC fcPlcfspl; // offset in table stream of PLCF (of SPLS structures) that records spell check state
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspl; // war in Ver67 nur leere Reserve
+ sal_Int32 lcbPlcfspl; // war in Ver67 nur leere Reserve
WW8_FC fcPlcftxbxTxt; // 0x222 ...PLCF of beginning CP in the text box subdoc
- INT32 lcbPlcftxbxTxt; // 0x226
+ sal_Int32 lcbPlcftxbxTxt; // 0x226
WW8_FC fcPlcffldTxbx; // 0x22a ...PLCF of field boundaries recorded in the textbox subdoc.
- INT32 lcbPlcffldTxbx; // 0x22e
+ sal_Int32 lcbPlcffldTxbx; // 0x22e
WW8_FC fcPlcfHdrtxbxTxt;// 0x232 ...PLCF of beginning CP in the header text box subdoc
- INT32 lcbPlcfHdrtxbxTxt;// 0x236
+ sal_Int32 lcbPlcfHdrtxbxTxt;// 0x236
WW8_FC fcPlcffldHdrTxbx;// 0x23a ...PLCF of field boundaries recorded in the header textbox subdoc.
- INT32 lcbPlcffldHdrTxbx;// 0x23e
+ sal_Int32 lcbPlcffldHdrTxbx;// 0x23e
WW8_FC fcStwUser;
sal_uInt32 lcbStwUser;
WW8_FC fcSttbttmbd;
sal_uInt32 lcbSttbttmbd;
WW8_FC fcSttbFnm; // 0x02da offset in the table stream of masters subdocument names
- INT32 lcbSttbFnm; // 0x02de length
+ sal_Int32 lcbSttbFnm; // 0x02de length
/*
spezielle Listenverwaltung fuer WW8
*/
WW8_FC fcPlcfLst; // 0x02e2 offset in the table stream of list format information.
- INT32 lcbPlcfLst; // 0x02e6 length
+ sal_Int32 lcbPlcfLst; // 0x02e6 length
WW8_FC fcPlfLfo; // 0x02ea offset in the table stream of list format override information.
- INT32 lcbPlfLfo; // 0x02ee length
+ sal_Int32 lcbPlfLfo; // 0x02ee length
/*
spezielle Break-Verwaltung fuer Text-Box-Stories in WW8
*/
WW8_FC fcPlcftxbxBkd; // 0x02f2 PLCF fuer TextBox-Break-Deskriptoren im Maintext
- INT32 lcbPlcftxbxBkd; // 0x02f6
+ sal_Int32 lcbPlcftxbxBkd; // 0x02f6
WW8_FC fcPlcfHdrtxbxBkd;// 0x02fa PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- INT32 lcbPlcfHdrtxbxBkd;// 0x02fe
+ sal_Int32 lcbPlcfHdrtxbxBkd;// 0x02fe
// 0x302 - 372 == ignore
/*
ListNames (skip to here!)
*/
WW8_FC fcSttbListNames;// 0x0372 PLCF for Listname Table
- INT32 lcbSttbListNames;// 0x0376
+ sal_Int32 lcbSttbListNames;// 0x0376
WW8_FC fcPlcfTch;
- INT32 lcbPlcfTch;
+ sal_Int32 lcbPlcfTch;
// 0x38A - 41A == ignore
WW8_FC fcAtrdExtra;
- UINT32 lcbAtrdExtra;
+ sal_uInt32 lcbAtrdExtra;
// 0x422 - 0x4D4 == ignore
WW8_FC fcHplxsdr; //bizarrely, word xp seems to require this set to shows dates from AtrdExtra
- UINT32 lcbHplxsdr;
+ sal_uInt32 lcbHplxsdr;
/*
General-Varaiblen, die fuer Ver67 und Ver8 verwendet werden,
obwohl sie in der jeweiligen DATEI verschiedene Groesse haben:
*/
- INT32 pnChpFirst;
- INT32 pnPapFirst;
- INT32 cpnBteChp;
- INT32 cpnBtePap;
+ sal_Int32 pnChpFirst;
+ sal_Int32 pnPapFirst;
+ sal_Int32 cpnBteChp;
+ sal_Int32 cpnBtePap;
/*
The actual nFib, moved here because some readers assumed
they couldn't read any format with nFib > some constant
*/
- UINT16 nFib_actual; // 0x05bc #i56856#
+ sal_uInt16 nFib_actual; // 0x05bc #i56856#
/*
nun wird lediglich noch ein Ctor benoetigt
*/
- WW8Fib( SvStream& rStrm, BYTE nWantedVersion,UINT32 nOffset=0 );
+ WW8Fib( SvStream& rStrm, sal_uInt8 nWantedVersion,sal_uInt32 nOffset=0 );
/* leider falsch, man braucht auch noch einen fuer den Export */
- WW8Fib( BYTE nVersion = 6 );
+ WW8Fib( sal_uInt8 nVersion = 6 );
bool WriteHeader(SvStream& rStrm);
bool Write(SvStream& rStrm);
- static rtl_TextEncoding GetFIBCharset(UINT16 chs);
+ static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs);
ww::WordVersion GetFIBVersion() const;
WW8_CP GetBaseCp(ManTypes nType) const;
sal_Unicode getNumDecimalSep() const;
@@ -1454,21 +1454,21 @@ protected:
long nStyleStart;
long nStyleLen;
- UINT16 cstd; // Count of styles in stylesheet
- UINT16 cbSTDBaseInFile; // Length of STD Base as stored in a file
- UINT16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
- UINT16 : 15; // Spare flags
- UINT16 stiMaxWhenSaved; // Max sti known when file was written
- UINT16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
- UINT16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
+ sal_uInt16 cstd; // Count of styles in stylesheet
+ sal_uInt16 cbSTDBaseInFile; // Length of STD Base as stored in a file
+ sal_uInt16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
+ sal_uInt16 : 15; // Spare flags
+ sal_uInt16 stiMaxWhenSaved; // Max sti known when file was written
+ sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
+ sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
// ftc used by StandardChpStsh for this document
- UINT16 ftcAsci;
+ sal_uInt16 ftcAsci;
// CJK ftc used by StandardChpStsh for this document
- UINT16 ftcFE;
+ sal_uInt16 ftcFE;
// CTL/Other ftc used by StandardChpStsh for this document
- UINT16 ftcOther;
+ sal_uInt16 ftcOther;
// CTL ftc used by StandardChpStsh for this document
- UINT16 ftcBi;
+ sal_uInt16 ftcBi;
//No copying
WW8Style(const WW8Style&);
@@ -1477,22 +1477,22 @@ public:
WW8Style( SvStream& rSt, WW8Fib& rFibPara );
WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
- UINT16 GetCount() const { return cstd; }
+ sal_uInt16 GetCount() const { return cstd; }
};
class WW8Fonts
{
protected:
WW8_FFN* pFontA; // Array of Pointers to Font Description
- USHORT nMax; // Array-Size
+ sal_uInt16 nMax; // Array-Size
public:
WW8Fonts( SvStream& rSt, WW8Fib& rFib );
~WW8Fonts() { delete[] pFontA; }
- const WW8_FFN* GetFont( USHORT nNum ) const;
- USHORT GetMax() const { return nMax; }
+ const WW8_FFN* GetFont( sal_uInt16 nNum ) const;
+ sal_uInt16 GetMax() const { return nMax; }
};
-typedef BYTE HdFtFlags;
+typedef sal_uInt8 HdFtFlags;
namespace nsHdFtFlags
{
const HdFtFlags WW8_HEADER_EVEN = 0x01;
@@ -1508,251 +1508,251 @@ class WW8Dop
{
public:
/* Error Status */
- ULONG nDopError;
+ sal_uLong nDopError;
/*
Corresponds only roughly to the actual structure of the Winword DOP,
the winword FIB version matters to what exists.
*/
// Initialisier-Dummy:
- BYTE nDataStart;
+ sal_uInt8 nDataStart;
//-------------------------
- UINT16 fFacingPages : 1; // 1 when facing pages should be printed
- UINT16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
- UINT16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
- UINT16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
- UINT16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- UINT16 : 1; // 0 unused
+ sal_uInt16 fFacingPages : 1; // 1 when facing pages should be printed
+ sal_uInt16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
+ sal_uInt16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
+ sal_uInt16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
+ sal_uInt16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
+ sal_uInt16 : 1; // 0 unused
//-------------------------
- UINT16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
+ sal_uInt16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
//-------------------------
- UINT16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
- UINT16 nFtn : 14; // 1 initial footnote number for document
- UINT16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
- UINT16 : 7; // reserved
- UINT16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
- UINT16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
- UINT16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
- UINT16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
- UINT16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
- UINT16 fFormNoFields : 1;
- UINT16 fLinkStyles : 1; // when 1, Word will merge styles from its template
- UINT16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
- UINT16 fBackup : 1; // always make backup when document saved when 1.
- UINT16 fExactCWords : 1;
- UINT16 fPagHidden : 1; //
- UINT16 fPagResults : 1;
- UINT16 fLockAtn : 1; // when 1, annotations are locked for editing
- UINT16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
- UINT16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
- UINT16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
- UINT16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
- UINT16 fProtEnabled : 1; // when 1, document is protected from edit operations
- UINT16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
- UINT16 fRMView : 1; // when 1, show revision markings on screen
- UINT16 fRMPrint : 1; // when 1, print revision marks when document is printed
- UINT16 fWriteReservation : 1;
- UINT16 fLockRev : 1; // when 1, the current revision marking state is locked
- UINT16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
+ sal_uInt16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
+ sal_uInt16 nFtn : 14; // 1 initial footnote number for document
+ sal_uInt16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
+ sal_uInt16 : 7; // reserved
+ sal_uInt16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
+ sal_uInt16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
+ sal_uInt16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
+ sal_uInt16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
+ sal_uInt16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
+ sal_uInt16 fFormNoFields : 1;
+ sal_uInt16 fLinkStyles : 1; // when 1, Word will merge styles from its template
+ sal_uInt16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
+ sal_uInt16 fBackup : 1; // always make backup when document saved when 1.
+ sal_uInt16 fExactCWords : 1;
+ sal_uInt16 fPagHidden : 1; //
+ sal_uInt16 fPagResults : 1;
+ sal_uInt16 fLockAtn : 1; // when 1, annotations are locked for editing
+ sal_uInt16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
+ sal_uInt16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
+ sal_uInt16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
+ sal_uInt16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
+ sal_uInt16 fProtEnabled : 1; // when 1, document is protected from edit operations
+ sal_uInt16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
+ sal_uInt16 fRMView : 1; // when 1, show revision markings on screen
+ sal_uInt16 fRMPrint : 1; // when 1, print revision marks when document is printed
+ sal_uInt16 fWriteReservation : 1;
+ sal_uInt16 fLockRev : 1; // when 1, the current revision marking state is locked
+ sal_uInt16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
// compatability options
- UINT16 copts_fNoTabForInd : 1; // when 1, donEt add automatic tab stops for hanging indent
- UINT16 copts_fNoSpaceRaiseLower : 1; // when 1, donEt add extra space for raised or lowered characters
- UINT16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
- UINT16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
- UINT16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
- UINT16 copts_fNoColumnBalance : 1; // when 1, donEt balance columns for Continuous Section starts
- UINT16 copts_fConvMailMergeEsc : 1;
- UINT16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
- UINT16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
- UINT16 copts_fTransparentMetafiles : 1; // when 1, donEt blank area between metafile pictures
- UINT16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
- UINT16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
- UINT16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
-
- INT16 dxaTab; // 720 twips default tab width
- UINT16 wSpare; //
- UINT16 dxaHotZ; // width of hyphenation hot zone measured in twips
- UINT16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
- UINT16 wSpare2; // reserved
- INT32 dttmCreated; // DTTM date and time document was created
- INT32 dttmRevised; // DTTM date and time document was last revised
- INT32 dttmLastPrint; // DTTM date and time document was last printed
- INT16 nRevision; // number of times document has been revised since its creation
- INT32 tmEdited; // time document was last edited
- INT32 cWords; // count of words tallied by last Word Count execution
- INT32 cCh; // count of characters tallied by last Word Count execution
- INT16 cPg; // count of pages tallied by last Word Count execution
- INT32 cParas; // count of paragraphs tallied by last Word Count execution
- UINT16 rncEdn : 2; // restart endnote number code: 0 donEt restart endnote numbering, 1 section, 2 page
- UINT16 nEdn : 14; // beginning endnote number
- UINT16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
- // UINT16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ sal_uInt16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
+ sal_uInt16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
+ sal_uInt16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
+ sal_uInt16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
+ sal_uInt16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
+ sal_uInt16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
+ sal_uInt16 copts_fConvMailMergeEsc : 1;
+ sal_uInt16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
+ sal_uInt16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
+ sal_uInt16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
+ sal_uInt16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
+ sal_uInt16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
+ sal_uInt16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
+
+ sal_Int16 dxaTab; // 720 twips default tab width
+ sal_uInt16 wSpare; //
+ sal_uInt16 dxaHotZ; // width of hyphenation hot zone measured in twips
+ sal_uInt16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
+ sal_uInt16 wSpare2; // reserved
+ sal_Int32 dttmCreated; // DTTM date and time document was created
+ sal_Int32 dttmRevised; // DTTM date and time document was last revised
+ sal_Int32 dttmLastPrint; // DTTM date and time document was last printed
+ sal_Int16 nRevision; // number of times document has been revised since its creation
+ sal_Int32 tmEdited; // time document was last edited
+ sal_Int32 cWords; // count of words tallied by last Word Count execution
+ sal_Int32 cCh; // count of characters tallied by last Word Count execution
+ sal_Int16 cPg; // count of pages tallied by last Word Count execution
+ sal_Int32 cParas; // count of paragraphs tallied by last Word Count execution
+ sal_uInt16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
+ sal_uInt16 nEdn : 14; // beginning endnote number
+ sal_uInt16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
+ // sal_uInt16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- // UINT16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ // sal_uInt16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- UINT16 fPrintFormData : 1; // only print data inside of form fields
- UINT16 fSaveFormData : 1; // only save document data that is inside of a form field.
- UINT16 fShadeFormData : 1; // shade form fields
- UINT16 : 2; // reserved
- UINT16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
- INT32 cLines; // count of lines tallied by last Word Count operation
- INT32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
- INT32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
- INT16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
- INT32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
- UINT16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
- UINT16 wScaleSaved : 9; //
- UINT16 zkSaved : 2;
- UINT16 fRotateFontW6 : 1;
- UINT16 iGutterPos : 1 ;
+ sal_uInt16 fPrintFormData : 1; // only print data inside of form fields
+ sal_uInt16 fSaveFormData : 1; // only save document data that is inside of a form field.
+ sal_uInt16 fShadeFormData : 1; // shade form fields
+ sal_uInt16 : 2; // reserved
+ sal_uInt16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
+ sal_Int32 cLines; // count of lines tallied by last Word Count operation
+ sal_Int32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
+ sal_Int16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
+ sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
+ sal_uInt16 wScaleSaved : 9; //
+ sal_uInt16 zkSaved : 2;
+ sal_uInt16 fRotateFontW6 : 1;
+ sal_uInt16 iGutterPos : 1 ;
// hier sollte bei nFib < 103 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib >= 103 gehts weiter:
*/
- UINT32 fNoTabForInd :1; // see above in compatability options
- UINT32 fNoSpaceRaiseLower :1; // see above
- UINT32 fSupressSpbfAfterPageBreak :1; // see above
- UINT32 fWrapTrailSpaces :1; // see above
- UINT32 fMapPrintTextColor :1; // see above
- UINT32 fNoColumnBalance :1; // see above
- UINT32 fConvMailMergeEsc :1; // see above
- UINT32 fSupressTopSpacing :1; // see above
- UINT32 fOrigWordTableRules :1; // see above
- UINT32 fTransparentMetafiles :1; // see above
- UINT32 fShowBreaksInFrames :1; // see above
- UINT32 fSwapBordersFacingPgs :1; // see above
- UINT32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
- UINT32 fExpShRtn :1; // #i78591# and #i56856#
- UINT32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
- UINT32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
+ sal_uInt32 fNoTabForInd :1; // see above in compatability options
+ sal_uInt32 fNoSpaceRaiseLower :1; // see above
+ sal_uInt32 fSupressSpbfAfterPageBreak :1; // see above
+ sal_uInt32 fWrapTrailSpaces :1; // see above
+ sal_uInt32 fMapPrintTextColor :1; // see above
+ sal_uInt32 fNoColumnBalance :1; // see above
+ sal_uInt32 fConvMailMergeEsc :1; // see above
+ sal_uInt32 fSupressTopSpacing :1; // see above
+ sal_uInt32 fOrigWordTableRules :1; // see above
+ sal_uInt32 fTransparentMetafiles :1; // see above
+ sal_uInt32 fShowBreaksInFrames :1; // see above
+ sal_uInt32 fSwapBordersFacingPgs :1; // see above
+ sal_uInt32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
+ sal_uInt32 fExpShRtn :1; // #i78591# and #i56856#
+ sal_uInt32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
+ sal_uInt32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
// of page like MacWord 5.x
- UINT32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
- UINT32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
- UINT32 fNoLeading :1; // Don't add extra spacebetween rows of text
- UINT32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
- UINT32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
- UINT32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
- UINT32 fUsePrinterMetrics : 1; //The magic option
+ sal_uInt32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
+ sal_uInt32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
+ sal_uInt32 fNoLeading :1; // Don't add extra spacebetween rows of text
+ sal_uInt32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
+ sal_uInt32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
+ sal_uInt32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
+ sal_uInt32 fUsePrinterMetrics : 1; //The magic option
// hier sollte bei nFib <= 105 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib > 105 gehts weiter:
*/
- INT16 adt; // Autoformat Document Type:
+ sal_Int16 adt; // Autoformat Document Type:
// 0 for normal.
// 1 for letter, and
// 2 for email.
WW8DopTypography doptypography; // see WW8STRUC.HXX
WW8_DOGRID dogrid; // see WW8STRUC.HXX
- UINT16 :1; // reserved
- UINT16 lvl :4; // Which outline levels are showing in outline view
- UINT16 :4; // reserved
- UINT16 fHtmlDoc :1; // This file is based upon an HTML file
- UINT16 :1; // reserved
- UINT16 fSnapBorder :1; // Snap table and page borders to page border
- UINT16 fIncludeHeader :1; // Place header inside page border
- UINT16 fIncludeFooter :1; // Place footer inside page border
- UINT16 fForcePageSizePag :1; // Are we in online view
- UINT16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
- UINT16 fHaveVersions :1; // versioning is turned on
- UINT16 fAutoVersion :1; // autoversioning is enabled
- UINT16 : 14; // reserved
+ sal_uInt16 :1; // reserved
+ sal_uInt16 lvl :4; // Which outline levels are showing in outline view
+ sal_uInt16 :4; // reserved
+ sal_uInt16 fHtmlDoc :1; // This file is based upon an HTML file
+ sal_uInt16 :1; // reserved
+ sal_uInt16 fSnapBorder :1; // Snap table and page borders to page border
+ sal_uInt16 fIncludeHeader :1; // Place header inside page border
+ sal_uInt16 fIncludeFooter :1; // Place footer inside page border
+ sal_uInt16 fForcePageSizePag :1; // Are we in online view
+ sal_uInt16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
+ sal_uInt16 fHaveVersions :1; // versioning is turned on
+ sal_uInt16 fAutoVersion :1; // autoversioning is enabled
+ sal_uInt16 : 14; // reserved
// Skip 12 Bytes here: ASUMI
- INT32 cChWS;
- INT32 cChWSFtnEdn;
- INT32 grfDocEvents;
+ sal_Int32 cChWS;
+ sal_Int32 cChWSFtnEdn;
+ sal_Int32 grfDocEvents;
// Skip 4+30+8 Bytes here
- INT32 cDBC;
- INT32 cDBCFtnEdn;
+ sal_Int32 cDBC;
+ sal_Int32 cDBCFtnEdn;
// Skip 4 Bytes here
- INT16 nfcFtnRef;
- INT16 nfcEdnRef;
- INT16 hpsZoonFontPag;
- INT16 dywDispPag;
-
- UINT32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
- UINT32 fDontUseHTMLAutoSpacing:1;
- UINT32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
-
- UINT16 fUnknown3:15;
- UINT16 fUseBackGroundInAllmodes:1;
-
- UINT16 fDoNotEmbedSystemFont:1;
- UINT16 fWordCompat:1;
- UINT16 fLiveRecover:1;
- UINT16 fEmbedFactoids:1;
- UINT16 fFactoidXML:1;
- UINT16 fFactoidAllDone:1;
- UINT16 fFolioPrint:1;
- UINT16 fReverseFolio:1;
- UINT16 iTextLineEnding:3;
- UINT16 fHideFcc:1;
- UINT16 fAcetateShowMarkup:1;
- UINT16 fAcetateShowAtn:1;
- UINT16 fAcetateShowInsDel:1;
- UINT16 fAcetateShowProps:1;
+ sal_Int16 nfcFtnRef;
+ sal_Int16 nfcEdnRef;
+ sal_Int16 hpsZoonFontPag;
+ sal_Int16 dywDispPag;
+
+ sal_uInt32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
+ sal_uInt32 fDontUseHTMLAutoSpacing:1;
+ sal_uInt32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
+
+ sal_uInt16 fUnknown3:15;
+ sal_uInt16 fUseBackGroundInAllmodes:1;
+
+ sal_uInt16 fDoNotEmbedSystemFont:1;
+ sal_uInt16 fWordCompat:1;
+ sal_uInt16 fLiveRecover:1;
+ sal_uInt16 fEmbedFactoids:1;
+ sal_uInt16 fFactoidXML:1;
+ sal_uInt16 fFactoidAllDone:1;
+ sal_uInt16 fFolioPrint:1;
+ sal_uInt16 fReverseFolio:1;
+ sal_uInt16 iTextLineEnding:3;
+ sal_uInt16 fHideFcc:1;
+ sal_uInt16 fAcetateShowMarkup:1;
+ sal_uInt16 fAcetateShowAtn:1;
+ sal_uInt16 fAcetateShowInsDel:1;
+ sal_uInt16 fAcetateShowProps:1;
// 2. Initialisier-Dummy:
- BYTE nDataEnd;
+ sal_uInt8 nDataEnd;
bool bUseThaiLineBreakingRules;
/* Constructor for importing, needs to know the version of word used */
- WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize);
+ WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize);
/* Constructs default DOP suitable for exporting */
WW8Dop();
bool Write(SvStream& rStrm, WW8Fib& rFib) const;
public:
- UINT32 GetCompatabilityOptions() const;
- void SetCompatabilityOptions(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions() const;
+ void SetCompatabilityOptions(sal_uInt32 a32Bit);
// i#78591#
- UINT32 GetCompatabilityOptions2() const;
- void SetCompatabilityOptions2(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions2() const;
+ void SetCompatabilityOptions2(sal_uInt32 a32Bit);
};
class WW8PLCF_HdFt
@@ -1763,22 +1763,22 @@ private:
short nIdxOffset;
public:
WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop );
- bool GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart, long& rLen);
+ bool GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart, long& rLen);
bool GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen);
- void UpdateIndex( BYTE grpfIhdt );
+ void UpdateIndex( sal_uInt8 grpfIhdt );
};
void SwapQuotesInField(String &rFmt);
Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize);
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx);
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx);
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm);
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm);
//MS has a (slightly) inaccurate view of how many twips
//are in the default letter size of a page
-const USHORT lLetterWidth = 12242;
-const USHORT lLetterHeight = 15842;
+const sal_uInt16 lLetterWidth = 12242;
+const sal_uInt16 lLetterHeight = 15842;
#endif
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 5d943b80a759..7f2e7ab55ea4 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -45,19 +45,19 @@
# pragma pack(2)
#endif
-inline void Set_UInt8( BYTE *& p, UINT8 n )
+inline void Set_UInt8( sal_uInt8 *& p, sal_uInt8 n )
{
ByteToSVBT8( n, *(SVBT8*)p );
p+= 1;
}
-inline void Set_UInt16( BYTE *& p, UINT16 n )
+inline void Set_UInt16( sal_uInt8 *& p, sal_uInt16 n )
{
ShortToSVBT16( n, *(SVBT16*)p );
p+= 2;
}
-inline void Set_UInt32( BYTE *& p, UINT32 n )
+inline void Set_UInt32( sal_uInt8 *& p, sal_uInt32 n )
{
UInt32ToSVBT32( n, *(SVBT32*)p );
p+= 4;
@@ -177,26 +177,26 @@ const WW8_CP WW8_CP_MAX = SAL_MAX_INT32;
struct WW8_STD
{
// Base part of STD:
- UINT16 sti : 12; // invariant style identifier
- UINT16 fScratch : 1; // spare field for any temporary use,
+ sal_uInt16 sti : 12; // invariant style identifier
+ sal_uInt16 fScratch : 1; // spare field for any temporary use,
// always reset back to zero!
- UINT16 fInvalHeight : 1; // PHEs of all text with this style are wrong
- UINT16 fHasUpe : 1; // UPEs have been generated
- UINT16 fMassCopy : 1; // std has been mass-copied; if unused at
+ sal_uInt16 fInvalHeight : 1; // PHEs of all text with this style are wrong
+ sal_uInt16 fHasUpe : 1; // UPEs have been generated
+ sal_uInt16 fMassCopy : 1; // std has been mass-copied; if unused at
// save time, style should be deleted
- UINT16 sgc : 4; // style type code
- UINT16 istdBase : 12; // base style
- UINT16 cupx : 4; // # of UPXs (and UPEs)
- UINT16 istdNext : 12; // next style
- UINT16 bchUpe; // offset to end of upx's, start of upe's
+ sal_uInt16 sgc : 4; // style type code
+ sal_uInt16 istdBase : 12; // base style
+ sal_uInt16 cupx : 4; // # of UPXs (and UPEs)
+ sal_uInt16 istdNext : 12; // next style
+ sal_uInt16 bchUpe; // offset to end of upx's, start of upe's
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- UINT16 fAutoRedef : 1; /* auto redefine style when appropriate */
- UINT16 fHidden : 1; /* hidden from UI? */
- UINT16 : 14; /* unused bits */
+ sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
+ sal_uInt16 fHidden : 1; /* hidden from UI? */
+ sal_uInt16 : 14; /* unused bits */
// Variable length part of STD:
- // UINT8 stzName[2]; /* sub-names are separated by chDelimStyle
+ // sal_uInt8 stzName[2]; /* sub-names are separated by chDelimStyle
// char grupx[];
// the UPEs are not stored on the file; they are a cache of the based-on
// chain
@@ -208,17 +208,17 @@ struct WW8_STD
struct WW8_FFN_BASE // Font Descriptor
{
// ab Ver6
- BYTE cbFfnM1; // 0x0 total length of FFN - 1.
+ sal_uInt8 cbFfnM1; // 0x0 total length of FFN - 1.
- BYTE prg: 2; // 0x1:03 pitch request
- BYTE fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
+ sal_uInt8 prg: 2; // 0x1:03 pitch request
+ sal_uInt8 fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
// 0x1:08 reserved
- BYTE ff : 3; // 0x1:70 font family id
+ sal_uInt8 ff : 3; // 0x1:70 font family id
// 0x1:80 reserved
short wWeight; // 0x2 base weight of font
- BYTE chs; // 0x4 character set identifier
- BYTE ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
+ sal_uInt8 chs; // 0x4 character set identifier
+ sal_uInt8 ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
};
/** Hiermit arbeiten wir im Parser (und Dumper)
@@ -240,14 +240,14 @@ struct WW8_FFN : public WW8_FFN_BASE
struct WW8_BRCVer6 // alter Border Code
{
SVBT16 aBits1;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
};
@@ -256,14 +256,14 @@ class WW8_BRC // Border Code
public:
SVBT16 aBits1;
SVBT16 aBits2;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
WW8_BRC()
{
@@ -271,7 +271,7 @@ public:
memset(aBits2, 0, sizeof(aBits2));
}
short DetermineBorderProperties (bool bVer67, short *pSpace=0,
- BYTE *pCol=0, short *pIdx=0) const;
+ sal_uInt8 *pCol=0, short *pIdx=0) const;
bool IsEmpty(bool bVer67) const;
bool IsZeroed(bool bVer67) const;
bool IsBlank() const;
@@ -287,9 +287,9 @@ enum BRC_Sides
class WW8_BordersSO // for StarOffice-Border Code
{
public:
- USHORT mnOut;
- USHORT mnIn;
- USHORT mnDist;
+ sal_uInt16 mnOut;
+ sal_uInt16 mnIn;
+ sal_uInt16 mnDist;
SvxBorderStyle mnType;
public:
enum eBorderCode
@@ -310,24 +310,24 @@ and are accessible through the Typography tab of the Tools/Options dialog.
class WW8DopTypography
{
public:
- void ReadFromMem(BYTE *&pData);
- void WriteToMem(BYTE *&pData) const;
+ void ReadFromMem(sal_uInt8 *&pData);
+ void WriteToMem(sal_uInt8 *&pData) const;
//Maps what I think is the language this is to affect to the OOo language
- USHORT GetConvertedLang() const;
+ sal_uInt16 GetConvertedLang() const;
- UINT16 fKerningPunct : 1; // true if we're kerning punctuation
- UINT16 iJustification : 2; // Kinsoku method of justification:
+ sal_uInt16 fKerningPunct : 1; // true if we're kerning punctuation
+ sal_uInt16 iJustification : 2; // Kinsoku method of justification:
// 0 = always expand
// 1 = compress punctuation
// 2 = compress punctuation and kana.
- UINT16 iLevelOfKinsoku : 2; // Level of Kinsoku:
+ sal_uInt16 iLevelOfKinsoku : 2; // Level of Kinsoku:
// 0 = Level 1
// 1 = Level 2
// 2 = Custom
- UINT16 f2on1 : 1; // 2-page-on-1 feature is turned on.
- UINT16 reserved1 : 4; // in 97 its marked as reserved BUT
- UINT16 reserved2 : 6; // reserved ?
+ sal_uInt16 f2on1 : 1; // 2-page-on-1 feature is turned on.
+ sal_uInt16 reserved1 : 4; // in 97 its marked as reserved BUT
+ sal_uInt16 reserved2 : 6; // reserved ?
//we find that the following applies,
//2 == Japanese
//4 == Chinese (VR...
@@ -342,8 +342,8 @@ public:
static const sal_Unicode * GetJapanNotBeginLevel1();
static const sal_Unicode * GetJapanNotEndLevel1();
- INT16 cchFollowingPunct; // length of rgxchFPunct
- INT16 cchLeadingPunct; // length of rgxchLPunct
+ sal_Int16 cchFollowingPunct; // length of rgxchFPunct
+ sal_Int16 cchLeadingPunct; // length of rgxchLPunct
// array of characters that should never appear at the start of a line
sal_Unicode rgxchFPunct[nMaxFollowing];
@@ -381,39 +381,39 @@ struct WW8_DOGRID
struct WW8_PIC
{
- INT32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- UINT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
+ sal_Int32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
+ sal_uInt16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
struct {
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int
- INT16 yExt; // 0xa int
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int
+ sal_Int16 yExt; // 0xa int
+ sal_Int16 hMF; // 0xc int
}MFP;
-// BYTE bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
- BYTE rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
+// sal_uInt8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
+ sal_uInt8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
// and extents when metafile is stored -- ignored if 0
- INT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- INT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- UINT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
- UINT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
- INT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
- INT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
- INT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
- INT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- INT16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
- INT16 fFrameEmpty : 1; // 0010 picture consists of a single frame
- INT16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
- INT16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
- INT16 fError : 1; // 0080 ==1, when picture is just an error message
- INT16 bpp : 8; // FF00 bits per pixel, 0 = unknown
+ sal_Int16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
+ sal_Int16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
+ sal_uInt16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
+ sal_uInt16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
+ sal_Int16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
+ sal_Int16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
+ sal_Int16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
+ sal_Int16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
+ sal_Int16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
+ sal_Int16 fFrameEmpty : 1; // 0010 picture consists of a single frame
+ sal_Int16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
+ sal_Int16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
+ sal_Int16 fError : 1; // 0080 ==1, when picture is just an error message
+ sal_Int16 bpp : 8; // FF00 bits per pixel, 0 = unknown
WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
// BRC brcBottom; // 0x32 specification for border below picture
// BRC brcRight; // 0x34 specification for border to the right
- INT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
- INT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
-// BYTE rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
+ sal_Int16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
+ sal_Int16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
+// sal_uInt8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
struct WW8_PIC_SHADOW
@@ -453,26 +453,26 @@ struct WW8_PIC_SHADOW
struct WW8_TBD
{
SVBT8 aBits1;
-// BYTE jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
-// BYTE tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
+// sal_uInt8 jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
+// sal_uInt8 tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
// * int :2 C0 reserved
};
struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend dem Ver8-Format)
{
- BYTE bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
- BYTE bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
- BYTE bVertical : 1;// set to 1 when cell has vertical text flow
- BYTE bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
- BYTE bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
- BYTE bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
- BYTE bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
- BYTE nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
+ sal_uInt8 bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+ sal_uInt8 bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
+ sal_uInt8 bVertical : 1;// set to 1 when cell has vertical text flow
+ sal_uInt8 bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
+ sal_uInt8 bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
+ sal_uInt8 bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
+ sal_uInt8 bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
+ sal_uInt8 nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
// 0 top
// 1 center
// 2 bottom
- UINT16 fUnused : 7;// reserved - nicht loeschen: macht das UINT16 voll !!
+ sal_uInt16 fUnused : 7;// reserved - nicht loeschen: macht das sal_uInt16 voll !!
WW8_BRC rgbrc[4]; // border codes
//notational convenience for referring to brcTop, brcLeft, etc fields.
@@ -488,9 +488,9 @@ struct WW8_TCellVer6 // wird aus der Datei gelesen
{
SVBT8 aBits1Ver6;
SVBT8 aBits2Ver6;
-// UINT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
-// UINT16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
-// UINT16 fUnused : 14; // FFFC reserved
+// sal_uInt16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+// sal_uInt16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
+// sal_uInt16 fUnused : 14; // FFFC reserved
WW8_BRCVer6 rgbrcVer6[4];
// notational convenience for referring to brcTop, brcLeft, etc fields:
// BRC brcTop; // specification of the top border of a table cell
@@ -512,36 +512,36 @@ struct WW8_TCellVer8 // wird aus der Datei gelesen
struct WW8_SHD // struct SHD fehlt in der Beschreibung
{
private:
- UINT16 maBits;
-// UINT16 nFore : 5; // 0x001f ForegroundColor
-// UINT16 nBack : 5; // 0x03e0 BackgroundColor
-// UINT16 nStyle : 5; // 0x7c00 Percentage and Style
-// UINT16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
+ sal_uInt16 maBits;
+// sal_uInt16 nFore : 5; // 0x001f ForegroundColor
+// sal_uInt16 nBack : 5; // 0x03e0 BackgroundColor
+// sal_uInt16 nStyle : 5; // 0x7c00 Percentage and Style
+// sal_uInt16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
public:
WW8_SHD() : maBits(0) {}
- BYTE GetFore() const { return (BYTE)( maBits & 0x1f); }
- BYTE GetBack() const { return (BYTE)((maBits >> 5 ) & 0x1f); }
- BYTE GetStyle(bool bVer67) const
- { return (BYTE)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
+ sal_uInt8 GetFore() const { return (sal_uInt8)( maBits & 0x1f); }
+ sal_uInt8 GetBack() const { return (sal_uInt8)((maBits >> 5 ) & 0x1f); }
+ sal_uInt8 GetStyle(bool bVer67) const
+ { return (sal_uInt8)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
- UINT16 GetValue() const { return maBits; }
+ sal_uInt16 GetValue() const { return maBits; }
- void SetValue(UINT16 nVal) { maBits = nVal; }
+ void SetValue(sal_uInt16 nVal) { maBits = nVal; }
void SetWWValue(SVBT16 nVal) { maBits = SVBT16ToShort(nVal); }
- void SetFore(BYTE nVal)
+ void SetFore(sal_uInt8 nVal)
{
maBits &= 0xffe0;
maBits |= (nVal & 0x1f);
}
- void SetBack(BYTE nVal)
+ void SetBack(sal_uInt8 nVal)
{
maBits &= 0xfc1f;
maBits |= (nVal & 0x1f) << 5;
}
- void SetStyle(bool bVer67, BYTE nVal)
+ void SetStyle(bool bVer67, sal_uInt8 nVal)
{
if (bVer67)
{
@@ -563,29 +563,29 @@ struct WW8_ANLV
SVBT8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
SVBT8 cbTextAfter; // 2
SVBT8 aBits1;
-// BYTE jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
-// BYTE fPrev : 1; // 0x04 when ==1, include previous levels
-// BYTE fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
-// BYTE fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
-// BYTE fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
-// BYTE fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
-// BYTE fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
+// sal_uInt8 jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
+// sal_uInt8 fPrev : 1; // 0x04 when ==1, include previous levels
+// sal_uInt8 fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
+// sal_uInt8 fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
+// sal_uInt8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
+// sal_uInt8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
+// sal_uInt8 fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
SVBT8 aBits2;
-// BYTE fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
-// BYTE fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
-// BYTE fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
-// BYTE fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
-// BYTE fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
-// BYTE fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
-// BYTE fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
-// BYTE fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
+// sal_uInt8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
+// sal_uInt8 fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
+// sal_uInt8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
+// sal_uInt8 fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
+// sal_uInt8 fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
+// sal_uInt8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
+// sal_uInt8 fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
+// sal_uInt8 fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
SVBT8 aBits3;
-// BYTE kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
-// BYTE ico : 5; // 0xF1 color of autonumber
+// sal_uInt8 kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
+// sal_uInt8 ico : 5; // 0xF1 color of autonumber
SVBT16 ftc; // 6 font code of autonumber
SVBT16 hps; // 8 font half point size (or 0=auto)
SVBT16 iStartAt; // 0x0a starting value (0 to 65535)
- SVBT16 dxaIndent; // 0x0c *short?* *USHORT?* width of prefix text (same as indent)
+ SVBT16 dxaIndent; // 0x0c *short?* *sal_uInt16?* width of prefix text (same as indent)
SVBT16 dxaSpace; // 0x0e minimum space between number and paragraph
};
// *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex).
@@ -597,7 +597,7 @@ struct WW8_ANLD
SVBT8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
SVBT8 fRestartHdn; // 0x12 restart heading number on section boundary
SVBT8 fSpareX; // 0x13 unused( should be 0)
- BYTE rgchAnld[32]; // 0x14 characters displayed before/after autonumber
+ sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber
};
struct WW8_OLST
@@ -607,7 +607,7 @@ struct WW8_OLST
SVBT8 fSpareOlst2; // 0x91 reserved
SVBT8 fSpareOlst3; // 0x92 reserved
SVBT8 fSpareOlst4; // 0x93 reserved
- BYTE rgch[64]; // 0x94 array of 64 chars text before/after number
+ sal_uInt8 rgch[64]; // 0x94 array of 64 chars text before/after number
};
// cbOLST is 212(decimal), D4(hex).
@@ -625,8 +625,8 @@ struct WW8_DO
SVBT8 by; // 5 y position relative to anchor CP
SVBT16 dhgt; // 6 height of DO
SVBT16 aBits1;
-// UINT16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
-// BYTE[] rgdp; // 0xa variable length array of drawing primitives
+// sal_uInt16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
+// sal_uInt8[] rgdp; // 0xa variable length array of drawing primitives
};
struct WW8_DPHEAD
@@ -668,16 +668,16 @@ struct WW8_DP_FILL
struct WW8_DP_LINEEND
{
SVBT16 aStartBits;
-// UINT16 eppsStart : 2; // Start EndPoint Property Style
+// sal_uInt16 eppsStart : 2; // Start EndPoint Property Style
// 0=None, 1=Hollow, 2=Filled
-// UINT16 eppwStart : 2; // Start EndPoint Property Weight
-// UINT16 epplStart : 2; // Start EndPoint Property length
-// UINT16 dummyStart : 10; // Alignment
+// sal_uInt16 eppwStart : 2; // Start EndPoint Property Weight
+// sal_uInt16 epplStart : 2; // Start EndPoint Property length
+// sal_uInt16 dummyStart : 10; // Alignment
SVBT16 aEndBits;
-// UINT16 eppsEnd : 2; // End EndPoint Property Style
-// UINT16 eppwEnd : 2; // End EndPoint Property Weight
-// UINT16 epplEnd : 2; // End EndPoint Property length
-// UINT16 dummyEnd : 10; // Alignment
+// sal_uInt16 eppsEnd : 2; // End EndPoint Property Style
+// sal_uInt16 eppwEnd : 2; // End EndPoint Property Weight
+// sal_uInt16 epplEnd : 2; // End EndPoint Property length
+// sal_uInt16 dummyEnd : 10; // Alignment
};
struct WW8_DP_LINE
@@ -698,8 +698,8 @@ struct WW8_DP_TXTBOX
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
SVBT16 dzaInternalMargin; // 0x26 REVIEW davebu
};
@@ -709,8 +709,8 @@ struct WW8_DP_RECT
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
};
struct WW8_DP_ARC
@@ -720,8 +720,8 @@ struct WW8_DP_ARC
WW8_DP_SHADOW aShd;
SVBT8 fLeft; // 0x24 00ff REVIEW davebu
SVBT8 fUp; // 0x24 ff00 REVIEW davebu
-// UINT16 fLeft : 8; // 0x24 00ff REVIEW davebu
-// UINT16 fUp : 8; // 0x24 ff00 REVIEW davebu
+// sal_uInt16 fLeft : 8; // 0x24 00ff REVIEW davebu
+// sal_uInt16 fUp : 8; // 0x24 ff00 REVIEW davebu
};
struct WW8_DP_ELIPSE
@@ -738,8 +738,8 @@ struct WW8_DP_POLYLINE
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
-// UINT16 cpt : 15; // 0x28 00fe count of points
+// sal_uInt16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
+// sal_uInt16 cpt : 15; // 0x28 00fe count of points
// short xaFirst; // 0x2a These are the endpoints of the first line.
// short yaFirst; // 0x2c
// short xaEnd; // 0x2e
@@ -762,9 +762,9 @@ struct WW8_DP_CALLOUT_TXTBOX
struct WW8_PCD
{
SVBT8 aBits1;
-// BYTE fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
-// BYTE fPaphNil : 1; // used internally by Word
-// BYTE fCopied : 1; // used internally by Word
+// sal_uInt8 fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
+// sal_uInt8 fPaphNil : 1; // used internally by Word
+// sal_uInt8 fCopied : 1; // used internally by Word
// * int :5
SVBT8 aBits2; // fn int:8, used internally by Word
SVBT32 fc; // file offset of beginning of piece. The size of the
@@ -815,14 +815,14 @@ struct WW67_ATRD // fuer die 6/7-Version
struct WW8_TablePos
{
- INT16 nSp26;
- INT16 nSp27;
- INT16 nLeMgn;
- INT16 nRiMgn;
- INT16 nUpMgn;
- INT16 nLoMgn;
- BYTE nSp29;
- BYTE nSp37;
+ sal_Int16 nSp26;
+ sal_Int16 nSp27;
+ sal_Int16 nLeMgn;
+ sal_Int16 nRiMgn;
+ sal_Int16 nUpMgn;
+ sal_Int16 nLoMgn;
+ sal_uInt8 nSp29;
+ sal_uInt8 nSp37;
};
struct WW8_FSPA