summaryrefslogtreecommitdiff
path: root/starmath
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
commit5bd7c9930824d7b58adb9cd16a3d07a0f22bc2e1 (patch)
treea860d6c23e951105a63b990acfdb68c1084fc2d9 /starmath
parent1b63b7c2cb9ea29579c5982cce2aa0ac69093c24 (diff)
parent9510db0d3678e8eff2d8607ff2f07daff45011c2 (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 'starmath')
-rw-r--r--starmath/inc/applicat.hxx31
-rw-r--r--starmath/inc/config.hxx2
-rw-r--r--starmath/inc/cursor.hxx2
-rwxr-xr-x[-rw-r--r--]starmath/inc/dialog.hxx47
-rwxr-xr-x[-rw-r--r--]starmath/inc/document.hxx51
-rw-r--r--starmath/inc/edit.hxx4
-rw-r--r--starmath/inc/format.hxx34
-rw-r--r--starmath/inc/helpids.h326
-rw-r--r--starmath/inc/node.hxx107
-rwxr-xr-x[-rw-r--r--]starmath/inc/parse.hxx91
-rw-r--r--starmath/inc/rect.hxx12
-rw-r--r--starmath/inc/smcommands.h68
-rw-r--r--starmath/inc/smdll.hxx2
-rw-r--r--starmath/inc/smmod.hxx11
-rwxr-xr-x[-rw-r--r--]starmath/inc/starmath.hrc319
-rw-r--r--starmath/inc/symbol.hxx10
-rw-r--r--starmath/inc/toolbox.hxx18
-rw-r--r--starmath/inc/unomodel.hxx2
-rw-r--r--starmath/inc/utility.hxx36
-rw-r--r--starmath/inc/view.hxx32
-rw-r--r--starmath/prj/build.lst2
-rw-r--r--starmath/prj/d.lst2
-rw-r--r--starmath/qa/unoapi/knownissues.xcl3
-rwxr-xr-x[-rw-r--r--]starmath/sdi/smath.sdi4
-rwxr-xr-x[-rw-r--r--]starmath/sdi/smslots.sdi2
-rw-r--r--starmath/source/accessibility.cxx102
-rw-r--r--starmath/source/accessibility.hxx60
-rw-r--r--starmath/source/cfgitem.cxx225
-rw-r--r--starmath/source/cfgitem.hxx31
-rwxr-xr-x[-rw-r--r--]starmath/source/config.cxx25
-rw-r--r--starmath/source/cursor.cxx36
-rw-r--r--starmath/source/detreg.cxx23
-rwxr-xr-x[-rw-r--r--]starmath/source/dialog.cxx246
-rwxr-xr-x[-rw-r--r--]starmath/source/dialog.hrc9
-rwxr-xr-x[-rw-r--r--]starmath/source/document.cxx104
-rw-r--r--starmath/source/edit.cxx22
-rw-r--r--starmath/source/format.cxx18
-rwxr-xr-x[-rw-r--r--]starmath/source/makefile.mk20
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlexport.cxx30
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlimport.cxx128
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlimport.hxx14
-rw-r--r--starmath/source/mathtype.cxx46
-rw-r--r--starmath/source/mathtype.hxx4
-rw-r--r--starmath/source/menu_tmpl.src160
-rw-r--r--starmath/source/node.cxx255
-rw-r--r--starmath/source/parse.cxx995
-rw-r--r--starmath/source/rect.cxx6
-rw-r--r--starmath/source/register.cxx86
-rw-r--r--starmath/source/smdetect.cxx28
-rwxr-xr-x[-rw-r--r--]starmath/source/smmod.cxx39
-rw-r--r--starmath/source/smres.src1904
-rw-r--r--starmath/source/symbol.cxx17
-rw-r--r--starmath/source/toolbox.cxx123
-rwxr-xr-x[-rw-r--r--]starmath/source/toolbox.hrc14
-rwxr-xr-xstarmath/source/toolbox.src1777
-rw-r--r--starmath/source/unomodel.cxx79
-rw-r--r--starmath/source/utility.cxx20
-rw-r--r--starmath/source/view.cxx127
-rw-r--r--starmath/source/visitors.cxx14
-rwxr-xr-x[-rw-r--r--]starmath/uiconfig/smath/menubar/menubar.xml2
-rw-r--r--starmath/util/hidother.src3
-rw-r--r--starmath/util/makefile.mk17
-rw-r--r--starmath/util/sm.component61
-rw-r--r--starmath/util/smd.component34
64 files changed, 4153 insertions, 3969 deletions
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx
index e23290682c..5876937de2 100644
--- a/starmath/inc/applicat.hxx
+++ b/starmath/inc/applicat.hxx
@@ -38,10 +38,6 @@ class SvxErrorHandler;
#define APPLICATIONNAME "smath3"
-#ifdef WIN
-#define RELEASE "WIN304"
-#endif
-
#ifdef PM2
#define RELEASE "PM304"
#endif
@@ -58,7 +54,7 @@ class SvxErrorHandler;
class SmResId : public ResId
{
public:
- SmResId(USHORT nId) :
+ SmResId(sal_uInt16 nId) :
ResId(nId)
{
}
@@ -67,31 +63,6 @@ public:
#endif
-#ifndef _DLL_
-class SmDLL;
-
-class SmApplicat: public SfxApplication
-{
-protected:
- SvxErrorHandler *pSvxErrorHandler;
-
- virtual void OpenClients();
-
- // initialization / deinitialization
- virtual void Init();
- virtual void Exit();
-
-public:
- void Main();
-
- SmApplicat() :
- SfxApplication("iso")
- {
- }
-
-};
-
-#endif
#endif
diff --git a/starmath/inc/config.hxx b/starmath/inc/config.hxx
index 2c225ea818..b6f5242124 100644
--- a/starmath/inc/config.hxx
+++ b/starmath/inc/config.hxx
@@ -48,7 +48,7 @@ public:
SmConfig();
virtual ~SmConfig();
- SmFontPickList & GetFontPickList(USHORT nIdent) { return vFontPickList[nIdent]; }
+ SmFontPickList & GetFontPickList(sal_uInt16 nIdent) { return vFontPickList[nIdent]; }
void ItemSetToConfig(const SfxItemSet &rSet);
void ConfigToItemSet(SfxItemSet &rSet) const;
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index b5fbd13e28..0de8931673 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -145,7 +145,7 @@ public:
void InsertElement(SmFormulaElement element);
/** Insert a command specified in commands.src*/
- void InsertCommand(USHORT nCommand);
+ void InsertCommand(sal_uInt16 nCommand);
/** Insert command text translated into line entries at position
*
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index e1f9acc6a6..db161d662f 100644..100755
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -70,10 +70,11 @@ class SmPrintOptionsTabPage : public SfxTabPage
MetricField aZoom;
FixedLine aFixedLine3;
CheckBox aNoRightSpaces;
+ CheckBox aSaveOnlyUsedSymbols;
DECL_LINK(SizeButtonClickHdl, Button *);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
public:
@@ -201,22 +202,22 @@ class SmCategoryDesc : public Resource
XubString Name;
XubString *Strings[4];
Bitmap *Graphics[4]; /* regular bitmaps */
- USHORT Minimum[4];
- USHORT Maximum[4];
- USHORT Value[4];
+ sal_uInt16 Minimum[4];
+ sal_uInt16 Maximum[4];
+ sal_uInt16 Value[4];
public:
- SmCategoryDesc(const ResId &rResId, USHORT nCategoryIdx);
+ SmCategoryDesc(const ResId &rResId, sal_uInt16 nCategoryIdx);
~SmCategoryDesc();
const XubString & GetName() const { return Name; }
- const XubString * GetString(USHORT Index) const { return Strings[Index]; }
- USHORT GetMinimum(USHORT Index) { return Minimum[Index]; }
- USHORT GetMaximum(USHORT Index) { return Maximum[Index]; }
- USHORT GetValue(USHORT Index) const { return Value[Index]; }
- void SetValue(USHORT Index, USHORT nVal) { Value[Index] = nVal;}
+ const XubString * GetString(sal_uInt16 Index) const { return Strings[Index]; }
+ sal_uInt16 GetMinimum(sal_uInt16 Index) { return Minimum[Index]; }
+ sal_uInt16 GetMaximum(sal_uInt16 Index) { return Maximum[Index]; }
+ sal_uInt16 GetValue(sal_uInt16 Index) const { return Value[Index]; }
+ void SetValue(sal_uInt16 Index, sal_uInt16 nVal) { Value[Index] = nVal;}
- const Bitmap * GetGraphic(USHORT Index) const
+ const Bitmap * GetGraphic(sal_uInt16 Index) const
{
return Graphics[Index];
}
@@ -242,7 +243,7 @@ class SmDistanceDialog : public ModalDialog
FixedLine aFixedLine;
SmCategoryDesc *Categories[NOCATEGORIES];
- USHORT nActiveCategory;
+ sal_uInt16 nActiveCategory;
bool bScaleAllBrackets;
DECL_LINK(GetFocusHdl, Control *);
@@ -251,8 +252,8 @@ class SmDistanceDialog : public ModalDialog
DECL_LINK(CheckBoxClickHdl, CheckBox *);
using Window::SetHelpId;
- void SetHelpId(MetricField &rField, ULONG nHelpId);
- void SetCategory(USHORT Category);
+ void SetHelpId(MetricField &rField, const rtl::OString& sHelpId);
+ void SetCategory(sal_uInt16 Category);
public:
SmDistanceDialog(Window *pParent, bool bFreeRes = true);
@@ -297,9 +298,9 @@ class SmShowSymbolSet : public Control
Size aOutputSize;
Link aSelectHdlLink;
Link aDblClickHdlLink;
- USHORT nLen;
- USHORT nRows, nColumns;
- USHORT nSelectSymbol;
+ sal_uInt16 nLen;
+ sal_uInt16 nRows, nColumns;
+ sal_uInt16 nSelectSymbol;
virtual void Paint(const Rectangle&);
virtual void MouseButtonDown(const MouseEvent& rMEvt);
@@ -312,8 +313,8 @@ public:
void SetSymbolSet(const SymbolPtrVec_t& rSymbolSet);
- void SelectSymbol(USHORT nSymbol);
- USHORT GetSelectSymbol() const { return nSelectSymbol; }
+ void SelectSymbol(sal_uInt16 nSymbol);
+ sal_uInt16 GetSelectSymbol() const { return nSelectSymbol; }
void SetSelectHdl(const Link& rLink) { aSelectHdlLink = rLink; }
void SetDblClickHdl(const Link& rLink) { aDblClickHdlLink = rLink; }
@@ -379,8 +380,8 @@ public:
virtual ~SmSymbolDialog();
bool SelectSymbolSet(const XubString &rSymbolSetName);
- void SelectSymbol(USHORT nSymbolPos);
- USHORT GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); }
+ void SelectSymbol(sal_uInt16 nSymbolPos);
+ sal_uInt16 GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); }
};
////////////////////////////////////////////////////////////////////////////////
@@ -395,8 +396,8 @@ public:
{
}
- void SetChar(xub_Unicode aChar);
- void SetFont(const Font &rFont);
+ void SetSymbol( const SmSym *pSym );
+ void SetSymbol( sal_UCS4 cChar, const Font &rFont );
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 847da63b72..9635998030 100644..100755
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -31,19 +31,21 @@
#define SMDLL 1
-#include <sot/storage.hxx>
-#include <sot/sotref.hxx>
+#include <rtl/ustring.hxx>
+#include <sfx2/docfac.hxx>
#include <sfx2/objsh.hxx>
+#include <sot/sotref.hxx>
+#include <sot/storage.hxx>
#include <svl/lstner.hxx>
-#include <sfx2/docfac.hxx>
+#include <vcl/jobset.hxx>
#include <vcl/virdev.hxx>
+#include <set>
+
#include "format.hxx"
#include "parse.hxx"
#include "smmod.hxx"
-#include <vcl/jobset.hxx>
-
class SmNode;
class SfxMenuBarManager;
class SfxPrinter;
@@ -52,15 +54,15 @@ class SmCursor;
#define HINT_DATACHANGED 1004
-#define SM30BIDENT ((ULONG)0x534D3033L)
-#define SM30IDENT ((ULONG)0x30334d53L)
-#define SM304AIDENT ((ULONG)0x34303330L)
-#define SM30VERSION ((ULONG)0x00010000L)
+#define SM30BIDENT ((sal_uLong)0x534D3033L)
+#define SM30IDENT ((sal_uLong)0x30334d53L)
+#define SM304AIDENT ((sal_uLong)0x34303330L)
+#define SM30VERSION ((sal_uLong)0x00010000L)
#define SM50VERSION ((ULONG)0x00010001L) //Difference to SM30VERSION is
//the new border in the format.
-#define FRMIDENT ((ULONG)0x03031963L)
-#define FRMVERSION ((ULONG)0x00010001L)
+#define FRMIDENT ((sal_uLong)0x03031963L)
+#define FRMVERSION ((sal_uLong)0x00010001L)
#define STAROFFICE_XML "StarOffice XML (Math)"
#define MATHML_XML "MathML XML (Math)"
@@ -124,9 +126,10 @@ class SmDocShell : public SfxObjectShell, public SfxListener
nRightBorder,
nTopBorder,
nBottomBorder;
- USHORT nModifyCount;
+ sal_uInt16 nModifyCount;
bool bIsFormulaArranged;
SmCursor *pCursor;
+ std::set< rtl::OUString > aUsedSymbols; // to export used symbols only when saving
@@ -137,7 +140,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
virtual void Draw(OutputDevice *pDevice,
const JobSetup & rSetup,
- USHORT nAspect = ASPECT_CONTENT);
+ sal_uInt16 nAspect = ASPECT_CONTENT);
virtual void FillClass(SvGlobalName* pClassName,
sal_uInt32* pFormat,
@@ -147,16 +150,16 @@ class SmDocShell : public SfxObjectShell, public SfxListener
sal_Int32 nFileFormat,
sal_Bool bTemplate = sal_False ) const;
- virtual BOOL SetData( const String& rData );
- virtual ULONG GetMiscStatus() const;
+ virtual sal_Bool SetData( const String& rData );
+ virtual sal_uLong GetMiscStatus() const;
virtual void OnDocumentPrinterChanged( Printer * );
virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
- virtual BOOL Load( SfxMedium& rMedium );
+ virtual sal_Bool Load( SfxMedium& rMedium );
void ImplSave( SvStorageStreamRef xStrm );
- virtual BOOL Save();
- virtual BOOL SaveAs( SfxMedium& rMedium );
- virtual BOOL ConvertTo( SfxMedium &rMedium );
- virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ virtual sal_Bool Save();
+ virtual sal_Bool SaveAs( SfxMedium& rMedium );
+ virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
Printer *GetPrt();
OutputDevice* GetRefDev();
@@ -164,7 +167,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
bool IsFormulaArranged() const { return bIsFormulaArranged; }
void SetFormulaArranged(bool bVal) { bIsFormulaArranged = bVal; }
- virtual BOOL ConvertFrom(SfxMedium &rMedium);
+ virtual sal_Bool ConvertFrom(SfxMedium &rMedium);
/** Called whenever the formula is changed
* Deletes the current cursor
@@ -208,6 +211,8 @@ public:
const SmNode * GetFormulaTree() const { return pTree; }
void SetFormulaTree(SmNode *&rTree) { pTree = rTree; }
+ const std::set< rtl::OUString > & GetUsedSymbols() const { return aUsedSymbols; }
+
String GetAccessibleText();
EditEngine & GetEditEngine();
@@ -218,7 +223,7 @@ public:
void Repaint();
- virtual SfxUndoManager *GetUndoManager ();
+ virtual ::svl::IUndoManager *GetUndoManager ();
virtual SfxItemPool& GetPool() const;
@@ -226,7 +231,7 @@ public:
void GetState(SfxItemSet &);
virtual void SetVisArea (const Rectangle & rVisArea);
- virtual void SetModified(BOOL bModified);
+ virtual void SetModified(sal_Bool bModified);
/** Get a cursor for modifying this document
* @remarks Don't store this reference, a new cursor may be made...
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index ff99a82935..84097bc992 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -50,7 +50,7 @@ class CommandEvent;
/**************************************************************************/
void SmGetLeftSelectionPart(const ESelection &rSelection,
- USHORT &nPara, USHORT &nPos);
+ sal_uInt16 &nPara, sal_uInt16 &nPos);
/**************************************************************************/
@@ -123,7 +123,7 @@ public:
void Delete();
void SelectAll();
void InsertText(const String &rText);
- void InsertCommand(USHORT nCommand);
+ void InsertCommand(sal_uInt16 nCommand);
void MarkError(const Point &rPos);
void SelNextMark();
void SelPrevMark();
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index 3027c61deb..c3d58fd6cc 100644
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -35,7 +35,7 @@
#include <types.hxx>
-#define SM_FMT_VERSION_51 ((BYTE) 0x01)
+#define SM_FMT_VERSION_51 ((sal_uInt8) 0x01)
#define SM_FMT_VERSION_NOW SM_FMT_VERSION_51
#define FNTNAME_TIMES "Times New Roman"
@@ -99,7 +99,7 @@
enum SmHorAlign { AlignLeft, AlignCenter, AlignRight };
-String GetDefaultFontName( LanguageType nLang, USHORT nIdent );
+String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent );
class SmFormat : public SfxBroadcaster
{
@@ -107,10 +107,10 @@ class SmFormat : public SfxBroadcaster
bool bDefaultFont[FNT_END + 1];
Size aBaseSize;
long nVersion;
- USHORT vSize[SIZ_END + 1];
- USHORT vDist[DIS_END + 1];
+ sal_uInt16 vSize[SIZ_END + 1];
+ sal_uInt16 vDist[DIS_END + 1];
SmHorAlign eHorAlign;
- INT16 nGreekCharStyle;
+ sal_Int16 nGreekCharStyle;
bool bIsTextmode,
bScaleNormalBrackets;
@@ -121,27 +121,27 @@ public:
const Size & GetBaseSize() const { return aBaseSize; }
void SetBaseSize(const Size &rSize) { aBaseSize = rSize; }
- const SmFace & GetFont(USHORT nIdent) const { return vFont[nIdent]; }
- void SetFont(USHORT nIdent, const SmFace &rFont, bool bDefault = false);
- void SetFontSize(USHORT nIdent, const Size &rSize) { vFont[nIdent].SetSize( rSize ); }
+ const SmFace & GetFont(sal_uInt16 nIdent) const { return vFont[nIdent]; }
+ void SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault = false);
+ void SetFontSize(sal_uInt16 nIdent, const Size &rSize) { vFont[nIdent].SetSize( rSize ); }
- void SetDefaultFont(USHORT nIdent, bool bVal) { bDefaultFont[nIdent] = bVal; }
- bool IsDefaultFont(USHORT nIdent) const { return bDefaultFont[nIdent]; }
+ void SetDefaultFont(sal_uInt16 nIdent, bool bVal) { bDefaultFont[nIdent] = bVal; }
+ bool IsDefaultFont(sal_uInt16 nIdent) const { return bDefaultFont[nIdent]; }
- USHORT GetRelSize(USHORT nIdent) const { return vSize[nIdent]; }
- void SetRelSize(USHORT nIdent, USHORT nVal) { vSize[nIdent] = nVal;}
+ sal_uInt16 GetRelSize(sal_uInt16 nIdent) const { return vSize[nIdent]; }
+ void SetRelSize(sal_uInt16 nIdent, sal_uInt16 nVal) { vSize[nIdent] = nVal;}
- USHORT GetDistance(USHORT nIdent) const { return vDist[nIdent]; }
- void SetDistance(USHORT nIdent, USHORT nVal) { vDist[nIdent] = nVal; }
+ sal_uInt16 GetDistance(sal_uInt16 nIdent) const { return vDist[nIdent]; }
+ void SetDistance(sal_uInt16 nIdent, sal_uInt16 nVal) { vDist[nIdent] = nVal; }
SmHorAlign GetHorAlign() const { return eHorAlign; }
void SetHorAlign(SmHorAlign eAlign) { eHorAlign = eAlign; }
bool IsTextmode() const { return bIsTextmode; }
void SetTextmode(bool bVal) { bIsTextmode = bVal; }
-
- INT16 GetGreekCharStyle() const { return nGreekCharStyle; }
- void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; }
+
+ sal_Int16 GetGreekCharStyle() const { return nGreekCharStyle; }
+ void SetGreekCharStyle(sal_Int16 nVal) { nGreekCharStyle = nVal; }
bool IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
void SetScaleNormalBrackets(bool bVal) { bScaleNormalBrackets = bVal; }
diff --git a/starmath/inc/helpids.h b/starmath/inc/helpids.h
new file mode 100644
index 0000000000..f27b47edcd
--- /dev/null
+++ b/starmath/inc/helpids.h
@@ -0,0 +1,326 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef STARMATH_HELPIDS_H
+#define STARMATH_HELPIDS_H
+
+#define HID_SMA_OPTIONSDIALOG "STARMATH_HID_SMA_OPTIONSDIALOG"
+#define HID_SMA_FONTDIALOG "STARMATH_HID_SMA_FONTDIALOG"
+#define HID_SMA_FONTSIZEDIALOG "STARMATH_HID_SMA_FONTSIZEDIALOG"
+#define HID_SMA_FONTTYPEDIALOG "STARMATH_HID_SMA_FONTTYPEDIALOG"
+#define HID_SMA_DISTANCEDIALOG "STARMATH_HID_SMA_DISTANCEDIALOG"
+#define HID_SMA_ALIGNDIALOG "STARMATH_HID_SMA_ALIGNDIALOG"
+#define HID_SMA_PRINTOPTIONPAGE "STARMATH_HID_SMA_PRINTOPTIONPAGE"
+#define HID_SMA_SYMBOLDIALOG "STARMATH_HID_SMA_SYMBOLDIALOG"
+#define HID_SMA_SYMDEFINEDIALOG "STARMATH_HID_SMA_SYMDEFINEDIALOG"
+#define HID_SMA_EXTRAOPTIONPAGE "STARMATH_HID_SMA_EXTRAOPTIONPAGE"
+#define HID_SMA_DOCSAVEQUERY "STARMATH_HID_SMA_DOCSAVEQUERY"
+#define HID_SMA_OBJECTSAVEQUERY "STARMATH_HID_SMA_OBJECTSAVEQUERY"
+#define HID_SMA_DEFAULTSAVEQUERY "STARMATH_HID_SMA_DEFAULTSAVEQUERY"
+#define HID_SMA_ILLEGALOBJECTERROR "STARMATH_HID_SMA_ILLEGALOBJECTERROR"
+#define HID_SMA_ILLEGALFILEERROR "STARMATH_HID_SMA_ILLEGALFILEERROR"
+#define HID_SMA_WRITESYMBOLERROR "STARMATH_HID_SMA_WRITESYMBOLERROR"
+#define HID_SMA_READSYMBOLERROR "STARMATH_HID_SMA_READSYMBOLERROR"
+#define HID_SMA_NOMATHTYPEFACEWARNING "STARMATH_HID_SMA_NOMATHTYPEFACEWARNING"
+#define HID_SMA_OBJECTNAME "STARMATH_HID_SMA_OBJECTNAME"
+#define HID_SMA_VIEWNAME "STARMATH_HID_SMA_VIEWNAME"
+#define HID_SMA_UNDOEDITNAME "STARMATH_HID_SMA_UNDOEDITNAME"
+#define HID_SMA_UNDOFORMATNAME "STARMATH_HID_SMA_UNDOFORMATNAME"
+#define HID_SMA_APPICO "STARMATH_HID_SMA_APPICO"
+#define HID_SMA_DOCICO "STARMATH_HID_SMA_DOCICO"
+#define HID_SMA_TMPICO "STARMATH_HID_SMA_TMPICO"
+#define HID_SMA_COMMANDMENU "STARMATH_HID_SMA_COMMANDMENU"
+#define HID_SMA_VIEWMENU "STARMATH_HID_SMA_VIEWMENU"
+#define HID_SMA_DISTANCEMENU "STARMATH_HID_SMA_DISTANCEMENU"
+#define HID_SMA_FONTMENU "STARMATH_HID_SMA_FONTMENU"
+#define HID_SMA_STARTUPWINDOW "STARMATH_HID_SMA_STARTUPWINDOW"
+#define HID_SMA_TOOLBOXWINDOW "STARMATH_HID_SMA_TOOLBOXWINDOW"
+#define HID_SMA_CMDBOXWINDOW "STARMATH_HID_SMA_CMDBOXWINDOW"
+#define HID_SMA_UPDATEOBJECT "STARMATH_HID_SMA_UPDATEOBJECT"
+#define HID_SMA_FONTREGULAR "STARMATH_HID_SMA_FONTREGULAR"
+#define HID_SMA_FONTITALIC "STARMATH_HID_SMA_FONTITALIC"
+#define HID_SMA_FONTBOLD "STARMATH_HID_SMA_FONTBOLD"
+#define HID_SMA_PRINTOPTION "STARMATH_HID_SMA_PRINTOPTION"
+#define HID_SMA_DOCUMENTSTR "STARMATH_HID_SMA_DOCUMENTSTR"
+#define HID_SMA_SYMBOLFILESSTR "STARMATH_HID_SMA_SYMBOLFILESSTR"
+#define HID_SMA_ALLFILESSTR "STARMATH_HID_SMA_ALLFILESSTR"
+#define HID_SMA_CREATORSTR "STARMATH_HID_SMA_CREATORSTR"
+#define HID_SMA_FILESMFTYP "STARMATH_HID_SMA_FILESMFTYP"
+#define HID_SMA_FILESYMTYP "STARMATH_HID_SMA_FILESYMTYP"
+#define HID_SMA_WIN_DOCUMENT "STARMATH_HID_SMA_WIN_DOCUMENT"
+#define HID_SMA_COMMAND_WIN_EDIT "STARMATH_HID_SMA_COMMAND_WIN_EDIT"
+
+#define HID_SMA_PLUSX "STARMATH_HID_SMA_PLUSX"
+#define HID_SMA_MINUSX "STARMATH_HID_SMA_MINUSX"
+#define HID_SMA_PLUSMINUSX "STARMATH_HID_SMA_PLUSMINUSX"
+#define HID_SMA_MINUSPLUSX "STARMATH_HID_SMA_MINUSPLUSX"
+#define HID_SMA_NEGX "STARMATH_HID_SMA_NEGX"
+#define HID_SMA_XPLUSY "STARMATH_HID_SMA_XPLUSY"
+#define HID_SMA_XMINUSY "STARMATH_HID_SMA_XMINUSY"
+#define HID_SMA_XCDOTY "STARMATH_HID_SMA_XCDOTY"
+#define HID_SMA_XTIMESY "STARMATH_HID_SMA_XTIMESY"
+#define HID_SMA_XSYMTIMESY "STARMATH_HID_SMA_XSYMTIMESY"
+#define HID_SMA_XSYMDIVIDEY "STARMATH_HID_SMA_XSYMDIVIDEY"
+#define HID_SMA_XDIVY "STARMATH_HID_SMA_XDIVY"
+#define HID_SMA_XOVERY "STARMATH_HID_SMA_XOVERY"
+#define HID_SMA_XODIVIDEY "STARMATH_HID_SMA_XODIVIDEY"
+#define HID_SMA_XODOTY "STARMATH_HID_SMA_XODOTY"
+#define HID_SMA_XOMINUSY "STARMATH_HID_SMA_XOMINUSY"
+#define HID_SMA_XOPLUSY "STARMATH_HID_SMA_XOPLUSY"
+#define HID_SMA_XOTIMESY "STARMATH_HID_SMA_XOTIMESY"
+#define HID_SMA_XANDY "STARMATH_HID_SMA_XANDY"
+#define HID_SMA_XORY "STARMATH_HID_SMA_XORY"
+#define HID_SMA_XEQY "STARMATH_HID_SMA_XEQY"
+#define HID_SMA_XNEQY "STARMATH_HID_SMA_XNEQY"
+#define HID_SMA_XLTY "STARMATH_HID_SMA_XLTY"
+#define HID_SMA_XGTY "STARMATH_HID_SMA_XGTY"
+#define HID_SMA_XLEY "STARMATH_HID_SMA_XLEY"
+#define HID_SMA_XGEY "STARMATH_HID_SMA_XGEY"
+#define HID_SMA_XLESLANTY "STARMATH_HID_SMA_XLESLANTY"
+#define HID_SMA_XGESLANTY "STARMATH_HID_SMA_XGESLANTY"
+#define HID_SMA_XLLY "STARMATH_HID_SMA_XLLY"
+#define HID_SMA_XGGY "STARMATH_HID_SMA_XGGY"
+#define HID_SMA_XDEFY "STARMATH_HID_SMA_XDEFY"
+#define HID_SMA_XEQUIVY "STARMATH_HID_SMA_XEQUIVY"
+#define HID_SMA_XAPPROXY "STARMATH_HID_SMA_XAPPROXY"
+#define HID_SMA_XSIMY "STARMATH_HID_SMA_XSIMY"
+#define HID_SMA_XSIMEQY "STARMATH_HID_SMA_XSIMEQY"
+#define HID_SMA_XPROPY "STARMATH_HID_SMA_XPROPY"
+#define HID_SMA_XORTHOY "STARMATH_HID_SMA_XORTHOY"
+#define HID_SMA_XPARALLELY "STARMATH_HID_SMA_XPARALLELY"
+#define HID_SMA_XTOWARDY "STARMATH_HID_SMA_XTOWARDY"
+#define HID_SMA_XTRANSLY "STARMATH_HID_SMA_XTRANSLY"
+#define HID_SMA_XTRANSRY "STARMATH_HID_SMA_XTRANSRY"
+#define HID_SMA_XINY "STARMATH_HID_SMA_XINY"
+#define HID_SMA_XNOTINY "STARMATH_HID_SMA_XNOTINY"
+#define HID_SMA_XOWNSY "STARMATH_HID_SMA_XOWNSY"
+#define HID_SMA_XUNIONY "STARMATH_HID_SMA_XUNIONY"
+#define HID_SMA_XINTERSECTIONY "STARMATH_HID_SMA_XINTERSECTIONY"
+#define HID_SMA_XSETMINUSY "STARMATH_HID_SMA_XSETMINUSY"
+#define HID_SMA_XSLASHY "STARMATH_HID_SMA_XSLASHY"
+#define HID_SMA_XSUBSETY "STARMATH_HID_SMA_XSUBSETY"
+#define HID_SMA_XSUBSETEQY "STARMATH_HID_SMA_XSUBSETEQY"
+#define HID_SMA_XSUPSETY "STARMATH_HID_SMA_XSUPSETY"
+#define HID_SMA_XSUPSETEQY "STARMATH_HID_SMA_XSUPSETEQY"
+#define HID_SMA_XNSUBSETY "STARMATH_HID_SMA_XNSUBSETY"
+#define HID_SMA_XNSUBSETEQY "STARMATH_HID_SMA_XNSUBSETEQY"
+#define HID_SMA_XNSUPSETY "STARMATH_HID_SMA_XNSUPSETY"
+#define HID_SMA_XNSUPSETEQY "STARMATH_HID_SMA_XNSUPSETEQY"
+#define HID_SMA_ABSX "STARMATH_HID_SMA_ABSX"
+#define HID_SMA_FACTX "STARMATH_HID_SMA_FACTX"
+#define HID_SMA_SQRTX "STARMATH_HID_SMA_SQRTX"
+#define HID_SMA_NROOTXY "STARMATH_HID_SMA_NROOTXY"
+#define HID_SMA_EX "STARMATH_HID_SMA_EX"
+#define HID_SMA_EXPX "STARMATH_HID_SMA_EXPX"
+#define HID_SMA_LNX "STARMATH_HID_SMA_LNX"
+#define HID_SMA_LOGX "STARMATH_HID_SMA_LOGX"
+#define HID_SMA_SINX "STARMATH_HID_SMA_SINX"
+#define HID_SMA_COSX "STARMATH_HID_SMA_COSX"
+#define HID_SMA_TANX "STARMATH_HID_SMA_TANX"
+#define HID_SMA_COTX "STARMATH_HID_SMA_COTX"
+#define HID_SMA_ARCSINX "STARMATH_HID_SMA_ARCSINX"
+#define HID_SMA_ARCCOSX "STARMATH_HID_SMA_ARCCOSX"
+#define HID_SMA_ARCTANX "STARMATH_HID_SMA_ARCTANX"
+#define HID_SMA_ARCCOTX "STARMATH_HID_SMA_ARCCOTX"
+#define HID_SMA_SINHX "STARMATH_HID_SMA_SINHX"
+#define HID_SMA_COSHX "STARMATH_HID_SMA_COSHX"
+#define HID_SMA_TANHX "STARMATH_HID_SMA_TANHX"
+#define HID_SMA_COTHX "STARMATH_HID_SMA_COTHX"
+#define HID_SMA_ARSINHX "STARMATH_HID_SMA_ARSINHX"
+#define HID_SMA_ARCOSHX "STARMATH_HID_SMA_ARCOSHX"
+#define HID_SMA_ARTANHX "STARMATH_HID_SMA_ARTANHX"
+#define HID_SMA_ARCOTHX "STARMATH_HID_SMA_ARCOTHX"
+#define HID_SMA_SUMX "STARMATH_HID_SMA_SUMX"
+#define HID_SMA_PRODX "STARMATH_HID_SMA_PRODX"
+#define HID_SMA_COPRODX "STARMATH_HID_SMA_COPRODX"
+#define HID_SMA_LIMX "STARMATH_HID_SMA_LIMX"
+#define HID_SMA_LIMINFX "STARMATH_HID_SMA_LIMINFX"
+#define HID_SMA_LIMSUPX "STARMATH_HID_SMA_LIMSUPX"
+#define HID_SMA_EXISTS "STARMATH_HID_SMA_EXISTS"
+#define HID_SMA_FORALL "STARMATH_HID_SMA_FORALL"
+#define HID_SMA_NABLA "STARMATH_HID_SMA_NABLA"
+#define HID_SMA_INTX "STARMATH_HID_SMA_INTX"
+#define HID_SMA_IINTX "STARMATH_HID_SMA_IINTX"
+#define HID_SMA_IIINTX "STARMATH_HID_SMA_IIINTX"
+#define HID_SMA_LINTX "STARMATH_HID_SMA_LINTX"
+#define HID_SMA_LLINTX "STARMATH_HID_SMA_LLINTX"
+#define HID_SMA_LLLINTX "STARMATH_HID_SMA_LLLINTX"
+#define HID_SMA_FROMX "STARMATH_HID_SMA_FROMX"
+#define HID_SMA_TOX "STARMATH_HID_SMA_TOX"
+#define HID_SMA_FROMXTOY "STARMATH_HID_SMA_FROMXTOY"
+#define HID_SMA_XCIRCY "STARMATH_HID_SMA_XCIRCY"
+#define HID_SMA_XDIVIDESY "STARMATH_HID_SMA_XDIVIDESY"
+#define HID_SMA_XNDIVIDESY "STARMATH_HID_SMA_XNDIVIDESY"
+#define HID_SMA_DLARROW "STARMATH_HID_SMA_DLARROW"
+#define HID_SMA_DLRARROW "STARMATH_HID_SMA_DLRARROW"
+#define HID_SMA_DRARROW "STARMATH_HID_SMA_DRARROW"
+
+#define HID_SMA_MISC_CAT "STARMATH_HID_SMA_MISC_CAT"
+#define HID_SMA_UNBINOPS_CAT "STARMATH_HID_SMA_UNBINOPS_CAT"
+#define HID_SMA_RELATIONS_CAT "STARMATH_HID_SMA_RELATIONS_CAT"
+#define HID_SMA_SETOPERATIONS_CAT "STARMATH_HID_SMA_SETOPERATIONS_CAT"
+#define HID_SMA_FUNCTIONS_CAT "STARMATH_HID_SMA_FUNCTIONS_CAT"
+#define HID_SMA_OPERATORS_CAT "STARMATH_HID_SMA_OPERATORS_CAT"
+#define HID_SMA_ATTRIBUTES_CAT "STARMATH_HID_SMA_ATTRIBUTES_CAT"
+#define HID_SMA_BRACKETS_CAT "STARMATH_HID_SMA_BRACKETS_CAT"
+#define HID_SMA_FORMAT_CAT "STARMATH_HID_SMA_FORMAT_CAT"
+
+#define HID_SMA_OPERATOR_WIN "STARMATH_HID_SMA_OPERATOR_WIN"
+#define HID_SMA_UNBINOPS_TBX "STARMATH_HID_SMA_UNBINOPS_TBX"
+#define HID_SMA_RELATIONS_TBX "STARMATH_HID_SMA_RELATIONS_TBX"
+#define HID_SMA_SETOPERATIONS_TBX "STARMATH_HID_SMA_SETOPERATIONS_TBX"
+#define HID_SMA_FUNCTIONS_TBX "STARMATH_HID_SMA_FUNCTIONS_TBX"
+#define HID_SMA_OPERATORS_TBX "STARMATH_HID_SMA_OPERATORS_TBX"
+#define HID_SMA_ATTRIBUTES_TBX "STARMATH_HID_SMA_ATTRIBUTES_TBX"
+#define HID_SMA_BRACKETS_TBX "STARMATH_HID_SMA_BRACKETS_TBX"
+#define HID_SMA_FORMAT_TBX "STARMATH_HID_SMA_FORMAT_TBX"
+#define HID_SMA_SELECTION_TBX "STARMATH_HID_SMA_SELECTION_TBX"
+#define HID_SMA_COMMAND_WIN "STARMATH_HID_SMA_COMMAND_WIN"
+#define HID_SMA_MISC_MENU "STARMATH_HID_SMA_MISC_MENU"
+#define HID_SMA_FUNCTIONSOTHER1_MENU "STARMATH_HID_SMA_FUNCTIONSOTHER1_MENU"
+
+#define HID_SMA_ACUTEX "STARMATH_HID_SMA_ACUTEX"
+#define HID_SMA_BARX "STARMATH_HID_SMA_BARX"
+#define HID_SMA_BREVEX "STARMATH_HID_SMA_BREVEX"
+#define HID_SMA_CHECKX "STARMATH_HID_SMA_CHECKX"
+#define HID_SMA_CIRCLEX "STARMATH_HID_SMA_CIRCLEX"
+#define HID_SMA_DOTX "STARMATH_HID_SMA_DOTX"
+#define HID_SMA_DDOTX "STARMATH_HID_SMA_DDOTX"
+#define HID_SMA_DDDOTX "STARMATH_HID_SMA_DDDOTX"
+#define HID_SMA_GRAVEX "STARMATH_HID_SMA_GRAVEX"
+#define HID_SMA_HATX "STARMATH_HID_SMA_HATX"
+#define HID_SMA_TILDEX "STARMATH_HID_SMA_TILDEX"
+#define HID_SMA_VECX "STARMATH_HID_SMA_VECX"
+#define HID_SMA_UNDERLINEX "STARMATH_HID_SMA_UNDERLINEX"
+#define HID_SMA_OVERLINEX "STARMATH_HID_SMA_OVERLINEX"
+#define HID_SMA_OVERSTRIKEX "STARMATH_HID_SMA_OVERSTRIKEX"
+#define HID_SMA_PHANTOMX "STARMATH_HID_SMA_PHANTOMX"
+#define HID_SMA_BOLDX "STARMATH_HID_SMA_BOLDX"
+#define HID_SMA_ITALX "STARMATH_HID_SMA_ITALX"
+#define HID_SMA_SIZEXY "STARMATH_HID_SMA_SIZEXY"
+#define HID_SMA_FONTXY "STARMATH_HID_SMA_FONTXY"
+#define HID_SMA_COLORX "STARMATH_HID_SMA_COLORX"
+#define HID_SMA_LRGROUPX "STARMATH_HID_SMA_LRGROUPX"
+#define HID_SMA_LRPARENTX "STARMATH_HID_SMA_LRPARENTX"
+#define HID_SMA_LRBRACKETX "STARMATH_HID_SMA_LRBRACKETX"
+#define HID_SMA_LRBRACEX "STARMATH_HID_SMA_LRBRACEX"
+#define HID_SMA_LRANGLEX "STARMATH_HID_SMA_LRANGLEX"
+#define HID_SMA_LRCEILX "STARMATH_HID_SMA_LRCEILX"
+#define HID_SMA_LRFLOORX "STARMATH_HID_SMA_LRFLOORX"
+#define HID_SMA_LRLINEX "STARMATH_HID_SMA_LRLINEX"
+#define HID_SMA_LRDLINEX "STARMATH_HID_SMA_LRDLINEX"
+#define HID_SMA_SLRPARENTX "STARMATH_HID_SMA_SLRPARENTX"
+#define HID_SMA_SLRBRACKETX "STARMATH_HID_SMA_SLRBRACKETX"
+#define HID_SMA_SLRBRACEX "STARMATH_HID_SMA_SLRBRACEX"
+#define HID_SMA_SLRANGLEX "STARMATH_HID_SMA_SLRANGLEX"
+#define HID_SMA_SLRCEILX "STARMATH_HID_SMA_SLRCEILX"
+#define HID_SMA_SLRFLOORX "STARMATH_HID_SMA_SLRFLOORX"
+#define HID_SMA_SLRLINEX "STARMATH_HID_SMA_SLRLINEX"
+#define HID_SMA_SLRDLINEX "STARMATH_HID_SMA_SLRDLINEX"
+#define HID_SMA_RSUBX "STARMATH_HID_SMA_RSUBX"
+#define HID_SMA_RSUPX "STARMATH_HID_SMA_RSUPX"
+#define HID_SMA_LSUBX "STARMATH_HID_SMA_LSUBX"
+#define HID_SMA_LSUPX "STARMATH_HID_SMA_LSUPX"
+#define HID_SMA_SBLANK "STARMATH_HID_SMA_SBLANK"
+#define HID_SMA_BLANK "STARMATH_HID_SMA_BLANK"
+#define HID_SMA_NEWLINE "STARMATH_HID_SMA_NEWLINE"
+#define HID_SMA_BINOMXY "STARMATH_HID_SMA_BINOMXY"
+#define HID_SMA_STACK "STARMATH_HID_SMA_STACK"
+#define HID_SMA_MATRIX "STARMATH_HID_SMA_MATRIX"
+#define HID_SMA_ALIGNLX "STARMATH_HID_SMA_ALIGNLX"
+#define HID_SMA_ALIGNCX "STARMATH_HID_SMA_ALIGNCX"
+#define HID_SMA_ALIGNRX "STARMATH_HID_SMA_ALIGNRX"
+#define HID_SMA_ALEPH "STARMATH_HID_SMA_ALEPH"
+#define HID_SMA_EMPTYSET "STARMATH_HID_SMA_EMPTYSET"
+#define HID_SMA_RE "STARMATH_HID_SMA_RE"
+#define HID_SMA_IM "STARMATH_HID_SMA_IM"
+#define HID_SMA_INFINITY "STARMATH_HID_SMA_INFINITY"
+#define HID_SMA_PARTIAL "STARMATH_HID_SMA_PARTIAL"
+#define HID_SMA_WP "STARMATH_HID_SMA_WP"
+#define HID_SMA_DOTSAXIS "STARMATH_HID_SMA_DOTSAXIS"
+#define HID_SMA_DOTSUP "STARMATH_HID_SMA_DOTSUP"
+#define HID_SMA_DOTSDOWN "STARMATH_HID_SMA_DOTSDOWN"
+#define HID_SMA_DOTSLOW "STARMATH_HID_SMA_DOTSLOW"
+#define HID_SMA_DOTSVERT "STARMATH_HID_SMA_DOTSVERT"
+
+#define HID_SMA_SETN "STARMATH_HID_SMA_SETN"
+#define HID_SMA_SETZ "STARMATH_HID_SMA_SETZ"
+#define HID_SMA_SETQ "STARMATH_HID_SMA_SETQ"
+#define HID_SMA_SETR "STARMATH_HID_SMA_SETR"
+#define HID_SMA_SETC "STARMATH_HID_SMA_SETC"
+#define HID_SMA_WIDEHATX "STARMATH_HID_SMA_WIDEHATX"
+#define HID_SMA_WIDETILDEX "STARMATH_HID_SMA_WIDETILDEX"
+#define HID_SMA_WIDEVECX "STARMATH_HID_SMA_WIDEVECX"
+#define HID_SMA_CSUBX "STARMATH_HID_SMA_CSUBX"
+#define HID_SMA_CSUPX "STARMATH_HID_SMA_CSUPX"
+#define HID_SMA_HBAR "STARMATH_HID_SMA_HBAR"
+#define HID_SMA_LAMBDABAR "STARMATH_HID_SMA_LAMBDABAR"
+#define HID_SMA_LEFTARROW "STARMATH_HID_SMA_LEFTARROW"
+#define HID_SMA_RIGHTARROW "STARMATH_HID_SMA_RIGHTARROW"
+#define HID_SMA_UPARROW "STARMATH_HID_SMA_UPARROW"
+#define HID_SMA_DOWNARROW "STARMATH_HID_SMA_DOWNARROW"
+
+#define HID_SMA_DEFAULT_DIST "STARMATH_HID_SMA_DEFAULT_DIST"
+#define HID_SMA_LINE_DIST "STARMATH_HID_SMA_LINE_DIST"
+#define HID_SMA_ROOT_DIST "STARMATH_HID_SMA_ROOT_DIST"
+#define HID_SMA_SUP_DIST "STARMATH_HID_SMA_SUP_DIST"
+#define HID_SMA_SUB_DIST "STARMATH_HID_SMA_SUB_DIST"
+#define HID_SMA_NUMERATOR_DIST "STARMATH_HID_SMA_NUMERATOR_DIST"
+#define HID_SMA_DENOMINATOR_DIST "STARMATH_HID_SMA_DENOMINATOR_DIST"
+#define HID_SMA_FRACLINE_EXCWIDTH "STARMATH_HID_SMA_FRACLINE_EXCWIDTH"
+#define HID_SMA_FRACLINE_LINEWIDTH "STARMATH_HID_SMA_FRACLINE_LINEWIDTH"
+#define HID_SMA_UPPERLIMIT_DIST "STARMATH_HID_SMA_UPPERLIMIT_DIST"
+#define HID_SMA_LOWERLIMIT_DIST "STARMATH_HID_SMA_LOWERLIMIT_DIST"
+#define HID_SMA_BRACKET_EXCHEIGHT "STARMATH_HID_SMA_BRACKET_EXCHEIGHT"
+#define HID_SMA_BRACKET_DIST "STARMATH_HID_SMA_BRACKET_DIST"
+#define HID_SMA_MATRIXROW_DIST "STARMATH_HID_SMA_MATRIXROW_DIST"
+#define HID_SMA_MATRIXCOL_DIST "STARMATH_HID_SMA_MATRIXCOL_DIST"
+#define HID_SMA_ATTRIBUT_DIST "STARMATH_HID_SMA_ATTRIBUT_DIST"
+#define HID_SMA_INTERATTRIBUT_DIST "STARMATH_HID_SMA_INTERATTRIBUT_DIST"
+#define HID_SMA_OPERATOR_EXCHEIGHT "STARMATH_HID_SMA_OPERATOR_EXCHEIGHT"
+#define HID_SMA_OPERATOR_DIST "STARMATH_HID_SMA_OPERATOR_DIST"
+#define HID_SMA_LEFTBORDER_DIST "STARMATH_HID_SMA_LEFTBORDER_DIST"
+#define HID_SMA_RIGHTBORDER_DIST "STARMATH_HID_SMA_RIGHTBORDER_DIST"
+#define HID_SMA_UPPERBORDER_DIST "STARMATH_HID_SMA_UPPERBORDER_DIST"
+#define HID_SMA_LOWERBORDER_DIST "STARMATH_HID_SMA_LOWERBORDER_DIST"
+#define HID_SMA_SCALE_ALL_BRACKETS "STARMATH_HID_SMA_SCALE_ALL_BRACKETS"
+#define HID_SMA_BRACKET_EXCHEIGHT2 "STARMATH_HID_SMA_BRACKET_EXCHEIGHT2"
+#define HID_SMA_LMRANGLEXY "STARMATH_HID_SMA_LMRANGLEXY"
+#define HID_SMA_SLMRANGLEXY "STARMATH_HID_SMA_SLMRANGLEXY"
+#define HID_SMA_XWIDESLASHY "STARMATH_HID_SMA_XWIDESLASHY"
+#define HID_SMA_XWIDEBSLASHY "STARMATH_HID_SMA_XWIDEBSLASHY"
+#define HID_SMA_XOVERBRACEY "STARMATH_HID_SMA_XOVERBRACEY"
+#define HID_SMA_XUNDERBRACEY "STARMATH_HID_SMA_XUNDERBRACEY"
+#define HID_SMA_LRDBRACKETX "STARMATH_HID_SMA_LRDBRACKETX"
+#define HID_SMA_SLRDBRACKETX "STARMATH_HID_SMA_SLRDBRACKETX"
+
+#define HID_SMA_CONTROL_SYMBOLSET_VIEW "STARMATH_HID_SMA_CONTROL_SYMBOLSET_VIEW"
+#define HID_SMA_CONTROL_FONTCHAR_VIEW "STARMATH_HID_SMA_CONTROL_FONTCHAR_VIEW"
+
+#define HID_SMA_NOSPACE "STARMATH_HID_SMA_NOSPACE"
+
+#endif
+
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 85667b07bb..cb87e95524 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -99,7 +99,7 @@ class SmNode : public SmRect
SmNodeType eType;
SmScaleMode eScaleMode;
RectHorAlign eRectHorAlign;
- USHORT nFlags,
+ sal_uInt16 nFlags,
nAttributes;
bool bIsPhantom,
bIsDebug;
@@ -117,9 +117,9 @@ public:
virtual bool IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
- virtual SmNode * GetSubNode(USHORT nIndex);
- const SmNode * GetSubNode(USHORT nIndex) const
+ virtual sal_uInt16 GetNumSubNodes() const;
+ virtual SmNode * GetSubNode(sal_uInt16 nIndex);
+ const SmNode * GetSubNode(sal_uInt16 nIndex) const
{
return ((SmNode *) this)->GetSubNode(nIndex);
}
@@ -130,22 +130,22 @@ public:
return ((SmNode *) this)->GetLeftMost();
}
- USHORT & Flags() { return nFlags; }
- USHORT & Attributes() { return nAttributes; }
+ sal_uInt16 & Flags() { return nFlags; }
+ sal_uInt16 & Attributes() { return nAttributes; }
bool IsDebug() const { return bIsDebug; }
bool IsPhantom() const { return bIsPhantom; }
void SetPhantom(bool bIsPhantom);
void SetColor(const Color &rColor);
- void SetAttribut(USHORT nAttrib);
- void ClearAttribut(USHORT nAttrib);
+ void SetAttribut(sal_uInt16 nAttrib);
+ void ClearAttribut(sal_uInt16 nAttrib);
const SmFace & GetFont() const { return aFace; };
SmFace & GetFont() { return aFace; };
void SetFont(const SmFace &rFace);
- void SetFontSize(const Fraction &rRelSize, USHORT nType);
+ void SetFontSize(const Fraction &rRelSize, sal_uInt16 nType);
void SetSize(const Fraction &rScale);
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
@@ -170,21 +170,23 @@ public:
sal_Int32 GetAccessibleIndex() const { return nAccIndex; }
const SmNode * FindNodeWithAccessibleIndex(xub_StrLen nAccIndex) const;
- USHORT GetRow() const { return (USHORT)aNodeToken.nRow; }
- USHORT GetColumn() const { return (USHORT)aNodeToken.nCol; }
+ sal_uInt16 GetRow() const { return (sal_uInt16)aNodeToken.nRow; }
+ sal_uInt16 GetColumn() const { return (sal_uInt16)aNodeToken.nCol; }
SmScaleMode GetScaleMode() const { return eScaleMode; }
void SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; }
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
SmNodeType GetType() const { return eType; }
const SmToken & GetToken() const { return aNodeToken; }
- const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const;
+ const SmNode * FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const;
const SmNode * FindRectClosestTo(const Point &rPoint) const;
+ virtual long GetFormulaBaseline() const;
+
/** Accept a visitor
* Calls the method for this class on the visitor
*/
@@ -216,8 +218,8 @@ public:
* Returns -1, if pSubNode isn't a subnode of this.
*/
int IndexOfSubNode(SmNode* pSubNode){
- USHORT nSize = GetNumSubNodes();
- for(USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for(sal_uInt16 i = 0; i < nSize; i++)
if(pSubNode == GetSubNode(i))
return i;
return -1;
@@ -230,8 +232,8 @@ protected:
/** Sets parent on children of this node */
void ClaimPaternity(){
SmNode* pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetParent((SmStructureNode*)this); //Cast is valid if we have children
}
@@ -292,9 +294,9 @@ private:
/** Node whos children we're iterating over */
SmNode* pNode;
/** Size of the node */
- USHORT nSize;
+ sal_uInt16 nSize;
/** Current index in the node */
- USHORT nIndex;
+ sal_uInt16 nIndex;
/** Move reverse */
bool bIsReverse;
};
@@ -321,11 +323,11 @@ public:
virtual bool IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
- void SetNumSubNodes(USHORT nSize) { aSubNodes.resize(nSize); }
+ virtual sal_uInt16 GetNumSubNodes() const;
+ void SetNumSubNodes(sal_uInt16 nSize) { aSubNodes.resize(nSize); }
using SmNode::GetSubNode;
- virtual SmNode * GetSubNode(USHORT nIndex);
+ virtual SmNode * GetSubNode(sal_uInt16 nIndex);
void SetSubNodes(SmNode *pFirst, SmNode *pSecond, SmNode *pThird = NULL);
void SetSubNodes(const SmNodeArray &rNodeArray);
@@ -367,9 +369,9 @@ protected:
public:
virtual bool IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
+ virtual sal_uInt16 GetNumSubNodes() const;
using SmNode::GetSubNode;
- virtual SmNode * GetSubNode(USHORT nIndex);
+ virtual SmNode * GetSubNode(sal_uInt16 nIndex);
};
@@ -404,8 +406,8 @@ public:
: SmGraphicNode(NRECTANGLE, rNodeToken)
{}
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -433,8 +435,8 @@ public:
Size GetToSize() const { return aToSize; }
Polygon &GetPolygon() { return aPoly; }
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -451,7 +453,7 @@ public:
class SmTextNode : public SmVisibleNode
{
XubString aText;
- USHORT nFontDesc;
+ sal_uInt16 nFontDesc;
/** Index within text where the selection starts
* @remarks Only valid if SmNode::IsSelected() is true
*/
@@ -462,12 +464,12 @@ class SmTextNode : public SmVisibleNode
xub_StrLen nSelectionEnd;
protected:
- SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP );
+ SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP );
public:
- SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP );
+ SmTextNode(const SmToken &rNodeToken, sal_uInt16 nFontDescP );
- USHORT GetFontDesc() const { return nFontDesc; }
+ sal_uInt16 GetFontDesc() const { return nFontDesc; }
void SetText(const XubString &rText) { aText = rText; }
const XubString & GetText() const { return aText; }
/** Change the text of this node, including the underlying token */
@@ -516,7 +518,7 @@ class SmSpecialNode : public SmTextNode
bool bIsFromGreekSymbolSet;
protected:
- SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc);
+ SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc);
public:
SmSpecialNode(const SmToken &rNodeToken);
@@ -571,8 +573,8 @@ protected:
public:
SmMathSymbolNode(const SmToken &rNodeToken);
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -591,16 +593,16 @@ public:
*/
class SmRootSymbolNode : public SmMathSymbolNode
{
- ULONG nBodyWidth; // width of body (argument) of root sign
+ sal_uLong nBodyWidth; // width of body (argument) of root sign
public:
SmRootSymbolNode(const SmToken &rNodeToken)
: SmMathSymbolNode(NROOTSYMBOL, rNodeToken)
{}
- ULONG GetBodyWidth() const {return nBodyWidth;};
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ sal_uLong GetBodyWidth() const {return nBodyWidth;};
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nHeight);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
void Accept(SmVisitor* pVisitor);
};
@@ -662,6 +664,7 @@ public:
*/
class SmTableNode : public SmStructureNode
{
+ long nFormulaBaseline;
public:
SmTableNode(const SmToken &rNodeToken)
: SmStructureNode(NTABLE, rNodeToken)
@@ -671,6 +674,8 @@ public:
virtual SmNode * GetLeftMost();
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual long GetFormulaBaseline() const;
+
void Accept(SmVisitor* pVisitor);
};
@@ -941,7 +946,7 @@ public:
/** Get super- or subscript
* @remarks this method may return NULL.
*/
- SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode( sal::static_int_cast< USHORT >(1 + eSubSup) ); };
+ SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode( sal::static_int_cast< sal_uInt16 >(1 + eSubSup) ); };
/** Set the body */
void SetBody(SmNode* pBody) { SetSubNode(0, pBody); }
@@ -1134,7 +1139,7 @@ public:
*/
class SmFontNode : public SmStructureNode
{
- USHORT nSizeType;
+ sal_uInt16 nSizeType;
Fraction aFontSize;
public:
@@ -1145,9 +1150,9 @@ public:
aFontSize = Fraction(1L);
}
- void SetSizeParameter(const Fraction &rValue, USHORT nType);
+ void SetSizeParameter(const Fraction &rValue, sal_uInt16 nType);
const Fraction & GetSizeParameter() const {return aFontSize;}
- const USHORT& GetSizeType() const {return nSizeType;}
+ const sal_uInt16& GetSizeType() const {return nSizeType;}
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -1165,7 +1170,7 @@ public:
*/
class SmMatrixNode : public SmStructureNode
{
- USHORT nNumRows,
+ sal_uInt16 nNumRows,
nNumCols;
public:
@@ -1175,9 +1180,9 @@ public:
nNumRows = nNumCols = 0;
}
- USHORT GetNumRows() const {return nNumRows;}
- USHORT GetNumCols() const {return nNumCols;}
- void SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols);
+ sal_uInt16 GetNumRows() const {return nNumRows;}
+ sal_uInt16 GetNumCols() const {return nNumCols;}
+ void SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols);
using SmNode::GetLeftMost;
virtual SmNode * GetLeftMost();
@@ -1196,7 +1201,7 @@ public:
*/
class SmBlankNode : public SmGraphicNode
{
- USHORT nNum;
+ sal_uInt16 nNum;
public:
SmBlankNode(const SmToken &rNodeToken)
@@ -1207,8 +1212,8 @@ public:
void IncreaseBy(const SmToken &rToken);
void Clear() { nNum = 0; }
- USHORT GetBlankNum() const { return nNum; }
- void SetBlankNum(USHORT nNumber) { nNum = nNumber; }
+ sal_uInt16 GetBlankNum() const { return nNum; }
+ void SetBlankNum(sal_uInt16 nNumber) { nNum = nNumber; }
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index d636724074..aa4a7b54d6 100644..100755
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -33,6 +33,10 @@
#include <tools/stack.hxx>
#include <tools/string.hxx>
+#include <set>
+#include <stack>
+#include <list>
+
#include "types.hxx"
#include <vector>
@@ -40,6 +44,7 @@
class SmNode;
class SmDocShell;
+//////////////////////////////////////////////////////////////////////
// TokenGroups
#define TGOPER 0x00000001
@@ -115,24 +120,25 @@ enum SmTokenType
struct SmToken
{
- // token text
- String aText;
- // token info
- SmTokenType eType;
+
+ String aText; // token text
+ SmTokenType eType; // token info
sal_Unicode cMathChar;
+
// parse-help info
- ULONG nGroup;
- USHORT nLevel;
+ sal_uLong nGroup;
+ sal_uInt16 nLevel;
+
// token position
- USHORT nRow;
- xub_StrLen nCol;
+ sal_uInt16 nRow;
+ xub_StrLen nCol;
SmToken();
SmToken(SmTokenType eTokenType,
sal_Unicode cMath,
const sal_Char* pText,
- ULONG nTokenGroup = 0,
- USHORT nTokenLevel = 0);
+ sal_uLong nTokenGroup = 0,
+ sal_uInt16 nTokenLevel = 0);
};
@@ -159,6 +165,7 @@ struct SmErrorDesc
String Text;
};
+
DECLARE_STACK(SmNodeStack, SmNode *)
typedef ::std::vector< SmErrorDesc* > SmErrDescList;
@@ -179,25 +186,28 @@ struct SmTokenTableEntry
const sal_Char* pIdent;
SmTokenType eType;
sal_Unicode cMathChar;
- ULONG nGroup;
- USHORT nLevel;
+ sal_uLong nGroup;
+ sal_uInt16 nLevel;
};
class SmParser
{
- String BufferString;
- SmToken CurToken;
- SmNodeStack NodeStack;
- SmErrDescList ErrDescList;
- int CurError;
- LanguageType nLang;
- xub_StrLen BufferIndex,
- nTokenIndex;
- USHORT Row,
- ColOff;
- SmConvert eConversion;
+ String m_aBufferString;
+ SmToken m_aCurToken;
+ SmNodeStack m_aNodeStack;
+ SmErrDescList m_aErrDescList;
+ int m_nCurError;
+ LanguageType m_nLang;
+ xub_StrLen m_nBufferIndex,
+ m_nTokenIndex;
+ sal_uInt16 m_Row,
+ m_nColOff;
+ SmConvert m_eConversion;
bool bImportSymNames,
- bExportSymNames;
+ m_bExportSymNames;
+
+ // map of used symbols (used to reduce file size by exporting only actually used symbols)
+ std::set< rtl::OUString > m_aUsedSymbols;
// declare copy-constructor and assignment-operator private
SmParser(const SmParser &);
@@ -208,11 +218,11 @@ protected:
bool IsDelimiter( const String &rTxt, xub_StrLen nPos );
#endif
void NextToken();
- xub_StrLen GetTokenIndex() const { return nTokenIndex; }
- void Insert(const String &rText, USHORT nPos);
- void Replace( USHORT nPos, USHORT nLen, const String &rText );
+ xub_StrLen GetTokenIndex() const { return m_nTokenIndex; }
+ void Insert(const String &rText, sal_uInt16 nPos);
+ void Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText );
- inline bool TokenInGroup(ULONG nGroup);
+ inline bool TokenInGroup( sal_uLong nGroup );
// grammar
void Table();
@@ -221,7 +231,7 @@ protected:
void Relation();
void Sum();
void Product();
- void SubSup(ULONG nActiveGroup);
+ void SubSup(sal_uLong nActiveGroup);
void OpSubSup();
void Power();
void Blank();
@@ -246,11 +256,14 @@ protected:
void GlyphSpecial();
// end of grammar
- LanguageType GetLanguage() const { return nLang; }
- void SetLanguage( LanguageType nNewLang ) { nLang = nNewLang; }
+ LanguageType GetLanguage() const { return m_nLang; }
+ void SetLanguage( LanguageType nNewLang ) { m_nLang = nNewLang; }
void Error(SmParseError Error);
+ void ClearUsedSymbols() { m_aUsedSymbols.clear(); }
+ void AddToUsedSymbols( const String &rSymbolName ) { m_aUsedSymbols.insert( rSymbolName ); }
+
public:
SmParser();
@@ -259,27 +272,29 @@ public:
/** Parse rBuffer to formula subtree that constitutes an expression */
SmNode *ParseExpression(const String &rBuffer);
- const String & GetText() const { return BufferString; };
+ const String & GetText() const { return m_aBufferString; };
- SmConvert GetConversion() const { return eConversion; }
- void SetConversion(SmConvert eConv) { eConversion = eConv; }
+ SmConvert GetConversion() const { return m_eConversion; }
+ void SetConversion(SmConvert eConv) { m_eConversion = eConv; }
bool IsImportSymbolNames() const { return bImportSymNames; }
void SetImportSymbolNames(bool bVal) { bImportSymNames = bVal; }
- bool IsExportSymbolNames() const { return bExportSymNames; }
- void SetExportSymbolNames(bool bVal) { bExportSymNames = bVal; }
+ bool IsExportSymbolNames() const { return m_bExportSymNames; }
+ void SetExportSymbolNames(bool bVal) { m_bExportSymNames = bVal; }
size_t AddError(SmParseError Type, SmNode *pNode);
const SmErrorDesc* NextError();
const SmErrorDesc* PrevError();
const SmErrorDesc* GetError(size_t i = size_t(-1) );
static const SmTokenTableEntry* GetTokenTableEntry( const String &rName );
+ bool IsUsedSymbol( const String &rSymbolName ) const { return m_aUsedSymbols.find( rSymbolName ) != m_aUsedSymbols.end(); }
+ std::set< rtl::OUString > GetUsedSymbols() const { return m_aUsedSymbols; }
};
-inline bool SmParser::TokenInGroup(ULONG nGroup)
+inline bool SmParser::TokenInGroup( sal_uLong nGroup)
{
- return (CurToken.nGroup & nGroup) ? true : false;
+ return (m_aCurToken.nGroup & nGroup) ? true : false;
}
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 9aeee1fa04..29940f3863 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -104,15 +104,15 @@ class SmRect
nItalicRightSpace,
nLoAttrFence,
nHiAttrFence;
- USHORT nBorderWidth;
+ sal_uInt16 nBorderWidth;
bool bHasBaseline,
bHasAlignInfo;
protected:
void BuildRect (const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorderWidth);
+ const XubString &rText, sal_uInt16 nBorderWidth);
void Init(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorderWidth);
+ const XubString &rText, sal_uInt16 nBorderWidth);
void ClearBaseline() { bHasBaseline = false; };
inline void CopyMBL(const SmRect& rRect);
@@ -128,12 +128,12 @@ public:
SmRect(const SmRect &rRect);
- USHORT GetBorderWidth() const { return nBorderWidth; }
+ sal_uInt16 GetBorderWidth() const { return nBorderWidth; }
void SetItalicSpaces(long nLeftSpace, long nRightSpace);
- void SetWidth(ULONG nWidth) { aSize.Width() = nWidth; }
- void SetHeight(ULONG nHeight) { aSize.Height() = nHeight; }
+ void SetWidth(sal_uLong nWidth) { aSize.Width() = nWidth; }
+ void SetHeight(sal_uLong nHeight) { aSize.Height() = nHeight; }
void SetLeft(long nLeft);
void SetRight(long nRight);
diff --git a/starmath/inc/smcommands.h b/starmath/inc/smcommands.h
new file mode 100644
index 0000000000..d2f08c55f4
--- /dev/null
+++ b/starmath/inc/smcommands.h
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SM_SNCOMMANDS_HRC
+#define SM_SMCOMMANDS_HRC
+
+#define CMD_SID_ADJUST ".uno:Adjust"
+#define CMD_SID_ALIGN ".uno:ChangeAlignment"
+#define CMD_SID_DISTANCE ".uno:ChangeDistance"
+#define CMD_SID_FONT ".uno:ChangeFont"
+#define CMD_SID_FONTSIZE ".uno:ChangeFontSize"
+#define CMD_SID_CMDBOXWINDOW ".uno:CommandWindow"
+#define CMD_SID_PREFERENCES ".uno:Preferences"
+#define CMD_SID_TEXT ".uno:ConfigName"
+#define CMD_SID_COPYOBJECT ".uno:CopyObject"
+#define CMD_SID_DRAW ".uno:Draw"
+#define CMD_SID_FITINWINDOW ".uno:FitInWindow"
+#define CMD_SID_FORMULACURSOR ".uno:FormelCursor"
+#define CMD_SID_GAPHIC_SM ".uno:Graphic"
+#define CMD_SID_INSERTCOMMAND ".uno:InsertCommand"
+#define CMD_SID_INSERTTEXT ".uno:InsertConfigName"
+#define CMD_SID_INSERT_FORMULA ".uno:InsertFormula"
+#define CMD_SID_LOADSYMBOLS ".uno:LoadSymbols"
+#define CMD_SID_MODIFYSTATUS ".uno:ModifyStatus"
+#define CMD_SID_NEXTERR ".uno:NextError"
+#define CMD_SID_NEXTMARK ".uno:NextMark"
+#define CMD_SID_PASTEOBJECT ".uno:PasteObject"
+#define CMD_SID_PREVERR ".uno:PrevError"
+#define CMD_SID_PREVMARK ".uno:PrevMark"
+#define CMD_SID_AUTO_REDRAW ".uno:RedrawAutomatic"
+#define CMD_SID_SAVESYMBOLS ".uno:SaveSymbols"
+#define CMD_SID_GETEDITTEXT ".uno:SetPaperSize"
+#define CMD_SID_SYMBOLS_CATALOGUE ".uno:SymbolCatalogue"
+#define CMD_SID_SYMBOLS ".uno:Symbols"
+#define CMD_SID_TEXTMODE ".uno:Textmode"
+#define CMD_SID_TEXTSTATUS ".uno:TextStatus"
+#define CMD_SID_TOOLBOXWINDOW ".uno:ToolBowWindow"
+#define CMD_SID_TOOLBOX ".uno:ToolBox"
+#define CMD_SID_VIEW100 ".uno:View100"
+#define CMD_SID_VIEW200 ".uno:View200"
+#define CMD_SID_VIEW050 ".uno:View50"
+#define CMD_SID_ZOOMIN ".uno:ZoomIn"
+#define CMD_SID_ZOOMOUT ".uno:ZoomOut"
+
+#endif
diff --git a/starmath/inc/smdll.hxx b/starmath/inc/smdll.hxx
index 3c5aefd732..9c5e08d275 100644
--- a/starmath/inc/smdll.hxx
+++ b/starmath/inc/smdll.hxx
@@ -43,7 +43,7 @@ public:
static void Init();
static void Exit();
- static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter,
+ static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter,
SfxFilterFlags nMust, SfxFilterFlags nDont );
};
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index 64f8bfa148..85f053a1b0 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -66,7 +66,7 @@ class VirtualDevice;
class SmResId : public ResId
{
public:
- SmResId(USHORT nId);
+ SmResId(sal_uInt16 nId);
};
class SmNamesArray : public Resource
@@ -77,7 +77,7 @@ class SmNamesArray : public Resource
public:
SmNamesArray( LanguageType nLang, int nRID ) :
Resource( SmResId(RID_LOCALIZED_NAMES) ),
- aNamesAry (SmResId( static_cast < USHORT > ( nRID ))),
+ aNamesAry (SmResId( static_cast < sal_uInt16 > ( nRID ))),
nLanguage (nLang)
{
FreeResource();
@@ -128,7 +128,6 @@ class SmModule : public SfxModule, utl::ConfigurationListener
SvtSysLocale *pSysLocale;
VirtualDevice *pVirtualDev;
- virtual void FillStatusBar(StatusBar &rBar);
void _CreateSysLocale() const;
void _CreateVirtualDev() const;
@@ -167,9 +166,9 @@ public:
}
//virtual methods for options dialog
- virtual SfxItemSet* CreateItemSet( USHORT nId );
- virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
- virtual SfxTabPage* CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet );
+ virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
+ virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
+ virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet );
};
#define SM_MOD() ( *(SmModule**) GetAppData(SHL_SM) )
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index c0e32948f3..1fae02a3d4 100644..100755
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -30,33 +30,34 @@
#include <svl/solar.hrc>
#include <sfx2/sfxsids.hrc>
#include <editeng/memberids.hrc>
+#include "helpids.h"
#define SID_NEXTERR (SID_SMA_START + 1)
#define SID_PREVERR (SID_SMA_START + 2)
#define SID_NEXTMARK (SID_SMA_START + 3)
#define SID_PREVMARK (SID_SMA_START + 4)
-#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5)
+#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5)
#define SID_PREFERENCES (SID_SMA_START + 6)
#define SID_VIEW050 (SID_SMA_START + 7)
#define SID_VIEW100 (SID_SMA_START + 8)
#define SID_VIEW200 (SID_SMA_START + 9)
-#define SID_ZOOMIN (SID_SMA_START + 10)
+#define SID_ZOOMIN (SID_SMA_START + 10)
#define SID_ZOOMOUT (SID_SMA_START + 11)
-#define SID_DRAW (SID_SMA_START + 12)
-#define SID_ADJUST (SID_SMA_START + 13)
+#define SID_DRAW (SID_SMA_START + 12)
+#define SID_ADJUST (SID_SMA_START + 13)
#define SID_TOOLBOX (SID_SMA_START + 14)
#define SID_FORMULACURSOR (SID_SMA_START + 15)
-#define SID_FONT (SID_SMA_START + 50)
+#define SID_FONT (SID_SMA_START + 50)
#define SID_FONTSIZE (SID_SMA_START + 51)
#define SID_DISTANCE (SID_SMA_START + 52)
-#define SID_ALIGN (SID_SMA_START + 53)
+#define SID_ALIGN (SID_SMA_START + 53)
#define SID_AUTO_REDRAW (SID_SMA_START + 55)
#define SID_SYMBOLS (SID_SMA_START + 56) // Has to be picked up again for now!
#define SID_TEXTMODE (SID_SMA_START + 57)
-#define SID_INSERT_FORMULA (SID_SMA_START + 58)
-#define SID_TEXT (SID_SMA_START + 100)
-#define SID_GAPHIC_SM (SID_SMA_START + 101)
+#define SID_IMPORT_FORMULA (SID_SMA_START + 58)
+#define SID_TEXT (SID_SMA_START + 100)
+#define SID_GAPHIC_SM (SID_SMA_START + 101)
#define SID_FITINWINDOW (SID_SMA_START + 103)
/** Command for inserting a symbol specified by a string (Inserts an SmSpecialNode) */
#define SID_INSERTSYMBOL (SID_SMA_START + 104)
@@ -83,10 +84,9 @@
#define SID_CMDBOXWINDOW (SID_SMA_START + 122)
#define SID_TOOLBOXWINDOW (SID_SMA_START + 123)
#define SID_NO_RIGHT_SPACES (SID_SMA_START + 124)
-#define SID_DUMMY (SID_SMA_START + 254)
+#define SID_SAVE_ONLY_USED_SYMBOLS (SID_SMA_START + 125)
+#define SID_DUMMY (SID_SMA_START + 254)
-//#define GID_FORMEL (RID_GROUPS_OFFSET + 1)
-//#define GID_ERROR (RID_GROUPS_OFFSET + 2)
//#define RID_OPTIONSDIALOG (RID_APP_START + 1)
#define RID_FONTDIALOG (RID_APP_START + 2)
@@ -101,7 +101,6 @@
#define RID_PRINTUIOPTIONS (RID_APP_START + 11)
#define RID_MATH_TOOLBOX (RID_APP_START + 50)
-//#define RID_DRAW_OBJECTBAR (RID_APP_START + 51)
#define RID_DEFAULTSAVEQUERY (RID_APP_START + 102)
#define RID_WRITESYMBOLERROR (RID_APP_START + 202)
@@ -447,300 +446,6 @@
#define MN_SUB_SENDTO (RID_APP_START + 3120)
-#define HID_SMA_OPTIONSDIALOG (HID_SMA_START + 1)
-#define HID_SMA_FONTDIALOG (HID_SMA_START + 2)
-#define HID_SMA_FONTSIZEDIALOG (HID_SMA_START + 3)
-#define HID_SMA_FONTTYPEDIALOG (HID_SMA_START + 4)
-#define HID_SMA_DISTANCEDIALOG (HID_SMA_START + 5)
-#define HID_SMA_ALIGNDIALOG (HID_SMA_START + 6)
-#define HID_SMA_PRINTOPTIONPAGE (HID_SMA_START + 7)
-#define HID_SMA_SYMBOLDIALOG (HID_SMA_START + 8)
-#define HID_SMA_SYMDEFINEDIALOG (HID_SMA_START + 9)
-#define HID_SMA_EXTRAOPTIONPAGE (HID_SMA_START + 10)
-#define HID_SMA_DOCSAVEQUERY (HID_SMA_START + 11)
-#define HID_SMA_OBJECTSAVEQUERY (HID_SMA_START + 12)
-#define HID_SMA_DEFAULTSAVEQUERY (HID_SMA_START + 13)
-#define HID_SMA_ILLEGALOBJECTERROR (HID_SMA_START + 14)
-#define HID_SMA_ILLEGALFILEERROR (HID_SMA_START + 15)
-#define HID_SMA_WRITESYMBOLERROR (HID_SMA_START + 16)
-#define HID_SMA_READSYMBOLERROR (HID_SMA_START + 17)
-#define HID_SMA_NOMATHTYPEFACEWARNING (HID_SMA_START + 18)
-#define HID_SMA_OBJECTNAME (HID_SMA_START + 19)
-#define HID_SMA_VIEWNAME (HID_SMA_START + 20)
-#define HID_SMA_UNDOEDITNAME (HID_SMA_START + 21)
-#define HID_SMA_UNDOFORMATNAME (HID_SMA_START + 22)
-#define HID_SMA_APPICO (HID_SMA_START + 23)
-#define HID_SMA_DOCICO (HID_SMA_START + 24)
-#define HID_SMA_TMPICO (HID_SMA_START + 25)
-#define HID_SMA_COMMANDMENU (HID_SMA_START + 26)
-#define HID_SMA_VIEWMENU (HID_SMA_START + 27)
-#define HID_SMA_DISTANCEMENU (HID_SMA_START + 28)
-#define HID_SMA_FONTMENU (HID_SMA_START + 29)
-#define HID_SMA_STARTUPWINDOW (HID_SMA_START + 30)
-#define HID_SMA_TOOLBOXWINDOW (HID_SMA_START + 31)
-#define HID_SMA_CMDBOXWINDOW (HID_SMA_START + 32)
-#define HID_SMA_UPDATEOBJECT (HID_SMA_START + 33)
-#define HID_SMA_FONTREGULAR (HID_SMA_START + 34)
-#define HID_SMA_FONTITALIC (HID_SMA_START + 35)
-#define HID_SMA_FONTBOLD (HID_SMA_START + 36)
-#define HID_SMA_PRINTOPTION (HID_SMA_START + 37)
-#define HID_SMA_DOCUMENTSTR (HID_SMA_START + 38)
-#define HID_SMA_SYMBOLFILESSTR (HID_SMA_START + 39)
-#define HID_SMA_ALLFILESSTR (HID_SMA_START + 40)
-#define HID_SMA_CREATORSTR (HID_SMA_START + 41)
-#define HID_SMA_FILESMFTYP (HID_SMA_START + 42)
-#define HID_SMA_FILESYMTYP (HID_SMA_START + 43)
-#define HID_SMA_WIN_DOCUMENT (HID_SMA_START + 44)
-#define HID_SMA_COMMAND_WIN_EDIT (HID_SMA_START + 45)
-
-#define HID_SMA_PLUSX (HID_SMA_START + 50)
-#define HID_SMA_MINUSX (HID_SMA_START + 51)
-#define HID_SMA_PLUSMINUSX (HID_SMA_START + 52)
-#define HID_SMA_MINUSPLUSX (HID_SMA_START + 53)
-#define HID_SMA_NEGX (HID_SMA_START + 54)
-#define HID_SMA_XPLUSY (HID_SMA_START + 55)
-#define HID_SMA_XMINUSY (HID_SMA_START + 56)
-#define HID_SMA_XCDOTY (HID_SMA_START + 57)
-#define HID_SMA_XTIMESY (HID_SMA_START + 58)
-#define HID_SMA_XSYMTIMESY (HID_SMA_START + 59)
-#define HID_SMA_XSYMDIVIDEY (HID_SMA_START + 60)
-#define HID_SMA_XDIVY (HID_SMA_START + 61)
-#define HID_SMA_XOVERY (HID_SMA_START + 62)
-#define HID_SMA_XODIVIDEY (HID_SMA_START + 63)
-#define HID_SMA_XODOTY (HID_SMA_START + 64)
-#define HID_SMA_XOMINUSY (HID_SMA_START + 65)
-#define HID_SMA_XOPLUSY (HID_SMA_START + 66)
-#define HID_SMA_XOTIMESY (HID_SMA_START + 67)
-#define HID_SMA_XANDY (HID_SMA_START + 68)
-#define HID_SMA_XORY (HID_SMA_START + 69)
-#define HID_SMA_XEQY (HID_SMA_START + 70)
-#define HID_SMA_XNEQY (HID_SMA_START + 71)
-#define HID_SMA_XLTY (HID_SMA_START + 72)
-#define HID_SMA_XGTY (HID_SMA_START + 73)
-#define HID_SMA_XLEY (HID_SMA_START + 74)
-#define HID_SMA_XGEY (HID_SMA_START + 75)
-#define HID_SMA_XLESLANTY (HID_SMA_START + 76)
-#define HID_SMA_XGESLANTY (HID_SMA_START + 77)
-#define HID_SMA_XLLY (HID_SMA_START + 78)
-#define HID_SMA_XGGY (HID_SMA_START + 79)
-#define HID_SMA_XDEFY (HID_SMA_START + 80)
-#define HID_SMA_XEQUIVY (HID_SMA_START + 81)
-#define HID_SMA_XAPPROXY (HID_SMA_START + 82)
-#define HID_SMA_XSIMY (HID_SMA_START + 83)
-#define HID_SMA_XSIMEQY (HID_SMA_START + 84)
-#define HID_SMA_XPROPY (HID_SMA_START + 85)
-#define HID_SMA_XORTHOY (HID_SMA_START + 86)
-#define HID_SMA_XPARALLELY (HID_SMA_START + 87)
-#define HID_SMA_XTOWARDY (HID_SMA_START + 88)
-#define HID_SMA_XTRANSLY (HID_SMA_START + 89)
-#define HID_SMA_XTRANSRY (HID_SMA_START + 90)
-#define HID_SMA_XINY (HID_SMA_START + 91)
-#define HID_SMA_XNOTINY (HID_SMA_START + 92)
-#define HID_SMA_XOWNSY (HID_SMA_START + 93)
-#define HID_SMA_XUNIONY (HID_SMA_START + 94)
-#define HID_SMA_XINTERSECTIONY (HID_SMA_START + 95)
-#define HID_SMA_XSETMINUSY (HID_SMA_START + 96)
-#define HID_SMA_XSLASHY (HID_SMA_START + 97)
-#define HID_SMA_XSUBSETY (HID_SMA_START + 98)
-#define HID_SMA_XSUBSETEQY (HID_SMA_START + 99)
-#define HID_SMA_XSUPSETY (HID_SMA_START + 100)
-#define HID_SMA_XSUPSETEQY (HID_SMA_START + 101)
-#define HID_SMA_XNSUBSETY (HID_SMA_START + 102)
-#define HID_SMA_XNSUBSETEQY (HID_SMA_START + 103)
-#define HID_SMA_XNSUPSETY (HID_SMA_START + 104)
-#define HID_SMA_XNSUPSETEQY (HID_SMA_START + 105)
-#define HID_SMA_ABSX (HID_SMA_START + 106)
-#define HID_SMA_FACTX (HID_SMA_START + 107)
-#define HID_SMA_SQRTX (HID_SMA_START + 108)
-#define HID_SMA_NROOTXY (HID_SMA_START + 109)
-#define HID_SMA_EX (HID_SMA_START + 110)
-#define HID_SMA_EXPX (HID_SMA_START + 111)
-#define HID_SMA_LNX (HID_SMA_START + 112)
-#define HID_SMA_LOGX (HID_SMA_START + 113)
-#define HID_SMA_SINX (HID_SMA_START + 114)
-#define HID_SMA_COSX (HID_SMA_START + 115)
-#define HID_SMA_TANX (HID_SMA_START + 116)
-#define HID_SMA_COTX (HID_SMA_START + 117)
-#define HID_SMA_ARCSINX (HID_SMA_START + 118)
-#define HID_SMA_ARCCOSX (HID_SMA_START + 119)
-#define HID_SMA_ARCTANX (HID_SMA_START + 120)
-#define HID_SMA_ARCCOTX (HID_SMA_START + 121)
-#define HID_SMA_SINHX (HID_SMA_START + 122)
-#define HID_SMA_COSHX (HID_SMA_START + 123)
-#define HID_SMA_TANHX (HID_SMA_START + 124)
-#define HID_SMA_COTHX (HID_SMA_START + 125)
-#define HID_SMA_ARSINHX (HID_SMA_START + 126)
-#define HID_SMA_ARCOSHX (HID_SMA_START + 127)
-#define HID_SMA_ARTANHX (HID_SMA_START + 128)
-#define HID_SMA_ARCOTHX (HID_SMA_START + 129)
-#define HID_SMA_SUMX (HID_SMA_START + 130)
-#define HID_SMA_PRODX (HID_SMA_START + 131)
-#define HID_SMA_COPRODX (HID_SMA_START + 132)
-#define HID_SMA_LIMX (HID_SMA_START + 133)
-#define HID_SMA_LIMINFX (HID_SMA_START + 134)
-#define HID_SMA_LIMSUPX (HID_SMA_START + 135)
-#define HID_SMA_EXISTS (HID_SMA_START + 136)
-#define HID_SMA_FORALL (HID_SMA_START + 137)
-#define HID_SMA_NABLA (HID_SMA_START + 138)
-#define HID_SMA_INTX (HID_SMA_START + 139)
-#define HID_SMA_IINTX (HID_SMA_START + 140)
-#define HID_SMA_IIINTX (HID_SMA_START + 141)
-#define HID_SMA_LINTX (HID_SMA_START + 142)
-#define HID_SMA_LLINTX (HID_SMA_START + 143)
-#define HID_SMA_LLLINTX (HID_SMA_START + 144)
-#define HID_SMA_FROMX (HID_SMA_START + 145)
-#define HID_SMA_TOX (HID_SMA_START + 146)
-#define HID_SMA_FROMXTOY (HID_SMA_START + 147)
-#define HID_SMA_XCIRCY (HID_SMA_START + 148)
-#define HID_SMA_XDIVIDESY (HID_SMA_START + 149)
-#define HID_SMA_XNDIVIDESY (HID_SMA_START + 150)
-#define HID_SMA_DLARROW (HID_SMA_START + 151)
-#define HID_SMA_DLRARROW (HID_SMA_START + 152)
-#define HID_SMA_DRARROW (HID_SMA_START + 153)
-
-#define HID_SMA_MISC_CAT (HID_SMA_START + 154)
-#define HID_SMA_UNBINOPS_CAT (HID_SMA_START + 155)
-#define HID_SMA_RELATIONS_CAT (HID_SMA_START + 156)
-#define HID_SMA_SETOPERATIONS_CAT (HID_SMA_START + 157)
-#define HID_SMA_FUNCTIONS_CAT (HID_SMA_START + 158)
-#define HID_SMA_OPERATORS_CAT (HID_SMA_START + 159)
-#define HID_SMA_ATTRIBUTES_CAT (HID_SMA_START + 160)
-#define HID_SMA_BRACKETS_CAT (HID_SMA_START + 161)
-#define HID_SMA_FORMAT_CAT (HID_SMA_START + 162)
-
-#define HID_SMA_OPERATOR_WIN (HID_SMA_START + 163)
-#define HID_SMA_UNBINOPS_TBX (HID_SMA_START + 164)
-#define HID_SMA_RELATIONS_TBX (HID_SMA_START + 165)
-#define HID_SMA_SETOPERATIONS_TBX (HID_SMA_START + 166)
-#define HID_SMA_FUNCTIONS_TBX (HID_SMA_START + 167)
-#define HID_SMA_OPERATORS_TBX (HID_SMA_START + 168)
-#define HID_SMA_ATTRIBUTES_TBX (HID_SMA_START + 169)
-#define HID_SMA_BRACKETS_TBX (HID_SMA_START + 170)
-#define HID_SMA_FORMAT_TBX (HID_SMA_START + 171)
-#define HID_SMA_SELECTION_TBX (HID_SMA_START + 172)
-#define HID_SMA_COMMAND_WIN (HID_SMA_START + 173)
-#define HID_SMA_MISC_MENU (HID_SMA_START + 174)
-#define HID_SMA_FUNCTIONSOTHER1_MENU (HID_SMA_START + 175)
-
-#define HID_SMA_ACUTEX (HID_SMA_START + 180)
-#define HID_SMA_BARX (HID_SMA_START + 181)
-#define HID_SMA_BREVEX (HID_SMA_START + 182)
-#define HID_SMA_CHECKX (HID_SMA_START + 183)
-#define HID_SMA_CIRCLEX (HID_SMA_START + 184)
-#define HID_SMA_DOTX (HID_SMA_START + 185)
-#define HID_SMA_DDOTX (HID_SMA_START + 186)
-#define HID_SMA_DDDOTX (HID_SMA_START + 187)
-#define HID_SMA_GRAVEX (HID_SMA_START + 188)
-#define HID_SMA_HATX (HID_SMA_START + 189)
-#define HID_SMA_TILDEX (HID_SMA_START + 190)
-#define HID_SMA_VECX (HID_SMA_START + 191)
-#define HID_SMA_UNDERLINEX (HID_SMA_START + 192)
-#define HID_SMA_OVERLINEX (HID_SMA_START + 193)
-#define HID_SMA_OVERSTRIKEX (HID_SMA_START + 194)
-#define HID_SMA_PHANTOMX (HID_SMA_START + 195)
-#define HID_SMA_BOLDX (HID_SMA_START + 196)
-#define HID_SMA_ITALX (HID_SMA_START + 197)
-#define HID_SMA_SIZEXY (HID_SMA_START + 198)
-#define HID_SMA_FONTXY (HID_SMA_START + 199)
-#define HID_SMA_COLORX (HID_SMA_START + 200)
-#define HID_SMA_LRGROUPX (HID_SMA_START + 201)
-#define HID_SMA_LRPARENTX (HID_SMA_START + 202)
-#define HID_SMA_LRBRACKETX (HID_SMA_START + 203)
-#define HID_SMA_LRBRACEX (HID_SMA_START + 204)
-#define HID_SMA_LRANGLEX (HID_SMA_START + 205)
-#define HID_SMA_LRCEILX (HID_SMA_START + 206)
-#define HID_SMA_LRFLOORX (HID_SMA_START + 207)
-#define HID_SMA_LRLINEX (HID_SMA_START + 208)
-#define HID_SMA_LRDLINEX (HID_SMA_START + 209)
-#define HID_SMA_SLRPARENTX (HID_SMA_START + 210)
-#define HID_SMA_SLRBRACKETX (HID_SMA_START + 211)
-#define HID_SMA_SLRBRACEX (HID_SMA_START + 212)
-#define HID_SMA_SLRANGLEX (HID_SMA_START + 213)
-#define HID_SMA_SLRCEILX (HID_SMA_START + 214)
-#define HID_SMA_SLRFLOORX (HID_SMA_START + 215)
-#define HID_SMA_SLRLINEX (HID_SMA_START + 216)
-#define HID_SMA_SLRDLINEX (HID_SMA_START + 217)
-#define HID_SMA_RSUBX (HID_SMA_START + 218)
-#define HID_SMA_RSUPX (HID_SMA_START + 219)
-#define HID_SMA_LSUBX (HID_SMA_START + 220)
-#define HID_SMA_LSUPX (HID_SMA_START + 221)
-#define HID_SMA_SBLANK (HID_SMA_START + 222)
-#define HID_SMA_BLANK (HID_SMA_START + 223)
-#define HID_SMA_NEWLINE (HID_SMA_START + 224)
-#define HID_SMA_BINOMXY (HID_SMA_START + 225)
-#define HID_SMA_STACK (HID_SMA_START + 226)
-#define HID_SMA_MATRIX (HID_SMA_START + 227)
-#define HID_SMA_ALIGNLX (HID_SMA_START + 228)
-#define HID_SMA_ALIGNCX (HID_SMA_START + 229)
-#define HID_SMA_ALIGNRX (HID_SMA_START + 230)
-#define HID_SMA_ALEPH (HID_SMA_START + 231)
-#define HID_SMA_EMPTYSET (HID_SMA_START + 232)
-#define HID_SMA_RE (HID_SMA_START + 233)
-#define HID_SMA_IM (HID_SMA_START + 234)
-#define HID_SMA_INFINITY (HID_SMA_START + 235)
-#define HID_SMA_PARTIAL (HID_SMA_START + 236)
-#define HID_SMA_WP (HID_SMA_START + 237)
-#define HID_SMA_DOTSAXIS (HID_SMA_START + 238)
-#define HID_SMA_DOTSUP (HID_SMA_START + 239)
-#define HID_SMA_DOTSDOWN (HID_SMA_START + 240)
-#define HID_SMA_DOTSLOW (HID_SMA_START + 241)
-#define HID_SMA_DOTSVERT (HID_SMA_START + 242)
-#define HID_SMA_NOSPACE (HID_SMA_START + 243)
-
-#define HID_SMA_SETN (HID_SMA2_START + 1)
-#define HID_SMA_SETZ (HID_SMA2_START + 2)
-#define HID_SMA_SETQ (HID_SMA2_START + 3)
-#define HID_SMA_SETR (HID_SMA2_START + 4)
-#define HID_SMA_SETC (HID_SMA2_START + 5)
-#define HID_SMA_WIDEHATX (HID_SMA2_START + 6)
-#define HID_SMA_WIDETILDEX (HID_SMA2_START + 7)
-#define HID_SMA_WIDEVECX (HID_SMA2_START + 8)
-#define HID_SMA_CSUBX (HID_SMA2_START + 9)
-#define HID_SMA_CSUPX (HID_SMA2_START + 10)
-#define HID_SMA_HBAR (HID_SMA2_START + 11)
-#define HID_SMA_LAMBDABAR (HID_SMA2_START + 12)
-#define HID_SMA_LEFTARROW (HID_SMA2_START + 13)
-#define HID_SMA_RIGHTARROW (HID_SMA2_START + 14)
-#define HID_SMA_UPARROW (HID_SMA2_START + 15)
-#define HID_SMA_DOWNARROW (HID_SMA2_START + 16)
-
-#define HID_SMA_DEFAULT_DIST (HID_SMA2_START + 17)
-#define HID_SMA_LINE_DIST (HID_SMA2_START + 18)
-#define HID_SMA_ROOT_DIST (HID_SMA2_START + 19)
-#define HID_SMA_SUP_DIST (HID_SMA2_START + 20)
-#define HID_SMA_SUB_DIST (HID_SMA2_START + 21)
-#define HID_SMA_NUMERATOR_DIST (HID_SMA2_START + 22)
-#define HID_SMA_DENOMINATOR_DIST (HID_SMA2_START + 23)
-#define HID_SMA_FRACLINE_EXCWIDTH (HID_SMA2_START + 24)
-#define HID_SMA_FRACLINE_LINEWIDTH (HID_SMA2_START + 25)
-#define HID_SMA_UPPERLIMIT_DIST (HID_SMA2_START + 26)
-#define HID_SMA_LOWERLIMIT_DIST (HID_SMA2_START + 27)
-#define HID_SMA_BRACKET_EXCHEIGHT (HID_SMA2_START + 28)
-#define HID_SMA_BRACKET_DIST (HID_SMA2_START + 29)
-#define HID_SMA_MATRIXROW_DIST (HID_SMA2_START + 30)
-#define HID_SMA_MATRIXCOL_DIST (HID_SMA2_START + 31)
-#define HID_SMA_ATTRIBUT_DIST (HID_SMA2_START + 32)
-#define HID_SMA_INTERATTRIBUT_DIST (HID_SMA2_START + 33)
-#define HID_SMA_OPERATOR_EXCHEIGHT (HID_SMA2_START + 34)
-#define HID_SMA_OPERATOR_DIST (HID_SMA2_START + 35)
-#define HID_SMA_LEFTBORDER_DIST (HID_SMA2_START + 36)
-#define HID_SMA_RIGHTBORDER_DIST (HID_SMA2_START + 37)
-#define HID_SMA_UPPERBORDER_DIST (HID_SMA2_START + 38)
-#define HID_SMA_LOWERBORDER_DIST (HID_SMA2_START + 39)
-#define HID_SMA_SCALE_ALL_BRACKETS (HID_SMA2_START + 40)
-#define HID_SMA_BRACKET_EXCHEIGHT2 (HID_SMA2_START + 41)
-#define HID_SMA_LMRANGLEXY (HID_SMA2_START + 42)
-#define HID_SMA_SLMRANGLEXY (HID_SMA2_START + 43)
-#define HID_SMA_XWIDESLASHY (HID_SMA2_START + 44)
-#define HID_SMA_XWIDEBSLASHY (HID_SMA2_START + 45)
-#define HID_SMA_XOVERBRACEY (HID_SMA2_START + 46)
-#define HID_SMA_XUNDERBRACEY (HID_SMA2_START + 47)
-#define HID_SMA_LRDBRACKETX (HID_SMA2_START + 48)
-#define HID_SMA_SLRDBRACKETX (HID_SMA2_START + 49)
-
-#define HID_SMA_CONTROL_SYMBOLSET_VIEW (HID_SMA2_START + 50)
-#define HID_SMA_CONTROL_FONTCHAR_VIEW (HID_SMA2_START + 51)
-
#define BMP_ARROW_RIGHT 1
#define MN_WIN 60
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 885bbf08e3..999fde6ba9 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -83,24 +83,24 @@ private:
String m_aName;
String m_aExportName;
String m_aSetName;
- sal_Unicode m_cChar;
+ sal_UCS4 m_cChar;
bool m_bPredefined;
bool m_bDocSymbol;
public:
SmSym();
- SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
+ SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
const String& rSet, bool bIsPredefined = false);
SmSym(const SmSym& rSymbol);
SmSym& operator = (const SmSym& rSymbol);
const Font& GetFace() const { return m_aFace; }
- sal_Unicode GetCharacter() const { return m_cChar; }
+ sal_UCS4 GetCharacter() const { return m_cChar; }
const String& GetName() const { return m_aName; }
void SetFace( const Font& rFont ) { m_aFace = rFont; }
- void SetCharacter( sal_Unicode cChar ) { m_cChar = cChar; }
+ void SetCharacter( sal_UCS4 cChar ) { m_cChar = cChar; }
//! since the symbol name is also used as key in the map it should not be possible to change the name
//! because ten the key would not be the same as its supposed copy here
@@ -169,7 +169,7 @@ public:
std::set< String > GetSymbolSetNames() const;
const SymbolPtrVec_t GetSymbolSet( const String& rSymbolSetName );
- USHORT GetSymbolCount() const { return static_cast< USHORT >(m_aSymbols.size()); }
+ sal_uInt16 GetSymbolCount() const { return static_cast< sal_uInt16 >(m_aSymbols.size()); }
const SymbolPtrVec_t GetSymbols() const;
bool AddOrReplaceSymbol( const SmSym & rSymbol, bool bForceChange = false );
void RemoveSymbol( const String & rSymbolName );
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx
index 77d3fb50a4..e3345a3ce1 100644
--- a/starmath/inc/toolbox.hxx
+++ b/starmath/inc/toolbox.hxx
@@ -32,12 +32,10 @@
#include <sfx2/basedlgs.hxx>
#include <sfx2/childwin.hxx>
#include <vcl/toolbox.hxx>
+
#include "smmod.hxx"
#include "config.hxx"
-
-#include "dialog.hrc"
-
-#define NUM_TBX_CATEGORIES 9
+#include "toolbox.hrc"
class SmToolBoxWindow : public SfxFloatingWindow
{
@@ -48,18 +46,18 @@ protected:
ToolBox *pToolBoxCmd;
ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES];
ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */
- USHORT nActiveCategoryRID;
+ sal_uInt16 nActiveCategoryRID;
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void GetFocus();
- void ApplyImageLists( USHORT nCategoryRID );
+ void ApplyImageLists( sal_uInt16 nCategoryRID );
DECL_LINK( CategoryClickHdl, ToolBox* );
DECL_LINK( CmdSelectHdl, ToolBox* );
SmViewShell * GetView();
- const ImageList * GetImageList( USHORT nResId );
+ const ImageList * GetImageList( sal_uInt16 nResId );
public:
SmToolBoxWindow(SfxBindings *pBindings,
@@ -72,7 +70,7 @@ public:
virtual void DataChanged( const DataChangedEvent &rEvt );
void AdjustPosSize( bool bSetPos );
- void SetCategory(USHORT nCategory);
+ void SetCategory(sal_uInt16 nCategory);
};
/**************************************************************************/
@@ -83,7 +81,7 @@ class SmToolBoxWrapper : public SfxChildWindow
protected:
SmToolBoxWrapper(Window *pParentWindow,
- USHORT, SfxBindings*, SfxChildWinInfo*);
+ sal_uInt16, SfxBindings*, SfxChildWinInfo*);
};
#endif
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index 2ab0ff1bd2..295ced9e69 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -95,7 +95,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xParent ) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index dc040b68ed..ae374da66c 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -41,10 +41,6 @@ class String;
#define C2S(cChar) String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar))
-/////////////////////////////////////////////////////////////////
-
-const ByteString ExportString( const String& rString );
-const String ImportString( const ByteString& rByteString );
/////////////////////////////////////////////////////////////////
@@ -141,7 +137,7 @@ SmFace & operator *= (SmFace &rFace, const Fraction &rFrac);
class SmPickList : public SfxPtrArr
{
protected:
- USHORT nSize;
+ sal_uInt16 nSize;
virtual void *CreateItem(const String& rString) = 0;
virtual void *CreateItem(const void *pItem) = 0;
@@ -151,18 +147,18 @@ protected:
virtual String GetStringItem(void *pItem) = 0;
- void *GetPtr(USHORT nPos) const { return SfxPtrArr::GetObject(nPos); }
- void *&GetPtr(USHORT nPos) { return SfxPtrArr::GetObject(nPos); }
- void InsertPtr(USHORT nPos, void *pItem) { SfxPtrArr::Insert(nPos, pItem); }
- void RemovePtr(USHORT nPos, USHORT nCount = 1) { SfxPtrArr::Remove(nPos, nCount); }
+ void *GetPtr(sal_uInt16 nPos) const { return SfxPtrArr::GetObject(nPos); }
+ void *&GetPtr(sal_uInt16 nPos) { return SfxPtrArr::GetObject(nPos); }
+ void InsertPtr(sal_uInt16 nPos, void *pItem) { SfxPtrArr::Insert(nPos, pItem); }
+ void RemovePtr(sal_uInt16 nPos, sal_uInt16 nCount = 1) { SfxPtrArr::Remove(nPos, nCount); }
public:
- SmPickList(USHORT nInitSize = 0, USHORT nMaxSize = 5);
+ SmPickList(sal_uInt16 nInitSize = 0, sal_uInt16 nMaxSize = 5);
virtual ~SmPickList();
SmPickList& operator = (const SmPickList& rList);
- void *Get(USHORT nPos = 0) const { return GetPtr(nPos); }
+ void *Get(sal_uInt16 nPos = 0) const { return GetPtr(nPos); }
using SfxPtrArr::Insert;
void Insert(const void* pItem);
void Update(const void* pItem, const void *pNewItem);
@@ -170,10 +166,10 @@ public:
void Remove(const void* pItem);
using SfxPtrArr::operator [];
- void *operator [] (USHORT nPos) const { return GetPtr(nPos); }
+ void *operator [] (sal_uInt16 nPos) const { return GetPtr(nPos); }
- USHORT GetSize() const { return nSize; }
- USHORT Count() const { return SfxPtrArr::Count(); }
+ sal_uInt16 GetSize() const { return nSize; }
+ sal_uInt16 Count() const { return SfxPtrArr::Count(); }
void Clear();
};
@@ -200,7 +196,7 @@ protected:
public:
SmFontPickList()
: SmPickList(0, 5) {}
- SmFontPickList(USHORT nInitSize, USHORT nMaxSize)
+ SmFontPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize)
: SmPickList(nInitSize, nMaxSize) {}
SmFontPickList(const SmPickList& rOrig )
: SmPickList(rOrig) {}
@@ -215,11 +211,11 @@ public:
using SmPickList::Contains;
inline bool Contains(const Font &rFont) const;
- inline Font Get(USHORT nPos = 0) const;
+ inline Font Get(sal_uInt16 nPos = 0) const;
inline SmFontPickList& operator = (const SmFontPickList& rList);
using SfxPtrArr::operator [];
- inline Font operator [] (USHORT nPos) const;
+ inline Font operator [] (sal_uInt16 nPos) const;
void ReadFrom(const SmFontDialog& rDialog);
void WriteTo(SmFontDialog& rDialog) const;
@@ -230,12 +226,12 @@ inline SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList)
*(SmPickList *)this = *(SmPickList *)&rList; return *this;
}
-inline Font SmFontPickList::operator [] (USHORT nPos) const
+inline Font SmFontPickList::operator [] (sal_uInt16 nPos) const
{
return *((Font *)SmPickList::operator[](nPos));
}
-inline Font SmFontPickList::Get(USHORT nPos) const
+inline Font SmFontPickList::Get(sal_uInt16 nPos) const
{
return nPos < Count() ? *((Font *)SmPickList::Get(nPos)) : Font();
}
@@ -257,7 +253,7 @@ protected:
DECL_LINK(SelectHdl, ListBox *);
public:
- SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax = 4);
+ SmFontPickListBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax = 4);
SmFontPickListBox& operator = (const SmFontPickList& rList);
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 10e96261ae..f91ab3ebba 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -64,7 +64,7 @@ public:
void ShowCursor(bool bShow);
bool IsLineVisible() const { return bIsLineVisible; }
void ShowLine(bool bShow);
- const SmNode * SetCursorPos(USHORT nRow, USHORT nCol);
+ const SmNode * SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol);
protected:
void SetIsCursorVisible(bool bVis) { bIsCursorVisible = bVis; }
using Window::SetCursor;
@@ -78,7 +78,7 @@ private:
SmGraphicAccessible * pAccessible;
SmViewShell *pViewShell;
- USHORT nZoom;
+ sal_uInt16 nZoom;
short nModifyCount;
protected:
@@ -109,9 +109,9 @@ public:
SmViewShell * GetView() { return pViewShell; }
using Window::SetZoom;
- void SetZoom(USHORT Factor);
+ void SetZoom(sal_uInt16 Factor);
using Window::GetZoom;
- USHORT GetZoom() const { return nZoom; }
+ sal_uInt16 GetZoom() const { return nZoom; }
const Point & GetFormulaDrawPos() const { return aFormulaDrawPos; }
@@ -135,8 +135,8 @@ class SmGraphicController: public SfxControllerItem
protected:
SmGraphicWindow &rGraphic;
public:
- SmGraphicController(SmGraphicWindow &, USHORT, SfxBindings & );
- virtual void StateChanged(USHORT nSID,
+ SmGraphicController(SmGraphicWindow &, sal_uInt16, SfxBindings & );
+ virtual void StateChanged(sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState);
};
@@ -149,12 +149,12 @@ protected:
SmEditWindow &rEdit;
public:
- SmEditController(SmEditWindow &, USHORT, SfxBindings & );
+ SmEditController(SmEditWindow &, sal_uInt16, SfxBindings & );
#if OSL_DEBUG_LEVEL > 1
virtual ~SmEditController();
#endif
- virtual void StateChanged(USHORT nSID,
+ virtual void StateChanged(sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState);
};
@@ -206,7 +206,7 @@ class SmCmdBoxWrapper : public SfxChildWindow
protected:
SmCmdBoxWrapper(Window *pParentWindow,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo);
@@ -264,20 +264,20 @@ protected:
void DrawText(OutputDevice& rDevice,
const Point& rPosition,
const String& rText,
- USHORT MaxWidth);
+ sal_uInt16 MaxWidth);
- virtual USHORT Print(SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0);
- virtual SfxPrinter *GetPrinter(BOOL bCreate = FALSE);
- virtual USHORT SetPrinter(SfxPrinter *pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);
+ virtual sal_uInt16 Print(SfxProgress &rProgress, sal_Bool bIsAPI);
+ virtual SfxPrinter *GetPrinter(sal_Bool bCreate = sal_False);
+ virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter,
+ sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);
bool Insert( SfxMedium& rMedium );
bool InsertFrom(SfxMedium &rMedium);
virtual SfxTabPage *CreatePrintOptionsPage(Window *pParent,
const SfxItemSet &rOptions);
- virtual void Deactivate(BOOL IsMDIActivate);
- virtual void Activate(BOOL IsMDIActivate);
+ virtual void Deactivate(sal_Bool IsMDIActivate);
+ virtual void Activate(sal_Bool IsMDIActivate);
virtual Size GetOptimalSizePixel() const;
virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize);
virtual void InnerResizePixel(const Point &rOfs, const Size &rSize);
diff --git a/starmath/prj/build.lst b/starmath/prj/build.lst
index 1eb4c2334f..70de9d63d4 100644
--- a/starmath/prj/build.lst
+++ b/starmath/prj/build.lst
@@ -1,4 +1,4 @@
-sm starmath : l10n svx dtrans NULL
+sm starmath : LIBXSLT:libxslt L10N:l10n svx NULL
sm starmath usr1 - all sm_mkout NULL
sm starmath\inc nmake - all sm_inc NULL
sm starmath\prj get - all sm_prj NULL
diff --git a/starmath/prj/d.lst b/starmath/prj/d.lst
index bc48875e81..78bae57498 100644
--- a/starmath/prj/d.lst
+++ b/starmath/prj/d.lst
@@ -19,3 +19,5 @@ mkdir: %_DEST%\inc%_EXT%\starmath
..\uiconfig\smath\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\menubar\*.xml
..\uiconfig\smath\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\toolbar\*.xml
..\uiconfig\smath\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\statusbar\*.xml
+..\%__SRC%\misc\sm.component %_DEST%\xml%_EXT%\sm.component
+..\%__SRC%\misc\smd.component %_DEST%\xml%_EXT%\smd.component
diff --git a/starmath/qa/unoapi/knownissues.xcl b/starmath/qa/unoapi/knownissues.xcl
index e11895ef3f..f82014a51a 100644
--- a/starmath/qa/unoapi/knownissues.xcl
+++ b/starmath/qa/unoapi/knownissues.xcl
@@ -16,3 +16,6 @@ sm.SmGraphicAccessible::com::sun::star::accessibility::XAccessibleText
### i111220 ###
sm.XMLMetaExporter::com::sun::star::document::XFilter
+
+### i112743 ###
+sm.XMLSettingsExporter::com::sun::star::document::XFilter
diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi
index d90403616c..a4d5e4c320 100644..100755
--- a/starmath/sdi/smath.sdi
+++ b/starmath/sdi/smath.sdi
@@ -403,8 +403,8 @@ SfxVoidItem InsertConfigName SID_INSERTSYMBOL
]
//--------------------------------------------------------------------------
-SfxBoolItem InsertFormula SID_INSERT_FORMULA
-(SfxStringItem Name SID_INSERT_FORMULA,SfxStringItem Filter FN_PARAM_1)
+SfxBoolItem ImportFormula SID_IMPORT_FORMULA
+(SfxStringItem Name SID_IMPORT_FORMULA,SfxStringItem Filter FN_PARAM_1)
[
/* flags: */
AutoUpdate = FALSE,
diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi
index bf93f70255..4fc58262f4 100644..100755
--- a/starmath/sdi/smslots.sdi
+++ b/starmath/sdi/smslots.sdi
@@ -275,7 +275,7 @@ interface FormulaView
ExecMethod = Execute ;
StateMethod = GetState ;
]
- SID_INSERT_FORMULA //idlpp ole : no , status : no
+ SID_IMPORT_FORMULA //idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 44383de683..8f38950e49 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -338,8 +338,8 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
@@ -487,7 +487,7 @@ Sequence< beans::PropertyValue > SAL_CALL SmGraphicAccessible::getCharacterAttri
throw (IndexOutOfBoundsException, RuntimeException)
{
SolarMutexGuard aGuard;
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nIndex && nIndex < nLen))
throw IndexOutOfBoundsException();
return Sequence< beans::PropertyValue >();
@@ -667,11 +667,11 @@ sal_Bool SAL_CALL SmGraphicAccessible::setSelection(
throw (IndexOutOfBoundsException, RuntimeException)
{
SolarMutexGuard aGuard;
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nStartIndex && nStartIndex < nLen) ||
!(0 <= nEndIndex && nEndIndex < nLen))
throw IndexOutOfBoundsException();
- return FALSE;
+ return sal_False;
}
OUString SAL_CALL SmGraphicAccessible::getText()
@@ -895,7 +895,7 @@ SmViewForwarder::~SmViewForwarder()
{
}
-BOOL SmViewForwarder::IsValid() const
+sal_Bool SmViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -992,13 +992,13 @@ IMPL_LINK(SmTextForwarder, NotifyHdl, EENotify*, aNotify)
return 0;
}
-USHORT SmTextForwarder::GetParagraphCount() const
+sal_uInt16 SmTextForwarder::GetParagraphCount() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetParagraphCount() : 0;
}
-USHORT SmTextForwarder::GetTextLen( USHORT nParagraph ) const
+sal_uInt16 SmTextForwarder::GetTextLen( sal_uInt16 nParagraph ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetTextLen( nParagraph ) : 0;
@@ -1014,7 +1014,7 @@ String SmTextForwarder::GetText( const ESelection& rSel ) const
return aRet;
}
-SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
OSL_ENSURE( pEditEngine, "EditEngine missing" );
@@ -1044,17 +1044,17 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAt
}
}
-SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
+SfxItemSet SmTextForwarder::GetParaAttribs( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
OSL_ENSURE( pEditEngine, "EditEngine missing" );
SfxItemSet aSet( pEditEngine->GetParaAttribs( nPara ) );
- USHORT nWhich = EE_PARA_START;
+ sal_uInt16 nWhich = EE_PARA_START;
while( nWhich <= EE_PARA_END )
{
- if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON )
+ if( aSet.GetItemState( nWhich, sal_True ) != SFX_ITEM_ON )
{
if( pEditEngine->HasParaAttrib( nPara, nWhich ) )
aSet.Put( pEditEngine->GetParaAttrib( nPara, nWhich ) );
@@ -1065,7 +1065,7 @@ SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
return aSet;
}
-void SmTextForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void SmTextForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1085,7 +1085,7 @@ void SmTextForwarder::RemoveAttribs( const ESelection& rSelection, sal_Bool bRem
pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich );
}
-void SmTextForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+void SmTextForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1120,15 +1120,15 @@ void SmTextForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection&
pEditEngine->QuickSetAttribs( rSet, rSel );
}
-BOOL SmTextForwarder::IsValid() const
+sal_Bool SmTextForwarder::IsValid() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
// cannot reliably query EditEngine state
// while in the middle of an update
- return pEditEngine ? pEditEngine->GetUpdateMode() : FALSE;
+ return pEditEngine ? pEditEngine->GetUpdateMode() : sal_False;
}
-XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
XubString aTxt;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1137,11 +1137,11 @@ XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nP
return aTxt;
}
-void SmTextForwarder::FieldClicked(const SvxFieldItem&, USHORT, USHORT)
+void SmTextForwarder::FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16)
{
}
-USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich )
+sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
{
EECharAttribArray aAttribs;
@@ -1150,16 +1150,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
SfxItemState eState = SFX_ITEM_DEFAULT;
// check all paragraphs inside the selection
- for( USHORT nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
+ for( sal_uInt16 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
{
SfxItemState eParaState = SFX_ITEM_DEFAULT;
// calculate start and endpos for this paragraph
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if( rSel.nStartPara == nPara )
nPos = rSel.nStartPos;
- USHORT nEndPos = rSel.nEndPos;
+ sal_uInt16 nEndPos = rSel.nEndPos;
if( rSel.nEndPara != nPara )
nEndPos = rEditEngine.GetTextLen( nPara );
@@ -1169,11 +1169,11 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
bool bEmpty = true; // we found no item inside the selektion of this paragraph
bool bGaps = false; // we found items but theire gaps between them
- USHORT nLastEnd = nPos;
+ sal_uInt16 nLastEnd = nPos;
const SfxPoolItem* pParaItem = NULL;
- for( USHORT nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
+ for( sal_uInt16 nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
{
struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib );
OSL_ENSURE( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
@@ -1234,18 +1234,18 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
return eState;
}
-USHORT SmTextForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
nState = GetSvxEditEngineItemState( *pEditEngine, rSel, nWhich );
return nState;
}
-USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
@@ -1255,30 +1255,30 @@ USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
return nState;
}
-LanguageType SmTextForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+LanguageType SmTextForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLanguage(nPara, nIndex) : LANGUAGE_NONE;
}
-USHORT SmTextForwarder::GetFieldCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetFieldCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldCount(nPara) : 0;
}
-EFieldInfo SmTextForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo SmTextForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldInfo( nPara, nField ) : EFieldInfo();
}
-EBulletInfo SmTextForwarder::GetBulletInfo( USHORT /*nPara*/ ) const
+EBulletInfo SmTextForwarder::GetBulletInfo( sal_uInt16 /*nPara*/ ) const
{
return EBulletInfo();
}
-Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+Rectangle SmTextForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1302,7 +1302,7 @@ Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
return aRect;
}
-Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
+Rectangle SmTextForwarder::GetParaBounds( sal_uInt16 nPara ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1310,8 +1310,8 @@ Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
if (pEditEngine)
{
const Point aPnt = pEditEngine->GetDocPosTopLeft( nPara );
- const ULONG nWidth = pEditEngine->CalcTextWidth();
- const ULONG nHeight = pEditEngine->GetTextHeight( nPara );
+ const sal_uLong nWidth = pEditEngine->CalcTextWidth();
+ const sal_uLong nHeight = pEditEngine->GetTextHeight( nPara );
aRect = Rectangle( aPnt.X(), aPnt.Y(), aPnt.X() + nWidth, aPnt.Y() + nHeight );
}
@@ -1330,7 +1330,7 @@ OutputDevice* SmTextForwarder::GetRefDevice() const
return pEditEngine ? pEditEngine->GetRefDevice() : 0;
}
-sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1344,7 +1344,7 @@ sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USH
return bRes;
}
-sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+sal_Bool SmTextForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1365,7 +1365,7 @@ sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& n
return bRes;
}
-sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+sal_Bool SmTextForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ?
@@ -1373,31 +1373,31 @@ sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndInde
: sal_False;
}
-USHORT SmTextForwarder::GetLineCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetLineCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineCount(nPara) : 0;
}
-USHORT SmTextForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+sal_uInt16 SmTextForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineLen(nPara, nLine) : 0;
}
-void SmTextForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+void SmTextForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
pEditEngine->GetLineBoundaries(rStart, rEnd, nPara, nLine);
}
-USHORT SmTextForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 SmTextForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineNumberAtIndex(nPara, nIndex) : 0;
}
-sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
+sal_Bool SmTextForwarder::QuickFormatDoc( sal_Bool /*bFull*/ )
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1409,13 +1409,13 @@ sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
return bRes;
}
-sal_Int16 SmTextForwarder::GetDepth( USHORT /*nPara*/ ) const
+sal_Int16 SmTextForwarder::GetDepth( sal_uInt16 /*nPara*/ ) const
{
// math has no outliner...
return -1;
}
-sal_Bool SmTextForwarder::SetDepth( USHORT /*nPara*/, sal_Int16 nNewDepth )
+sal_Bool SmTextForwarder::SetDepth( sal_uInt16 /*nPara*/, sal_Int16 nNewDepth )
{
// math has no outliner...
return -1 == nNewDepth; // is it the value from 'GetDepth' ?
@@ -1464,12 +1464,12 @@ void SmTextForwarder::AppendParagraph()
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
- USHORT nParaCount = pEditEngine->GetParagraphCount();
+ sal_uInt16 nParaCount = pEditEngine->GetParagraphCount();
pEditEngine->InsertParagraph( nParaCount, String() );
}
}
-xub_StrLen SmTextForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet )
+xub_StrLen SmTextForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet )
{
xub_StrLen nRes = 0;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1513,7 +1513,7 @@ SmEditViewForwarder::~SmEditViewForwarder()
{
}
-BOOL SmEditViewForwarder::IsValid() const
+sal_Bool SmEditViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -1860,8 +1860,8 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( )
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index 3195759661..cb2499df62 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -188,7 +188,7 @@ public:
SmViewForwarder( SmEditAccessible &rAcc );
virtual ~SmViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -211,17 +211,17 @@ public:
SmTextForwarder( SmEditAccessible& rAcc, SmEditSource & rSource );
virtual ~SmTextForwarder();
- virtual USHORT GetParagraphCount() const;
- virtual USHORT GetTextLen( USHORT nParagraph ) const;
+ virtual sal_uInt16 GetParagraphCount() const;
+ virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const;
virtual String GetText( const ESelection& rSel ) const;
- virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const;
+ virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const;
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
- virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const;
+ virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const;
- virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const;
- virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const;
+ virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
+ virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
virtual void QuickInsertText( const String& rText, const ESelection& rSel );
virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -230,36 +230,36 @@ public:
virtual SfxItemPool* GetPool() const;
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
- virtual void FieldClicked(const SvxFieldItem&, USHORT, USHORT);
- virtual BOOL IsValid() const;
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16);
+ virtual sal_Bool IsValid() const;
- virtual LanguageType GetLanguage( USHORT, USHORT ) const;
- virtual USHORT GetFieldCount( USHORT nPara ) const;
- virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const;
- virtual EBulletInfo GetBulletInfo( USHORT nPara ) const;
- virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const;
- virtual Rectangle GetParaBounds( USHORT nPara ) const;
+ virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const;
+ virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const;
+ virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
+ virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const;
+ virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const;
virtual MapMode GetMapMode() const;
virtual OutputDevice* GetRefDevice() const;
- virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const;
- virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const;
- virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
- virtual USHORT GetLineCount( USHORT nPara ) const;
- virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
- virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
- virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nLine ) const;
+ virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
+ virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
+ virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
+ virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const;
+ virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
virtual const SfxItemSet* GetEmptyItemSetPtr();
// implementation functions for XParagraphAppend and XTextPortionAppend
virtual void AppendParagraph();
- virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet );
+ virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
virtual void CopyText(const SvxTextForwarder& rSource);
};
@@ -278,7 +278,7 @@ public:
SmEditViewForwarder( SmEditAccessible& rAcc );
virtual ~SmEditViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 383f41b8ed..714f1d510d 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -50,8 +50,6 @@ static const char* aRootName = "Office.Math";
#define SYMBOL_LIST "SymbolList"
#define FONT_FORMAT_LIST "FontFormatList"
-SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry );
-
/////////////////////////////////////////////////////////////////
@@ -72,7 +70,7 @@ static Sequence< OUString > lcl_GetFontPropertyNames()
Sequence< OUString > aNames( 6 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -97,7 +95,7 @@ static Sequence< OUString > lcl_GetSymbolPropertyNames()
Sequence< OUString > aNames( 4 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -113,6 +111,8 @@ static const char * aMathPropNames[] =
"Print/Frame",
"Print/Size",
"Print/ZoomFactor",
+ "LoadSave/IsSaveOnlyUsedSymbols",
+ //"Misc/NoSymbolsWarning", @deprecated
"Misc/IgnoreSpacesRight",
"View/ToolboxVisible",
"View/AutoRedraw",
@@ -169,14 +169,14 @@ static const char * aFormatPropNames[] =
static Sequence< OUString > lcl_GetPropertyNames(
- const char * aPropNames[], USHORT nCount )
+ const char * aPropNames[], sal_uInt16 nCount )
{
const char** ppPropName = aPropNames;
Sequence< OUString > aNames( nCount );
OUString *pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i, ++ppPropName)
+ for (sal_Int32 i = 0; i < nCount; ++i, ++ppPropName)
{
pNames[i] = A2OU( *ppPropName );
}
@@ -186,14 +186,14 @@ static Sequence< OUString > lcl_GetPropertyNames(
static Sequence< OUString > GetFormatPropertyNames()
{
- USHORT nCnt = SAL_N_ELEMENTS(aFormatPropNames);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aFormatPropNames);
return lcl_GetPropertyNames( aFormatPropNames, nCnt );
}
static Sequence< OUString > GetOtherPropertyNames()
{
- USHORT nCnt = SAL_N_ELEMENTS(aMathPropNames);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aMathPropNames);
return lcl_GetPropertyNames( aMathPropNames, nCnt );
}
@@ -202,14 +202,16 @@ static Sequence< OUString > GetOtherPropertyNames()
struct SmCfgOther
{
SmPrintSize ePrintSize;
- USHORT nPrintZoomFactor;
+ sal_uInt16 nPrintZoomFactor;
bool bPrintTitle;
bool bPrintFormulaText;
bool bPrintFrame;
+ bool bIsSaveOnlyUsedSymbols;
bool bIgnoreSpacesRight;
bool bToolboxVisible;
bool bAutoRedraw;
bool bFormulaCursor;
+ //sal_Bool bNoSymbolsWarning;
SmCfgOther();
};
@@ -222,7 +224,7 @@ SmCfgOther::SmCfgOther()
bPrintTitle = bPrintFormulaText =
bPrintFrame = bIgnoreSpacesRight =
bToolboxVisible = bAutoRedraw =
- bFormulaCursor = true;
+ bFormulaCursor = bIsSaveOnlyUsedSymbols = true;
}
/////////////////////////////////////////////////////////////////
@@ -242,11 +244,11 @@ SmFontFormat::SmFontFormat()
SmFontFormat::SmFontFormat( const Font &rFont )
{
aName = rFont.GetName();
- nCharSet = (INT16) rFont.GetCharSet();
- nFamily = (INT16) rFont.GetFamily();
- nPitch = (INT16) rFont.GetPitch();
- nWeight = (INT16) rFont.GetWeight();
- nItalic = (INT16) rFont.GetItalic();
+ nCharSet = (sal_Int16) rFont.GetCharSet();
+ nFamily = (sal_Int16) rFont.GetFamily();
+ nPitch = (sal_Int16) rFont.GetPitch();
+ nWeight = (sal_Int16) rFont.GetWeight();
+ nItalic = (sal_Int16) rFont.GetItalic();
}
@@ -291,10 +293,9 @@ SmFontFormatList::SmFontFormatList()
void SmFontFormatList::Clear()
{
- USHORT nCnt = aEntries.Count();
- if (nCnt)
+ if (!aEntries.empty())
{
- aEntries.Remove( 0, nCnt );
+ aEntries.clear();
SetModified( true );
}
}
@@ -308,7 +309,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
if (!pFntFmt)
{
SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
- aEntries.Insert( aEntry, aEntries.Count() );
+ aEntries.push_back( aEntry );
SetModified( true );
}
}
@@ -316,35 +317,32 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
{
- USHORT nPos = 0xFFFF;
-
+
// search for entry
- USHORT nCnt = aEntries.Count();
- for (USHORT i = 0; i < nCnt && nPos == 0xFFFF; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
- nPos = i;
- }
-
- // remove entry if found
- if (nPos != 0xFFFF)
- {
- aEntries.Remove( nPos );
- SetModified( true );
+ {
+ // remove entry if found
+ aEntries.erase( aEntries.begin() + i );
+ SetModified( true );
+ break;
+ }
}
}
const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const
{
- SmFontFormat *pRes = 0;
+ const SmFontFormat *pRes = 0;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && !pRes; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
+ {
pRes = &aEntries[i].aFntFmt;
+ break;
+ }
}
return pRes;
@@ -352,11 +350,11 @@ const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId )
-const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const
+const SmFontFormat * SmFontFormatList::GetFontFormat( size_t nPos ) const
{
- SmFontFormat *pRes = 0;
- if (nPos < aEntries.Count())
- pRes = &aEntries[ nPos ].aFntFmt;
+ const SmFontFormat *pRes = 0;
+ if (nPos < aEntries.size())
+ pRes = &aEntries[nPos].aFntFmt;
return pRes;
}
@@ -365,12 +363,13 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co
{
String aRes;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && 0 == aRes.Len(); ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
- if (aEntries[i].aFntFmt == rFntFmt)
+ if (aEntries[i].aFntFmt == rFntFmt)
+ {
aRes = aEntries[i].aId;
+ break;
+ }
}
return aRes;
@@ -389,10 +388,10 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, boo
}
-const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const
+const String SmFontFormatList::GetFontFormatId( size_t nPos ) const
{
String aRes;
- if (nPos < aEntries.Count())
+ if (nPos < aEntries.size())
aRes = aEntries[nPos].aId;
return aRes;
}
@@ -405,13 +404,16 @@ const String SmFontFormatList::GetNewFontFormatId() const
String aRes;
String aPrefix( RTL_CONSTASCII_USTRINGPARAM( "Id" ) );
- INT32 nCnt = GetCount();
- for (INT32 i = 1; i <= nCnt + 1 && 0 == aRes.Len(); ++i)
+ sal_Int32 nCnt = GetCount();
+ for (sal_Int32 i = 1; i <= nCnt + 1; ++i)
{
String aTmpId( aPrefix );
aTmpId += String::CreateFromInt32( i );
if (!GetFontFormat( aTmpId ))
+ {
aRes = aTmpId;
+ break;
+ }
}
OSL_ENSURE( 0 != aRes.Len(), "failed to create new FontFormatId" );
@@ -466,11 +468,11 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
const rtl::OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -487,17 +489,17 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
{
const Any * pValue = aValues.getConstArray();
Font aFont;
- sal_Unicode cChar = '\0';
+ sal_UCS4 cChar = '\0';
String aSet;
bool bPredefined = false;
OUString aTmpStr;
- INT32 nTmp32 = 0;
+ sal_Int32 nTmp32 = 0;
bool bTmp = false;
bool bOK = true;
if (pValue->hasValue() && (*pValue >>= nTmp32))
- cChar = (sal_Unicode) nTmp32;
+ cChar = static_cast< sal_UCS4 >( nTmp32 );
else
bOK = false;
++pValue;
@@ -580,7 +582,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
{
Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( A2OU( SYMBOL_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
rSymbols.resize( nNodes );
std::vector< SmSym >::iterator aIt( rSymbols.begin() );
@@ -598,7 +600,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
const OUString *pNames = aNames.getConstArray();
- sal_uIntPtr nSymbolProps = sal::static_int_cast< UINT32 >(aNames.getLength());
+ sal_uIntPtr nSymbolProps = sal::static_int_cast< sal_uInt32 >(aNames.getLength());
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
@@ -620,7 +622,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Char
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT32) rSymbol.GetCharacter();
+ pVal->Value <<= static_cast< sal_UCS4 >( rSymbol.GetCharacter() );
pVal++;
// Set
pVal->Name = aNodeNameDelim;
@@ -633,7 +635,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Predefined
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (BOOL) rSymbol.IsPredefined();
+ pVal->Value <<= (sal_Bool) rSymbol.IsPredefined();
pVal++;
// FontFormatId
SmFontFormat aFntFmt( rSymbol.GetFace() );
@@ -671,9 +673,9 @@ void SmMathConfig::LoadFontFormatList()
Sequence< OUString > aNodes( GetNodeNames( A2OU( FONT_FORMAT_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
- for (INT32 i = 0; i < nNodes; ++i)
+ for (sal_Int32 i = 0; i < nNodes; ++i)
{
SmFontFormat aFntFmt;
ReadFontFormat( aFntFmt, pNode[i], A2OU( FONT_FORMAT_LIST ) );
@@ -692,11 +694,11 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const OUString &rSymbolName, const OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -714,7 +716,7 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const Any * pValue = aValues.getConstArray();
OUString aTmpStr;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bOK = true;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
@@ -762,16 +764,16 @@ void SmMathConfig::SaveFontFormatList()
return;
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nSymbolProps = aNames.getLength();
+ sal_Int32 nSymbolProps = aNames.getLength();
- USHORT nCount = rFntFmtList.GetCount();
+ size_t nCount = rFntFmtList.GetCount();
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
PropertyValue *pVal = pValues;
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
- for (USHORT i = 0; i < nCount; ++i)
+ for (size_t i = 0; i < nCount; ++i)
{
String aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );
@@ -791,27 +793,27 @@ void SmMathConfig::SaveFontFormatList()
// CharSet
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
+ pVal->Value <<= (sal_Int16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
pVal++;
// Family
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nFamily;
+ pVal->Value <<= (sal_Int16) aFntFmt.nFamily;
pVal++;
// Pitch
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nPitch;
+ pVal->Value <<= (sal_Int16) aFntFmt.nPitch;
pVal++;
// Weight
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nWeight;
+ pVal->Value <<= (sal_Int16) aFntFmt.nWeight;
pVal++;
// Italic
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nItalic;
+ pVal->Value <<= (sal_Int16) aFntFmt.nItalic;
pVal++;
}
OSL_ENSURE( pVal - pValues == nCount * nSymbolProps, "properties missing" );
@@ -823,13 +825,12 @@ void SmMathConfig::SaveFontFormatList()
void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
{
- size_t nCount = rSymbols.size();
- USHORT i;
+ size_t i;
// build list of used font-formats only
//!! font-format IDs may be different !!
SmFontFormatList aUsedList;
- for (i = 0; i < nCount; ++i)
+ for (i = 0; i < rSymbols.size(); ++i)
{
OSL_ENSURE( rSymbols[i].GetName().Len() > 0, "non named symbol" );
aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , true );
@@ -842,14 +843,14 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
// remove unused font-formats from list
SmFontFormatList &rFntFmtList = GetFontFormatList();
- USHORT nCnt = rFntFmtList.GetCount();
+ size_t nCnt = rFntFmtList.GetCount();
SmFontFormat *pTmpFormat = new SmFontFormat[ nCnt ];
String *pId = new String [ nCnt ];
- INT32 k;
+ size_t k;
for (k = 0; k < nCnt; ++k)
{
- pTmpFormat[k] = *rFntFmtList.GetFontFormat( (USHORT) k );
- pId[k] = rFntFmtList.GetFontFormatId( (USHORT) k );
+ pTmpFormat[k] = *rFntFmtList.GetFontFormat( k );
+ pId[k] = rFntFmtList.GetFontFormatId( k );
}
for (k = 0; k < nCnt; ++k)
{
@@ -869,7 +870,7 @@ void SmMathConfig::LoadOther()
pOther = new SmCfgOther;
Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -877,7 +878,7 @@ void SmMathConfig::LoadOther()
const Any *pValues = aValues.getConstArray();
const Any *pVal = pValues;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bTmp = false;
// Print/Title
@@ -900,6 +901,10 @@ void SmMathConfig::LoadOther()
if (pVal->hasValue() && (*pVal >>= nTmp16))
pOther->nPrintZoomFactor = nTmp16;
++pVal;
+ // LoadSave/IsSaveOnlyUsedSymbols
+ if (pVal->hasValue() && (*pVal >>= bTmp))
+ pOther->bIsSaveOnlyUsedSymbols = bTmp;
+ ++pVal;
// Misc/IgnoreSpacesRight
if (pVal->hasValue() && (*pVal >>= bTmp))
pOther->bIgnoreSpacesRight = bTmp;
@@ -929,30 +934,32 @@ void SmMathConfig::SaveOther()
return;
const Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// Print/Title
- *pValue++ <<= (BOOL) pOther->bPrintTitle;
+ *pValue++ <<= (sal_Bool) pOther->bPrintTitle;
// Print/FormulaText
- *pValue++ <<= (BOOL) pOther->bPrintFormulaText;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFormulaText;
// Print/Frame
- *pValue++ <<= (BOOL) pOther->bPrintFrame;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFrame;
// Print/Size
- *pValue++ <<= (INT16) pOther->ePrintSize;
+ *pValue++ <<= (sal_Int16) pOther->ePrintSize;
// Print/ZoomFactor
- *pValue++ <<= (INT16) pOther->nPrintZoomFactor;
+ *pValue++ <<= (sal_Int16) pOther->nPrintZoomFactor;
+ // LoadSave/IsSaveOnlyUsedSymbols
+ *pValue++ <<= (sal_Bool) pOther->bIsSaveOnlyUsedSymbols;
// Misc/IgnoreSpacesRight
- *pValue++ <<= (BOOL) pOther->bIgnoreSpacesRight;
+ *pValue++ <<= (sal_Bool) pOther->bIgnoreSpacesRight;
// View/ToolboxVisible
- *pValue++ <<= (BOOL) pOther->bToolboxVisible;
+ *pValue++ <<= (sal_Bool) pOther->bToolboxVisible;
// View/AutoRedraw
- *pValue++ <<= (BOOL) pOther->bAutoRedraw;
+ *pValue++ <<= (sal_Bool) pOther->bAutoRedraw;
// View/FormulaCursor
- *pValue++ <<= (BOOL) pOther->bFormulaCursor;
+ *pValue++ <<= (sal_Bool) pOther->bFormulaCursor;
OSL_ENSURE( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
@@ -967,7 +974,7 @@ void SmMathConfig::LoadFormat()
Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -976,7 +983,7 @@ void SmMathConfig::LoadFormat()
const Any *pVal = pValues;
OUString aTmpStr;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bTmp = false;
// StandardFormat/Textmode
@@ -1000,7 +1007,7 @@ void SmMathConfig::LoadFormat()
pFormat->SetBaseSize( Size(0, SmPtsTo100th_mm( nTmp16 )) );
++pVal;
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
{
if (pVal->hasValue() && (*pVal >>= nTmp16))
@@ -1054,30 +1061,30 @@ void SmMathConfig::SaveFormat()
return;
const Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// StandardFormat/Textmode
- *pValue++ <<= (BOOL) pFormat->IsTextmode();
+ *pValue++ <<= (sal_Bool) pFormat->IsTextmode();
// StandardFormat/GreekCharStyle
- *pValue++ <<= (INT16) pFormat->GetGreekCharStyle();
+ *pValue++ <<= (sal_Int16) pFormat->GetGreekCharStyle();
// StandardFormat/ScaleNormalBracket
- *pValue++ <<= (BOOL) pFormat->IsScaleNormalBrackets();
+ *pValue++ <<= (sal_Bool) pFormat->IsScaleNormalBrackets();
// StandardFormat/HorizontalAlignment
- *pValue++ <<= (INT16) pFormat->GetHorAlign();
+ *pValue++ <<= (sal_Int16) pFormat->GetHorAlign();
// StandardFormat/BaseSize
- *pValue++ <<= (INT16) SmRoundFraction( Sm100th_mmToPts(
+ *pValue++ <<= (sal_Int16) SmRoundFraction( Sm100th_mmToPts(
pFormat->GetBaseSize().Height() ) );
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetRelSize( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetRelSize( i );
for (i = DIS_BEGIN; i <= DIS_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetDistance( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetDistance( i );
for (i = FNT_BEGIN; i < FNT_END; ++i)
{
@@ -1148,7 +1155,7 @@ void SmMathConfig::SetPrintSize( SmPrintSize eSize )
}
-USHORT SmMathConfig::GetPrintZoomFactor() const
+sal_uInt16 SmMathConfig::GetPrintZoomFactor() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1156,7 +1163,7 @@ USHORT SmMathConfig::GetPrintZoomFactor() const
}
-void SmMathConfig::SetPrintZoomFactor( USHORT nVal )
+void SmMathConfig::SetPrintZoomFactor( sal_uInt16 nVal )
{
if (!pOther)
LoadOther();
@@ -1209,6 +1216,12 @@ void SmMathConfig::SetPrintFormulaText( bool bVal )
SetOtherIfNotEqual( pOther->bPrintFormulaText, bVal );
}
+bool SmMathConfig::IsSaveOnlyUsedSymbols() const
+{
+ if (!pOther)
+ ((SmMathConfig *) this)->LoadOther();
+ return pOther->bIsSaveOnlyUsedSymbols;
+}
bool SmMathConfig::IsPrintFrame() const
{
@@ -1226,6 +1239,14 @@ void SmMathConfig::SetPrintFrame( bool bVal )
}
+void SmMathConfig::SetSaveOnlyUsedSymbols( bool bVal )
+{
+ if (!pOther)
+ LoadOther();
+ SetOtherIfNotEqual( pOther->bIsSaveOnlyUsedSymbols, bVal );
+}
+
+
bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (!pOther)
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index ba8dcd01a4..301601a42a 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -33,6 +33,7 @@
#ifndef _MATH_CFGITEM_HXX_
#define _MATH_CFGITEM_HXX_
+#include <deque>
#include <vector>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -42,7 +43,6 @@
#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <unotools/configitem.hxx>
-#include <svl/svarray.hxx>
#include <vcl/timer.hxx>
#include <symbol.hxx>
@@ -61,11 +61,11 @@ struct SmCfgOther;
struct SmFontFormat
{
String aName;
- INT16 nCharSet;
- INT16 nFamily;
- INT16 nPitch;
- INT16 nWeight;
- INT16 nItalic;
+ sal_Int16 nCharSet;
+ sal_Int16 nFamily;
+ sal_Int16 nPitch;
+ sal_Int16 nWeight;
+ sal_Int16 nItalic;
SmFontFormat();
SmFontFormat( const Font &rFont );
@@ -83,13 +83,9 @@ struct SmFntFmtListEntry
SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt );
};
-
-SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 )
-
-
class SmFontFormatList
{
- SmFntFmtListEntryArr aEntries;
+ std::deque<SmFntFmtListEntry> aEntries;
bool bModified;
// disallow copy-constructor and assignment-operator for now
@@ -104,12 +100,12 @@ public:
void RemoveFontFormat( const String &rFntFmtId );
const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const;
- const SmFontFormat * GetFontFormat( USHORT nPos ) const;
+ const SmFontFormat * GetFontFormat( size_t nPos ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd );
- const String GetFontFormatId( USHORT nPos ) const;
+ const String GetFontFormatId( size_t nPos ) const;
const String GetNewFontFormatId() const;
- USHORT GetCount() const { return aEntries.Count(); }
+ size_t GetCount() const { return aEntries.size(); }
bool IsModified() const { return bModified; }
void SetModified( bool bVal ) { bModified = bVal; }
@@ -190,15 +186,18 @@ public:
void SetPrintFrame( bool bVal );
SmPrintSize GetPrintSize() const;
void SetPrintSize( SmPrintSize eSize );
- USHORT GetPrintZoomFactor() const;
- void SetPrintZoomFactor( USHORT nVal );
+ sal_uInt16 GetPrintZoomFactor() const;
+ void SetPrintZoomFactor( sal_uInt16 nVal );
+ bool IsSaveOnlyUsedSymbols() const;
+ void SetSaveOnlyUsedSymbols( bool bVal );
bool IsIgnoreSpacesRight() const;
void SetIgnoreSpacesRight( bool bVal );
bool IsAutoRedraw() const;
void SetAutoRedraw( bool bVal );
bool IsShowFormulaCursor() const;
void SetShowFormulaCursor( bool bVal );
+ void SetAutoRedraw( sal_Bool bVal );
};
/////////////////////////////////////////////////////////////////
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
index e51d73cc57..4631c32e30 100644..100755
--- a/starmath/source/config.cxx
+++ b/starmath/source/config.cxx
@@ -63,33 +63,33 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
{
const SfxPoolItem *pItem = NULL;
- UINT16 nU16;
+ sal_uInt16 nU16;
bool bVal;
- if (rSet.GetItemState(SID_PRINTSIZE, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTSIZE, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintSize( (SmPrintSize) nU16 );
}
- if (rSet.GetItemState(SID_PRINTZOOM, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTZOOM, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintZoomFactor( nU16 );
}
- if (rSet.GetItemState(SID_PRINTTITLE, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTITLE, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintTitle( bVal );
}
- if (rSet.GetItemState(SID_PRINTTEXT, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTEXT, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFormulaText( bVal );
}
- if (rSet.GetItemState(SID_PRINTFRAME, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTFRAME, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFrame( bVal );
}
- if (rSet.GetItemState(SID_AUTOREDRAW, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_AUTOREDRAW, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetAutoRedraw( bVal );
}
- if (rSet.GetItemState(SID_NO_RIGHT_SPACES, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_NO_RIGHT_SPACES, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
if (IsIgnoreSpacesRight() != bVal)
{
@@ -100,6 +100,10 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
Broadcast(SfxSimpleHint(HINT_FORMATCHANGED));
}
}
+ if (rSet.GetItemState(SID_SAVE_ONLY_USED_SYMBOLS, sal_True, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ SetSaveOnlyUsedSymbols( bVal );
+ }
SaveOther();
}
@@ -110,15 +114,16 @@ void SmConfig::ConfigToItemSet(SfxItemSet &rSet) const
const SfxItemPool *pPool = rSet.GetPool();
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTSIZE),
- (UINT16) GetPrintSize()));
+ (sal_uInt16) GetPrintSize()));
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTZOOM),
- (UINT16) GetPrintZoomFactor()));
+ (sal_uInt16) GetPrintZoomFactor()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTITLE), IsPrintTitle()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTEXT), IsPrintFormulaText()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTFRAME), IsPrintFrame()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_AUTOREDRAW), IsAutoRedraw()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_NO_RIGHT_SPACES), IsIgnoreSpacesRight()));
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), IsSaveOnlyUsedSymbols()));
}
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index e9eb200488..558d305ab4 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -458,7 +458,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
len2 = start3 - start2,
len3 = aText.Len() - start3;
SmToken aToken = pText->GetToken();
- USHORT eFontDesc = pText->GetFontDesc();
+ sal_uInt16 eFontDesc = pText->GetFontDesc();
//If we need make segment 1
if(len1 > 0) {
int start1 = 0;
@@ -507,9 +507,9 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find Parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -610,7 +610,7 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) {
pSubject = (SmOperNode*)position->CaretPos.pSelectedNode;
else {
//If not, check if parent of the current line is a SmOperNode
- SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
if(pLineNode->GetParent() && pLineNode->GetParent()->GetType() == NOPER)
pSubject = (SmOperNode*)pLineNode->GetParent();
}
@@ -678,9 +678,9 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -814,9 +814,9 @@ bool SmCursor::InsertRow() {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -841,7 +841,7 @@ bool SmCursor::InsertRow() {
if(pLineParent->GetType() == NMATRIX)
pMatrix = (SmMatrixNode*)pLineParent;
- //If we're not in a context that supports InsertRow, return FALSE
+ //If we're not in a context that supports InsertRow, return sal_False
if(!pTable && !pMatrix)
return false;
@@ -903,8 +903,8 @@ bool SmCursor::InsertRow() {
//Find position after insert and patch the list
PosAfterInsert = PatchLineList(pLineList, it);
//Move other children
- USHORT rows = pMatrix->GetNumRows();
- USHORT cols = pMatrix->GetNumCols();
+ sal_uInt16 rows = pMatrix->GetNumRows();
+ sal_uInt16 cols = pMatrix->GetNumCols();
int nRowStart = (nParentIndex - nParentIndex % cols) + cols;
for( int i = pMatrix->GetNumSubNodes() + cols - 1; i >= nRowStart + cols; i--)
pMatrix->SetSubNode(i, pMatrix->GetSubNode(i - cols));
@@ -916,7 +916,7 @@ bool SmCursor::InsertRow() {
}
pMatrix->SetRowCol(rows + 1, cols);
} else
- j_assert(FALSE, "We must be either the context of a table or matrix!");
+ j_assert(sal_False, "We must be either the context of a table or matrix!");
//Finish editing
FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
@@ -934,9 +934,9 @@ void SmCursor::InsertFraction() {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find Parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -1134,7 +1134,7 @@ void SmCursor::InsertSpecial(XubString aString) {
EndEdit();
}
-void SmCursor::InsertCommand(USHORT nCommand) {
+void SmCursor::InsertCommand(sal_uInt16 nCommand) {
switch(nCommand){
case RID_NEWLINE:
InsertRow();
@@ -1429,13 +1429,13 @@ void SmCursor::BeginEdit(){
bIsEnabledSetModifiedSmDocShell = pDocShell->IsEnableSetModified();
if( bIsEnabledSetModifiedSmDocShell )
- pDocShell->EnableSetModified( FALSE );
+ pDocShell->EnableSetModified( sal_False );
}
void SmCursor::EndEdit(){
if(--nEditSections > 0) return;
- pDocShell->SetFormulaArranged(FALSE);
+ pDocShell->SetFormulaArranged(sal_False);
//Okay, I don't know what this does... :)
//It's used in SmDocShell::SetText and with places where everything is modified.
//I think it does some magic, with sfx, but everything is totally undocumented so
@@ -1443,7 +1443,7 @@ void SmCursor::EndEdit(){
if ( bIsEnabledSetModifiedSmDocShell )
pDocShell->EnableSetModified( bIsEnabledSetModifiedSmDocShell );
//I think this notifies people around us that we've modified this document...
- pDocShell->SetModified(TRUE);
+ pDocShell->SetModified(sal_True);
//I think SmDocShell uses this value when it sends an update graphics event
//Anyway comments elsewhere suggests it need to be updated...
pDocShell->nModifyCount++;
diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx
index 61b4745b86..c31b55414c 100644
--- a/starmath/source/detreg.cxx
+++ b/starmath/source/detreg.cxx
@@ -49,29 +49,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SmFilterDetect::impl_getStaticImplementationName() +
- aUnoServices );
-
- Sequence< OUString > aServices = SmFilterDetect::impl_getStaticSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/ )
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 39d82597f3..7b77507126 100644..100755
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -51,15 +51,18 @@
#include <svx/ucsubset.hxx>
-#include "config.hxx"
#include "dialog.hxx"
#include "starmath.hrc"
-
+#include "config.hxx"
#include "dialog.hrc"
#include "smmod.hxx"
#include "symbol.hxx"
#include "view.hxx"
#include "document.hxx"
+#include "unomodel.hxx"
+
+
+using ::rtl::OUString;
////////////////////////////////////////
//
@@ -79,9 +82,9 @@ class SmFontStyles
public:
SmFontStyles();
- USHORT GetCount() const { return 4; }
+ sal_uInt16 GetCount() const { return 4; }
const String & GetStyleName( const Font &rFont ) const;
- const String & GetStyleName( USHORT nIdx ) const;
+ const String & GetStyleName( sal_uInt16 nIdx ) const;
};
@@ -114,7 +117,7 @@ const String & SmFontStyles::GetStyleName( const Font &rFont ) const
}
-const String & SmFontStyles::GetStyleName( USHORT nIdx ) const
+const String & SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
{
// 0 = "normal", 1 = "italic",
// 2 = "bold", 3 = "bold italic"
@@ -145,10 +148,10 @@ void SetFontStyle(const XubString &rStyleName, Font &rFont)
{
// finden des Index passend zum StyleName fuer den leeren StyleName wird
// 0 (nicht bold nicht italic) angenommen.
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
if (rStyleName.Len())
{
- USHORT i;
+ sal_uInt16 i;
const SmFontStyles &rStyles = GetFontStyles();
for (i = 0; i < rStyles.GetCount(); i++)
if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == COMPARE_EQUAL)
@@ -185,8 +188,9 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
aSizeScaled (this, SmResId( RB_FIT_TO_PAGE )),
aSizeZoomed (this, SmResId( RB_ZOOM )),
aZoom (this, SmResId( MF_ZOOM )),
- aFixedLine3 (this, SmResId( FL_MISC_OPTIONS )),
- aNoRightSpaces (this, SmResId( CB_IGNORE_SPACING ))
+ aFixedLine3 (this, SmResId( FL_MISC_OPTIONS )),
+ aNoRightSpaces (this, SmResId( CB_IGNORE_SPACING )),
+ aSaveOnlyUsedSymbols (this, SmResId( CB_SAVE_ONLY_USED_SYMBOLS ))
{
FreeResource();
@@ -198,9 +202,9 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
}
-BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
{
- UINT16 nPrintSize;
+ sal_uInt16 nPrintSize;
if (aSizeNormal.IsChecked())
nPrintSize = PRINT_SIZE_NORMAL;
else if (aSizeScaled.IsChecked())
@@ -208,12 +212,13 @@ BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
else
nPrintSize = PRINT_SIZE_ZOOMED;
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (UINT16) nPrintSize));
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (UINT16) aZoom.GetValue()));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (sal_uInt16) nPrintSize));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (sal_uInt16) aZoom.GetValue()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTITLE), aTitle.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTEXT), aText.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTFRAME), aFrame.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), aNoRightSpaces.IsChecked()));
+ rSet.Put(SfxBoolItem(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), aSaveOnlyUsedSymbols.IsChecked()));
return true;
}
@@ -235,6 +240,7 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet& rSet)
aText.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTTEXT))).GetValue());
aFrame.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTFRAME))).GetValue());
aNoRightSpaces.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_NO_RIGHT_SPACES))).GetValue());
+ aSaveOnlyUsedSymbols.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS))).GetValue());
}
@@ -285,7 +291,7 @@ IMPL_LINK_INLINE_END( SmFontDialog, FontSelectHdl, ComboBox *, pComboBox )
IMPL_LINK( SmFontDialog, FontModifyHdl, ComboBox *, pComboBox )
{
// if font is available in list then use it
- USHORT nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
+ sal_uInt16 nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
if (COMBOBOX_ENTRY_NOTFOUND != nPos)
{
FontSelectHdl( pComboBox );
@@ -343,8 +349,8 @@ SmFontDialog::SmFontDialog(Window * pParent,
FontList aFontList( pFntListDevice );
- USHORT nCount = aFontList.GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = aFontList.GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFontBox.InsertEntry( aFontList.GetFontName(i).GetName() );
Face.SetSize(Size(0, 24));
@@ -479,14 +485,14 @@ void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
{
rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long >(aBaseSize.GetValue()))) );
- rFormat.SetRelSize(SIZ_TEXT, (USHORT) aTextSize .GetValue());
- rFormat.SetRelSize(SIZ_INDEX, (USHORT) aIndexSize .GetValue());
- rFormat.SetRelSize(SIZ_FUNCTION, (USHORT) aFunctionSize.GetValue());
- rFormat.SetRelSize(SIZ_OPERATOR, (USHORT) aOperatorSize.GetValue());
- rFormat.SetRelSize(SIZ_LIMITS, (USHORT) aBorderSize .GetValue());
+ rFormat.SetRelSize(SIZ_TEXT, (sal_uInt16) aTextSize .GetValue());
+ rFormat.SetRelSize(SIZ_INDEX, (sal_uInt16) aIndexSize .GetValue());
+ rFormat.SetRelSize(SIZ_FUNCTION, (sal_uInt16) aFunctionSize.GetValue());
+ rFormat.SetRelSize(SIZ_OPERATOR, (sal_uInt16) aOperatorSize.GetValue());
+ rFormat.SetRelSize(SIZ_LIMITS, (sal_uInt16) aBorderSize .GetValue());
const Size aTmp (rFormat.GetBaseSize());
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
rFormat.SetFontSize(i, aTmp);
rFormat.RequestApplyChanges();
@@ -624,7 +630,7 @@ void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const
struct FieldMinMax
{
- USHORT nMin, nMax;
+ sal_uInt16 nMin, nMax;
};
// Data for min and max values of the 4 metric fields
@@ -653,7 +659,7 @@ static const FieldMinMax pMinMaxData[10][4] =
{{ 0, 10000 }, { 0, 10000 }, { 0, 10000 }, { 0, 10000 }}
};
-SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
+SmCategoryDesc::SmCategoryDesc(const ResId& rResId, sal_uInt16 nCategoryIdx) :
Resource(rResId)
{
if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING)))
@@ -704,7 +710,7 @@ IMPL_LINK( SmDistanceDialog, GetFocusHdl, Control *, pControl )
{
if (Categories[nActiveCategory])
{
- USHORT i;
+ sal_uInt16 i;
if (pControl == &aMetricField1)
i = 0;
@@ -758,7 +764,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
}
-void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
+void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpId)
{
//! HelpID's die auf diese Weise explizit gesetzt werden, muessen im
//! util Verzeichnis im File "hidother.src" mit Hilfe von "hidspecial"
@@ -769,7 +775,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
OSL_ENSURE(aEmptyText.Len() == 0, "Sm: Ooops...");
#endif
- rField.SetHelpId(nHelpId);
+ rField.SetHelpId(sHelpId);
rField.SetHelpText(aEmptyText);
// since MetricField inherits from SpinField which has a sub Edit field
@@ -777,13 +783,14 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
// for it too.
Edit *pSubEdit = rField.GetSubEdit();
if (pSubEdit)
- { pSubEdit->SetHelpId(nHelpId);
+ {
+ pSubEdit->SetHelpId(sHelpId);
pSubEdit->SetHelpText(aEmptyText);
}
}
-void SmDistanceDialog::SetCategory(USHORT nCategory)
+void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(/*0 <= nCategory &&*/ nCategory < NOCATEGORIES,
@@ -795,7 +802,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(NOCATEGORIES == 10, "Sm : array doesn't fit into the number of categories");
#endif
- ULONG const aCatMf2Hid[10][4] =
+ static const char * aCatMf2Hid[10][4] =
{
{ HID_SMA_DEFAULT_DIST, HID_SMA_LINE_DIST, HID_SMA_ROOT_DIST, 0 },
{ HID_SMA_SUP_DIST, HID_SMA_SUB_DIST , 0, 0 },
@@ -825,10 +832,10 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
if (nActiveCategory != CATEGORY_NONE)
{
pCat = Categories[nActiveCategory];
- pCat->SetValue(0, (USHORT) aMetricField1.GetValue());
- pCat->SetValue(1, (USHORT) aMetricField2.GetValue());
- pCat->SetValue(2, (USHORT) aMetricField3.GetValue());
- pCat->SetValue(3, (USHORT) aMetricField4.GetValue());
+ pCat->SetValue(0, (sal_uInt16) aMetricField1.GetValue());
+ pCat->SetValue(1, (sal_uInt16) aMetricField2.GetValue());
+ pCat->SetValue(2, (sal_uInt16) aMetricField3.GetValue());
+ pCat->SetValue(3, (sal_uInt16) aMetricField4.GetValue());
if (nActiveCategory == 5)
bScaleAllBrackets = aCheckBox1.IsChecked();
@@ -839,7 +846,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
// aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von der
// gewaehlten Kategorie.
bool bActive;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
{
FixedText *pFT = (FixedText * const) aWin[i][0];
MetricField *pMF = (MetricField * const) aWin[i][1];
@@ -855,7 +862,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
// setzen von Masseinheit und Anzahl der Nachkommastellen
FieldUnit eUnit;
- USHORT nDigits;
+ sal_uInt16 nDigits;
if (nCategory < 9)
{
eUnit = FUNIT_CUSTOM;
@@ -925,7 +932,7 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, bool bFreeRes)
aBitmap (this, SmResId(1)),
aFixedLine (this, SmResId(1))
{
- for (USHORT i = 0; i < NOCATEGORIES; i++)
+ for (sal_uInt16 i = 0; i < NOCATEGORIES; i++)
Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
nActiveCategory = CATEGORY_NONE;
bScaleAllBrackets = false;
@@ -1117,11 +1124,11 @@ void SmShowSymbolSet::Paint(const Rectangle&)
// MapUnit einstellen fuer die 'nLen' berechnet wurde
SetMapMode(MapMode(MAP_PIXEL));
- USHORT v = sal::static_int_cast< USHORT >((aVScrollBar.GetThumbPos() * nColumns));
+ sal_uInt16 v = sal::static_int_cast< sal_uInt16 >((aVScrollBar.GetThumbPos() * nColumns));
size_t nSymbols = aSymbolSet.size();
Color aTxtColor( GetTextColor() );
- for (USHORT i = v; i < nSymbols ; i++)
+ for (sal_uInt16 i = v; i < nSymbols ; i++)
{
SmSym aSymbol (*aSymbolSet[i]);
Font aFont (aSymbol.GetFace());
@@ -1135,11 +1142,13 @@ void SmShowSymbolSet::Paint(const Rectangle&)
SetTextColor( aTxtColor );
int nIV = i - v;
- Size aSize(GetTextWidth(aSymbol.GetCharacter()), GetTextHeight());
+ sal_UCS4 cChar = aSymbol.GetCharacter();
+ String aText( OUString( &cChar, 1 ) );
+ Size aSize( GetTextWidth( aText ), GetTextHeight());
DrawText(Point((nIV % nColumns) * nLen + (nLen - aSize.Width()) / 2,
(nIV / nColumns) * nLen + (nLen - aSize.Height()) / 2),
- aSymbol.GetCharacter());
+ aText);
}
if (nSelectSymbol != SYMBOL_NONE)
@@ -1161,7 +1170,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
{
long nPos = (rMEvt.GetPosPixel().Y() / nLen) * nColumns + (rMEvt.GetPosPixel().X() / nLen) +
aVScrollBar.GetThumbPos() * nColumns;
- SelectSymbol( sal::static_int_cast< USHORT >(nPos) );
+ SelectSymbol( sal::static_int_cast< sal_uInt16 >(nPos) );
aSelectHdlLink.Call(this);
@@ -1173,7 +1182,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
{
- USHORT n = nSelectSymbol;
+ sal_uInt16 n = nSelectSymbol;
if (n != SYMBOL_NONE)
{
@@ -1184,7 +1193,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
case KEY_LEFT: n -= 1; break;
case KEY_RIGHT: n += 1; break;
case KEY_HOME: n = 0; break;
- case KEY_END: n = static_cast< USHORT >(aSymbolSet.size() - 1); break;
+ case KEY_END: n = static_cast< sal_uInt16 >(aSymbolSet.size() - 1); break;
case KEY_PAGEUP: n -= nColumns * nRows; break;
case KEY_PAGEDOWN: n += nColumns * nRows; break;
@@ -1200,8 +1209,8 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
n = nSelectSymbol;
// adjust scrollbar
- if ((n < (USHORT) (aVScrollBar.GetThumbPos() * nColumns)) ||
- (n >= (USHORT) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
+ if ((n < (sal_uInt16) (aVScrollBar.GetThumbPos() * nColumns)) ||
+ (n >= (sal_uInt16) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
{
aVScrollBar.SetThumbPos(n / nColumns);
Invalidate();
@@ -1224,12 +1233,12 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
nUseableWidth = aOutputSize.Width() - nScrollBarWidth;
// Hoehe von 16pt in Pixeln (passend zu 'aOutputSize')
- nLen = (USHORT) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
+ nLen = (sal_uInt16) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
- nColumns = sal::static_int_cast< USHORT >(nUseableWidth / nLen);
+ nColumns = sal::static_int_cast< sal_uInt16 >(nUseableWidth / nLen);
if (nColumns > 2 && nColumns % 2 != 0)
nColumns--;
- nRows = sal::static_int_cast< USHORT >(aOutputSize.Height() / nLen);
+ nRows = sal::static_int_cast< sal_uInt16 >(aOutputSize.Height() / nLen);
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(nColumns > 0, "Sm : no columns");
OSL_ENSURE(nRows > 0, "Sm : no rows");
@@ -1256,7 +1265,7 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
{
aSymbolSet = rSymbolSet;
- if (static_cast< USHORT >(aSymbolSet.size()) > (nColumns * nRows))
+ if (static_cast< sal_uInt16 >(aSymbolSet.size()) > (nColumns * nRows))
{
aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows));
aVScrollBar.Enable(true);
@@ -1271,7 +1280,7 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
}
-void SmShowSymbolSet::SelectSymbol(USHORT nSymbol)
+void SmShowSymbolSet::SelectSymbol(sal_uInt16 nSymbol)
{
int v = (int) (aVScrollBar.GetThumbPos() * nColumns);
@@ -1311,7 +1320,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect)
Size aTextSize(GetTextWidth(rText), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
- (GetOutputSize().Height() - aTextSize.Height()) / 2), rText);
+ (GetOutputSize().Height() * 7/10)), rText);
}
@@ -1328,17 +1337,14 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
{
if (pSymbol)
{
- Color aTxtColor( GetTextColor() );
-
Font aFont (pSymbol->GetFace());
aFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
- aFont.SetAlign(ALIGN_TOP);
+ aFont.SetAlign(ALIGN_BASELINE);
SetFont(aFont);
- // keep old text color (font may have different color set)
- SetTextColor(aTxtColor);
-
- SetText(XubString(pSymbol->GetCharacter()));
+ sal_UCS4 cChar = pSymbol->GetCharacter();
+ String aText( OUString( &cChar, 1 ) );
+ SetText( aText );
}
// 'Invalidate' fuellt den background mit der background-Farbe.
@@ -1408,7 +1414,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
// altes SymbolSet merken
XubString aOldSymbolSet (aSymbolSets.GetSelectEntry());
- USHORT nSymPos = GetSelectedSymbol();
+ sal_uInt16 nSymPos = GetSelectedSymbol();
// Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen
if (pDialog->Execute() == RET_OK && rSymbolMgr.IsModified())
@@ -1430,7 +1436,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
}
if (nSymPos >= aSymbolSet.size())
- nSymPos = static_cast< USHORT >(aSymbolSet.size()) - 1;
+ nSymPos = static_cast< sal_uInt16 >(aSymbolSet.size()) - 1;
SelectSymbol( nSymPos );
delete pDialog;
@@ -1461,7 +1467,7 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton )
const SmSym *pSym = GetSymbol();
if (pSym)
{
- XubString aText ('%');
+ String aText ('%');
aText += pSym->GetName();
aText += (sal_Unicode)' ';
@@ -1568,7 +1574,7 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
{
bool bRet = false;
- USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
+ sal_uInt16 nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
aSymbolSetName = String();
aSymbolSet.clear();
@@ -1595,10 +1601,10 @@ bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
}
-void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
+void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
{
const SmSym *pSym = NULL;
- if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size()))
+ if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size()))
pSym = aSymbolSet[ nSymbolNo ];
aSymbolSetDisplay.SelectSymbol(nSymbolNo);
@@ -1609,8 +1615,8 @@ void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
const SmSym * SmSymbolDialog::GetSymbol() const
{
- USHORT nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
- bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size());
+ sal_uInt16 nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
+ bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size());
return bValid ? aSymbolSet[ nSymbolNo ] : NULL;
}
@@ -1622,42 +1628,44 @@ void SmShowChar::Paint(const Rectangle &rRect)
{
Control::Paint( rRect );
- XubString Text (GetText ());
- if (Text.Len() > 0)
+ OUString aText( GetText() );
+ if (aText.getLength() > 0)
{
- Size aTextSize(GetTextWidth(Text), GetTextHeight());
+#if OSL_DEBUG_LEVEL > 1
+ sal_Int32 nPos = 0;
+ sal_UCS4 cChar = aText.iterateCodePoints( &nPos );
+ (void) cChar;
+#endif
+ Size aTextSize(GetTextWidth(aText), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
- (GetOutputSize().Height() - aTextSize.Height()) / 2), Text);
+ (GetOutputSize().Height() * 7/10)), aText);
}
}
-void SmShowChar::SetChar(xub_Unicode aChar)
+void SmShowChar::SetSymbol( const SmSym *pSym )
{
- SetText(XubString(aChar));
- Invalidate();
+ if (pSym)
+ SetSymbol( pSym->GetCharacter(), pSym->GetFace() );
}
-void SmShowChar::SetFont(const Font &rFont)
+void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont )
{
- Color aTxtColor( GetTextColor() );
-
- Font aFont (rFont);
- Size aSize (Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
-
- aFont.SetSize(aSize);
- aFont.SetAlign(ALIGN_TOP);
+ Font aFont( rFont );
+ aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) );
+ aFont.SetAlign(ALIGN_BASELINE);
+ SetFont(aFont);
aFont.SetTransparent(true);
- Control::SetFont(aFont);
- // keep text color (new font may have different one)
- SetTextColor( aTxtColor );
+ String aText( OUString( &cChar, 1) );
+ SetText( aText );
Invalidate();
}
+
////////////////////////////////////////////////////////////////////////////////
void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, bool bDeleteText)
@@ -1707,8 +1715,8 @@ void SmSymDefineDialog::FillFonts(bool bDelete)
// ueber die 'FontStyleBox' gewaehlt und nicht auch noch hier)
if (pFontList)
{
- USHORT nCount = pFontList->GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = pFontList->GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFonts.InsertEntry( pFontList->GetFontName(i).GetName() );
}
}
@@ -1725,7 +1733,7 @@ void SmSymDefineDialog::FillStyles(bool bDeleteText)
{
// eigene StyleName's verwenden
const SmFontStyles &rStyles = GetFontStyles();
- for (USHORT i = 0; i < rStyles.GetCount(); i++)
+ for (sal_uInt16 i = 0; i < rStyles.GetCount(); i++)
aStyles.InsertEntry( rStyles.GetStyleName(i) );
#if OSL_DEBUG_LEVEL > 1
@@ -1816,7 +1824,7 @@ IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, EMPTYARG pListBox )
IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, EMPTYARG pListBox )
{
(void) pListBox;
- USHORT nPos = aFontsSubsetLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aFontsSubsetLB.GetSelectEntryPos();
if (LISTBOX_ENTRY_NOTFOUND != nPos)
{
const Subset* pSubset = reinterpret_cast<const Subset*> (aFontsSubsetLB.GetEntryData( nPos ));
@@ -1843,7 +1851,7 @@ IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, ComboBox *, EMPTYARG pComboBox )
IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
{
- sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
+ sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( pSubsetMap, "SubsetMap missing" );
@@ -1857,9 +1865,18 @@ IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
aFontsSubsetLB.SetNoSelection();
}
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
- aSymbolDisplay.SetChar( sal::static_int_cast< sal_Unicode >(cChar) );
+ aSymbolDisplay.SetSymbol( cChar, aCharsetDisplay.GetFont() );
+
UpdateButtons();
+
+ // display Unicode position as symbol name while iterating over characters
+ const String aHex( String::CreateFromInt64( cChar, 16 ).ToUpperAscii() );
+ const String aPattern( A2OU( aHex.Len() > 4 ? "Ux000000" : "Ux0000" ) );
+ String aUnicodePos( aPattern.Copy( 0, aPattern.Len() - aHex.Len() ) );
+ aUnicodePos += aHex;
+ aSymbols.SetText( aUnicodePos );
+ aSymbolName.SetText( aUnicodePos );
+
return 0;
}
@@ -1873,16 +1890,13 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton )
#endif
// add symbol
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
- sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
- aSymbolSets.GetText() );
+ aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
//OSL_ENSURE( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" );
aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol );
// update display of new symbol
- aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
- aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolDisplay.SetSymbol( &aNewSymbol );
aSymbolName.SetText( aNewSymbol.GetName() );
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
@@ -1909,10 +1923,8 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
// get new Sybol to use
//! get font from symbol-disp lay since charset-display does not keep
//! the bold attribut.
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
- sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
- aSymbolSets.GetText() );
+ aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
// remove old symbol if the name was changed then add new one
const bool bNameChanged = aOldSymbols.GetText() != aSymbols.GetText();
@@ -1925,8 +1937,7 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
SetOrigSymbol(NULL, XubString());
// update display of new symbol
- aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
- aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolDisplay.SetSymbol( &aNewSymbol );
aSymbolName.SetText( aNewSymbol.GetName() );
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
@@ -1935,7 +1946,7 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
FillSymbolSets(aSymbolSets, false);
FillSymbols(aOldSymbols ,false);
FillSymbols(aSymbols ,false);
-
+
UpdateButtons();
return 0;
@@ -2182,7 +2193,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
@@ -2235,8 +2246,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
aSymName = pSymbol->GetName();
aSymSetName = rSymbolSetName;
- aOldSymbolDisplay.SetFont(pSymbol->GetFace());
- aOldSymbolDisplay.SetChar(pSymbol->GetCharacter());
+ aOldSymbolDisplay.SetSymbol( pSymbol );
}
else
{ // loeschen des angezeigten Symbols
@@ -2263,7 +2273,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
bool bIsOld = &rComboBox == &aOldSymbols;
@@ -2290,6 +2300,10 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
// das zugehoerige Zeichen auswaehlen
SelectChar(pSymbol->GetCharacter());
+
+ // since SelectChar will also set the unicode point as text in the
+ // symbols box, we have to set the symbol name again to get that one displayed
+ aSymbols.SetText( pSymbol->GetName() );
}
}
@@ -2342,11 +2356,11 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
const Subset* pSubset;
while( NULL != (pSubset = pSubsetMap->GetNextSubset( bFirst )) )
{
- USHORT nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
+ sal_uInt16 nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
aFontsSubsetLB.SetEntryData( nPos, (void *) pSubset );
// subset must live at least as long as the selected font !!!
if( bFirst )
- aFontsSubsetLB.SelectEntryPos( nPos );
+ aFontsSubsetLB.SelectEntryPos( nPos );
bFirst = false;
}
if( bFirst )
@@ -2358,7 +2372,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
{
bool bRet = false;
- USHORT nPos = aFonts.GetEntryPos(rFontName);
+ sal_uInt16 nPos = aFonts.GetEntryPos(rFontName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -2366,8 +2380,12 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
if (aStyles.GetEntryCount() > 0)
SelectStyle(aStyles.GetEntry(0));
if (bApplyFont)
+ {
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
bRet = true;
+ aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
+ }
+ bRet = sal_True;
}
else
aFonts.SetNoSelection();
@@ -2382,7 +2400,7 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont)
{
bool bRet = false;
- USHORT nPos = aStyles.GetEntryPos(rStyleName);
+ sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
// falls der Style nicht zur Auswahl steht nehmen wir den erst moeglichen
// (sofern vorhanden)
@@ -2393,8 +2411,12 @@ bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont
{
aStyles.SetText(aStyles.GetEntry(nPos));
if (bApplyFont)
+ {
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
bRet = true;
+ aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
+ }
+ bRet = sal_True;
}
else
aStyles.SetText(XubString());
@@ -2408,7 +2430,7 @@ bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont
void SmSymDefineDialog::SelectChar(xub_Unicode cChar)
{
aCharsetDisplay.SelectCharacter( cChar );
- aSymbolDisplay.SetChar( cChar );
+ aSymbolDisplay.SetSymbol( cChar, aCharsetDisplay.GetFont() );
UpdateButtons();
}
diff --git a/starmath/source/dialog.hrc b/starmath/source/dialog.hrc
index 026c17e700..b0895b624f 100644..100755
--- a/starmath/source/dialog.hrc
+++ b/starmath/source/dialog.hrc
@@ -31,17 +31,18 @@
#define FL_PRINTOPTIONS 10
#define CB_TITLEROW 11
-#define CB_EQUATION_TEXT 12
+#define CB_EQUATION_TEXT 12
#define CB_FRAME 13
#define FL_PRINT_FORMAT 20
-#define RB_ORIGINAL_SIZE 21
-#define RB_FIT_TO_PAGE 22
+#define RB_ORIGINAL_SIZE 21
+#define RB_FIT_TO_PAGE 22
#define RB_ZOOM 23
#define MF_ZOOM 24
#define FL_MISC_OPTIONS 30
-#define CB_IGNORE_SPACING 31
+#define CB_IGNORE_SPACING 31
+#define CB_SAVE_ONLY_USED_SYMBOLS 32
#define FT_FONTS_SUBSET 110
#define LB_FONTS_SUBSET 111
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 61ee8a914b..2ebf536dff 100644..100755
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -39,6 +39,8 @@
#include <comphelper/storagehelper.hxx>
#include <rtl/logfile.hxx>
#include <rtl/ustring.hxx>
+#include <unotools/eventcfg.hxx>
+#include <sfx2/event.hxx>
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
@@ -77,7 +79,7 @@
#include <editeng/unolingu.hxx>
#include <ucbhelper/content.hxx>
#include <vcl/mapmod.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/sfx.hrc>
#include <document.hxx>
@@ -98,6 +100,7 @@
#include <sfx2/sfxsids.hrc>
#include <svx/svxids.hrc>
#include "cursor.hxx"
+#include <tools/diagnose_ex.h>
#include "visitors.hxx"
#include "accessibility.hxx"
@@ -108,7 +111,7 @@ using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::uno;
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
static const char pStarMathDoc[] = "StarMathDocument";
@@ -183,7 +186,14 @@ void SmDocShell::SetText(const String& rBuffer)
{
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ {
+ // have SwOleClient::FormatChanged() to align the modified formula properly
+ // even if the vis area does not change (e.g. when formula text changes from
+ // "{a over b + c} over d" to "d over {a over b + c}"
+ SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
+
Repaint();
+ }
else
pViewSh->GetGraphicWindow().Invalidate();
}
@@ -255,6 +265,7 @@ void SmDocShell::Parse()
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
SetFormulaArranged( false );
InvalidateCursor();
+ aUsedSymbols = aInterpreter.GetUsedSymbols();
}
@@ -297,9 +308,9 @@ void SmDocShell::ArrangeFormula()
// format/draw formulas always from left to right,
// and numbers should not be converted
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
pOutDev->SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = pOutDev->GetDigitLanguage();
+ sal_Int16 nDigitLang = pOutDev->GetDigitLanguage();
pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
//
pTree->Arrange(*pOutDev, rFormat);
@@ -325,10 +336,10 @@ void SetEditEngineDefaultFonts(
SvtLinguConfig().GetOptions( aOpt );
//
struct FontDta {
- INT16 nFallbackLang;
- INT16 nLang;
- USHORT nFontType;
- USHORT nFontInfoId;
+ sal_Int16 nFallbackLang;
+ sal_Int16 nLang;
+ sal_uInt16 nFontType;
+ sal_uInt16 nFontInfoId;
} aTable[3] =
{
// info to get western font to be used
@@ -388,7 +399,7 @@ EditEngine& SmDocShell::GetEditEngine()
pEditEngine = new EditEngine( pEditEngineItemPool );
pEditEngine->EnableUndo( true );
- pEditEngine->SetDefTab( USHORT(
+ pEditEngine->SetDefTab( sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth( C2S("XXXX") ) ) );
pEditEngine->SetControlWord(
@@ -451,7 +462,7 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
//! the draw mode needs to be set to default, because when imbedding
//! Math for example in Calc in "a over b" the fraction bar may not
//! be visible else. More generally: the FillColor may have been changed.
- ULONG nOldDrawMode = DRAWMODE_DEFAULT;
+ sal_uLong nOldDrawMode = DRAWMODE_DEFAULT;
bool bRestoreDrawMode = false;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
@@ -463,9 +474,9 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
// format/draw formulas always from left to right
// and numbers should not be converted
- ULONG nLayoutMode = rDev.GetLayoutMode();
+ sal_uLong nLayoutMode = rDev.GetLayoutMode();
rDev.SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = rDev.GetDigitLanguage();
+ sal_Int16 nDigitLang = rDev.GetDigitLanguage();
rDev.SetDigitLanguage( LANGUAGE_ENGLISH );
//Set selection if any
@@ -737,7 +748,7 @@ SmDocShell::~SmDocShell()
}
-BOOL SmDocShell::SetData( const String& rData )
+sal_Bool SmDocShell::SetData( const String& rData )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
@@ -746,7 +757,7 @@ BOOL SmDocShell::SetData( const String& rData )
}
-BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
+sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
@@ -797,7 +808,7 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
}
-BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
+sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
@@ -811,7 +822,7 @@ BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
}
-BOOL SmDocShell::Load( SfxMedium& rMedium )
+sal_Bool SmDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
@@ -834,7 +845,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
// is this a fabulous math package ?
Reference<com::sun::star::frame::XModel> xModel(GetModel());
SmXMLImportWrapper aEquation(xModel);
- ULONG nError = aEquation.Import(rMedium);
+ sal_uLong nError = aEquation.Import(rMedium);
bRet = 0 == nError;
SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
@@ -852,7 +863,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
//------------------------------------------------------------------
-BOOL SmDocShell::Save()
+sal_Bool SmDocShell::Save()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Save" );
@@ -923,7 +934,7 @@ void SmDocShell::UpdateText()
}
-BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
+sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
@@ -947,7 +958,7 @@ BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
return bRet;
}
-BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
+sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
@@ -981,7 +992,7 @@ BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
return bRet;
}
-BOOL SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
+sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
@@ -1004,7 +1015,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
SmFormat aNewFormat( aOldFormat );
aNewFormat.SetTextmode(!aOldFormat.IsTextmode());
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1047,7 +1058,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
SmFormat aNewFormat( aOldFormat );
pFontTypeDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1071,7 +1082,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pFontSizeDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1095,7 +1106,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pDistanceDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1124,7 +1135,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pAlignDialog->WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt );
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1147,31 +1158,38 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_UNDO:
case SID_REDO:
{
- SfxUndoManager* pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
- BOOL (SfxUndoManager:: *fnDo)( USHORT );
+ sal_Bool (::svl::IUndoManager:: *fnDo)();
sal_uInt16 nCount;
if( SID_UNDO == rReq.GetSlot() )
{
nCount = pTmpUndoMgr->GetUndoActionCount();
- fnDo = &SfxUndoManager::Undo;
+ fnDo = &::svl::IUndoManager::Undo;
}
else
{
nCount = pTmpUndoMgr->GetRedoActionCount();
- fnDo = &SfxUndoManager::Redo;
+ fnDo = &::svl::IUndoManager::Redo;
}
- for( ; nCnt && nCount; --nCnt, --nCount )
- (pTmpUndoMgr->*fnDo)( 0 );
+ try
+ {
+ for( ; nCnt && nCount; --nCnt, --nCount )
+ (pTmpUndoMgr->*fnDo)();
+ }
+ catch( const Exception& e )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
Repaint();
UpdateText();
@@ -1199,7 +1217,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1255,27 +1273,27 @@ void SmDocShell::GetState(SfxItemSet &rSet)
case SID_GETUNDOSTRINGS:
case SID_GETREDOSTRINGS:
{
- SfxUndoManager* pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- UniString(SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString(::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWh )
{
nCount = pTmpUndoMgr->GetUndoActionCount();
- fnGetComment = &SfxUndoManager::GetUndoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetUndoActionComment;
}
else
{
nCount = pTmpUndoMgr->GetRedoActionCount();
- fnGetComment = &SfxUndoManager::GetRedoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
if( nCount )
{
String sList;
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pTmpUndoMgr->*fnGetComment)( n ) )
+ ( sList += (pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
+= '\n';
SfxStringListItem aItem( nWh );
@@ -1292,7 +1310,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
}
-SfxUndoManager *SmDocShell::GetUndoManager()
+::svl::IUndoManager *SmDocShell::GetUndoManager()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetUndoManager" );
@@ -1313,7 +1331,7 @@ void SmDocShell::SaveSymbols()
void SmDocShell::Draw(OutputDevice *pDevice,
const JobSetup &,
- USHORT /*nAspect*/)
+ sal_uInt16 /*nAspect*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
@@ -1390,13 +1408,13 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
}
}
-ULONG SmDocShell::GetMiscStatus() const
+sal_uLong SmDocShell::GetMiscStatus() const
{
return SfxObjectShell::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
-void SmDocShell::SetModified(BOOL bModified)
+void SmDocShell::SetModified(sal_Bool bModified)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetModified" );
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 28694ee767..f0e0e03fbd 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -82,7 +82,7 @@ using namespace com::sun::star::uno;
void SmGetLeftSelectionPart(const ESelection &rSel,
- USHORT &nPara, USHORT &nPos)
+ sal_uInt16 &nPara, sal_uInt16 &nPos)
// returns paragraph number and position of the selections left part
{
// compare start and end of selection and use the one that comes first
@@ -248,7 +248,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
//! see also SmDocShell::GetEditEngine() !
//!
- pEditEngine->SetDefTab( USHORT( GetTextWidth( C2S("XXXX") ) ) );
+ pEditEngine->SetDefTab( sal_uInt16( GetTextWidth( C2S("XXXX") ) ) );
SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool );
@@ -289,7 +289,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
if (pView)
{
// get row and column to look for
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(aNewSelection, nRow, nCol);
nRow++;
nCol++;
@@ -701,7 +701,7 @@ bool SmEditWindow::IsAllSelected() const
if (pEditEngine && pEditView)
{
ESelection eSelection( pEditView->GetSelection() );
- INT32 nParaCnt = pEditEngine->GetParagraphCount();
+ sal_Int32 nParaCnt = pEditEngine->GetParagraphCount();
if (!(nParaCnt - 1))
{
String Text( pEditEngine->GetText( LINEEND_LF ) );
@@ -725,7 +725,7 @@ void SmEditWindow::SelectAll()
}
}
-void SmEditWindow::InsertCommand(USHORT nCommand)
+void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
{
OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
@@ -764,7 +764,7 @@ void SmEditWindow::MarkError(const Point &rPos)
if (pEditView)
{
const xub_StrLen nCol = sal::static_int_cast< xub_StrLen >(rPos.X());
- const USHORT nRow = sal::static_int_cast< USHORT >(rPos.Y() - 1);
+ const sal_uInt16 nRow = sal::static_int_cast< sal_uInt16 >(rPos.Y() - 1);
pEditView->SetSelection(ESelection(nRow, nCol - 1, nRow, nCol));
GrabFocus();
@@ -779,10 +779,10 @@ void SmEditWindow::SelNextMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = eSelection.nEndPos;
+ sal_uInt16 Pos = eSelection.nEndPos;
String aMark (C2S("<?>"));
String aText;
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
while (eSelection.nEndPara < nCounts)
{
@@ -809,15 +809,15 @@ void SmEditWindow::SelPrevMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = STRING_NOTFOUND;
+ sal_uInt16 Pos = STRING_NOTFOUND;
xub_StrLen Max = eSelection.nStartPos;
String Text( pEditEngine->GetText( eSelection.nStartPara ) );
String aMark (C2S("<?>"));
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
do
{
- USHORT Fnd = Text.Search(aMark, 0);
+ sal_uInt16 Fnd = Text.Search(aMark, 0);
while ((Fnd < Max) && (Fnd != STRING_NOTFOUND))
{
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 4d503347b0..e979681a0e 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -38,7 +38,7 @@
/////////////////////////////////////////////////////////////////
// Latin default-fonts
-static const USHORT aLatinDefFnts[FNT_END] =
+static const sal_uInt16 aLatinDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -54,7 +54,7 @@ static const USHORT aLatinDefFnts[FNT_END] =
//! we use non-asian fonts for variables, functions and numbers since they
//! look better and even in asia only latin letters will be used for those.
//! At least that's what I was told...
-static const USHORT aCJKDefFnts[FNT_END] =
+static const sal_uInt16 aCJKDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -67,7 +67,7 @@ static const USHORT aCJKDefFnts[FNT_END] =
};
// CTL default-fonts
-static const USHORT aCTLDefFnts[FNT_END] =
+static const sal_uInt16 aCTLDefFnts[FNT_END] =
{
DEFAULTFONT_CTL_TEXT, // FNT_VARIABLE
DEFAULTFONT_CTL_TEXT, // FNT_FUNCTION
@@ -80,7 +80,7 @@ static const USHORT aCTLDefFnts[FNT_END] =
};
-String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
+String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
{
OSL_ENSURE( /*FNT_BEGIN <= nIdent &&*/ nIdent <= FNT_END,
"index out opd range" );
@@ -89,7 +89,7 @@ String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
return String::CreateFromAscii( FNTNAME_MATH );
else
{
- const USHORT *pTable;
+ const sal_uInt16 *pTable;
switch ( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) )
{
case SCRIPTTYPE_LATIN : pTable = aLatinDefFnts; break;
@@ -167,7 +167,7 @@ SmFormat::SmFormat()
vFont[FNT_SANS] .SetItalic(ITALIC_NONE);
vFont[FNT_FIXED] .SetItalic(ITALIC_NONE);
- for ( USHORT i = FNT_BEGIN; i <= FNT_END; i++ )
+ for ( sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++ )
{
SmFace &rFace = vFont[i];
rFace.SetTransparent( true );
@@ -178,7 +178,7 @@ SmFormat::SmFormat()
}
-void SmFormat::SetFont(USHORT nIdent, const SmFace &rFont, bool bDefault )
+void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault )
{
vFont[nIdent] = rFont;
vFont[nIdent].SetTransparent( true );
@@ -196,7 +196,7 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
SetGreekCharStyle(rFormat.GetGreekCharStyle());
SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets());
- USHORT i;
+ sal_uInt16 i;
for (i = FNT_BEGIN; i <= FNT_END; i++)
{
SetFont(i, rFormat.GetFont(i));
@@ -219,7 +219,7 @@ bool SmFormat::operator == (const SmFormat &rFormat) const
bIsTextmode == rFormat.bIsTextmode &&
bScaleNormalBrackets == rFormat.bScaleNormalBrackets;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i <= SIZ_END && bRes; ++i)
{
if (vSize[i] != rFormat.vSize[i])
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
index b91691754a..520708b555 100644..100755
--- a/starmath/source/makefile.mk
+++ b/starmath/source/makefile.mk
@@ -45,10 +45,13 @@ SMDLL=TRUE
SRS2NAME =smres
SRC2FILES = smres.src \
symbol.src \
+ toolbox.src \
commands.src
SLO1FILES = \
$(SLO)$/accessibility.obj \
+ $(SLO)$/caret.obj \
+ $(SLO)$/cursor.obj \
$(SLO)$/edit.obj \
$(SLO)$/eqnolefilehdr.obj \
$(SLO)$/mathmlexport.obj \
@@ -62,21 +65,19 @@ SLO1FILES = \
$(SLO)$/dialog.obj \
$(SLO)$/document.obj \
$(SLO)$/format.obj \
- $(SLO)$/mathtype.obj \
- $(SLO)$/node.obj \
- $(SLO)$/visitors.obj \
- $(SLO)$/caret.obj \
- $(SLO)$/cursor.obj \
- $(SLO)$/parse.obj \
+ $(SLO)$/mathtype.obj \
+ $(SLO)$/node.obj \
+ $(SLO)$/parse.obj \
$(SLO)$/register.obj \
$(SLO)$/smdll.obj \
$(SLO)$/toolbox.obj \
$(SLO)$/typemap.obj \
$(SLO)$/smmod.obj \
- $(SLO)$/utility.obj \
+ $(SLO)$/utility.obj \
$(SLO)$/rect.obj \
$(SLO)$/unomodel.obj \
- $(SLO)$/view.obj
+ $(SLO)$/view.obj \
+ $(SLO)$/visitors.obj
SLO2FILES = \
$(SLO)$/register.obj \
@@ -95,9 +96,6 @@ LIB1OBJFILES = \
# --- Targets -------------------------------------------------------
-LOCALIZE_ME = menu_tmpl.src
-
-
.INCLUDE : target.mk
$(INCCOM)$/dllname.hxx: makefile.mk
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index db08bfef33..1c13a58759 100644..100755
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -80,6 +80,7 @@
#include <unomodel.hxx>
#include <document.hxx>
#include <utility.hxx>
+#include <config.hxx>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
@@ -726,6 +727,9 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
PropertyValue* pProps = rProps.getArray();
if (pProps)
{
+ SmConfig *pConfig = SM_MOD()->GetConfig();
+ const bool bUsedSymbolsOnly = pConfig ? pConfig->IsSaveOnlyUsedSymbols() : false;
+
const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) );
const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) );
const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) );
@@ -739,7 +743,14 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
rPropName != sRuntimeUID)
{
pProps->Name = rPropName;
- pProps->Value = xProps->getPropertyValue(rPropName);
+
+ rtl::OUString aActualName( rPropName );
+
+ // handle 'save used symbols only'
+ if (bUsedSymbolsOnly && rPropName.equalsAscii("Symbols"))
+ aActualName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "UserDefinedSymbolsInUse" ) );
+
+ pProps->Value = xProps->getPropertyValue( aActualName );
}
}
}
@@ -766,12 +777,13 @@ void SmXMLExport::ExportUnaryHorizontal(const SmNode *pNode, int nLevel)
void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pRow=0;
- ULONG nSize = pNode->GetNumSubNodes();
+ sal_uLong nSize = pNode->GetNumSubNodes();
- if (nSize > 1)
+ // #i115443: nodes of type expression always need to be grouped with mrow statement
+ if (nSize > 1 || (pNode && pNode->GetType() == NEXPRESSION))
pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True);
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
ExportNodes(pTemp, nLevel+1);
@@ -790,7 +802,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pTable=0;
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//If the list ends in newline then the last entry has
//no subnodes, the newline is superfulous so we just drop
@@ -804,7 +816,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
if (nLevel || (nSize >1))
pTable = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
{
SvXMLElementExport *pRow=0;
@@ -1370,11 +1382,11 @@ void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel)
{
SvXMLElementExport aTable(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
const SmMatrixNode *pMatrix = static_cast<const SmMatrixNode *>(pNode);
- USHORT i=0;
- for (ULONG y = 0; y < pMatrix->GetNumRows(); y++)
+ sal_uInt16 i=0;
+ for (sal_uLong y = 0; y < pMatrix->GetNumRows(); y++)
{
SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True);
- for (ULONG x = 0; x < pMatrix->GetNumCols(); x++)
+ for (sal_uLong x = 0; x < pMatrix->GetNumCols(); x++)
if (const SmNode *pTemp = pNode->GetSubNode(i++))
{
SvXMLElementExport aCell(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True);
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 4e425d9c7f..e28d8e820c 100644..100755
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -94,9 +94,9 @@ using ::rtl::OUStringBuffer;
////////////////////////////////////////////////////////////
-ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
+sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
uno::Reference<lang::XMultiServiceFactory> xServiceFactory(
utl::getProcessServiceFactory());
@@ -201,7 +201,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
if (xStatusIndicator.is())
xStatusIndicator->setValue(nSteps++);
- ULONG nWarn = ReadThroughComponent(
+ sal_uLong nWarn = ReadThroughComponent(
rMedium.GetStorage(), xModelComp, "meta.xml", "Meta.xml",
xServiceFactory, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaImporter"
@@ -252,7 +252,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
/// read a component (file + filter version)
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
Reference<io::XInputStream> xInputStream,
Reference<XComponent> xModelComponent,
Reference<lang::XMultiServiceFactory> & rFactory,
@@ -260,7 +260,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
const sal_Char* pFilterName,
sal_Bool bEncrypted )
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
OSL_ENSURE(xInputStream.is(), "input stream missing");
OSL_ENSURE(xModelComponent.is(), "document missing");
OSL_ENSURE(rFactory.is(), "factory missing");
@@ -356,7 +356,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
}
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
const uno::Reference< embed::XStorage >& xStorage,
Reference<XComponent> xModelComponent,
const sal_Char* pStreamName,
@@ -845,7 +845,7 @@ public:
class SmXMLRowContext_Impl : public SmXMLDocContext_Impl
{
protected:
- ULONG nElementCount;
+ sal_uLong nElementCount;
public:
SmXMLRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
@@ -1069,7 +1069,7 @@ void SmXMLFencedContext_Impl::EndElement()
aToken.aText = ',';
aToken.eType = TIDENT;
- ULONG i = rNodeStack.Count() - nElementCount;
+ sal_uLong i = rNodeStack.Count() - nElementCount;
if (rNodeStack.Count() - nElementCount > 1)
i += rNodeStack.Count() - 1 - nElementCount;
aRelationArray.resize(i);
@@ -1461,8 +1461,11 @@ public:
void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup)
{
/*The <msub> element requires exactly 2 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -1474,7 +1477,7 @@ void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[eSubSup+1] = rNodeStack.Pop();
@@ -1520,8 +1523,10 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
SmSubSup aSub,SmSubSup aSup)
{
/*The <msub> element requires exactly 3 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 3,
- "SubSup has not three arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 3;
+ OSL_ENSURE( bNodeCheck, "SubSup has not three arguments" );
+ if (!bNodeCheck)
+ return;
SmToken aToken;
aToken.cMathChar = '\0';
@@ -1534,7 +1539,7 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[aSup+1] = rNodeStack.Pop();
@@ -1569,8 +1574,10 @@ void SmXMLUnderContext_Impl::StartElement(const uno::Reference<
void SmXMLUnderContext_Impl::HandleAccent()
{
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
+ if (!bNodeCheck)
+ return;
/*Just one special case for the underline thing*/
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
@@ -1645,8 +1652,11 @@ void SmXMLOverContext_Impl::EndElement()
void SmXMLOverContext_Impl::HandleAccent()
{
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE (bNodeCheck, "Sub has not two arguments");
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -1853,17 +1863,17 @@ class SmXMLFlatDocContext_Impl
{
public:
SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder);
virtual ~SmXMLFlatDocContext_Impl();
- virtual SvXMLImportContext *CreateChildContext(USHORT i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
};
SmXMLFlatDocContext_Impl::SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) :
SvXMLImportContext(i_rImport, i_nPrefix, i_rLName),
@@ -1878,7 +1888,7 @@ SmXMLFlatDocContext_Impl::~SmXMLFlatDocContext_Impl()
}
SvXMLImportContext *SmXMLFlatDocContext_Impl::CreateChildContext(
- USHORT i_nPrefix, const OUString& i_rLocalName,
+ sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList)
{
// behave like meta base class iff we encounter office:meta
@@ -2172,7 +2182,7 @@ void SmXMLDocContext_Impl::EndElement()
ContextArray.resize(1);
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=0;i< 1;i++)
+ for (sal_uLong i=0;i< 1;i++)
ContextArray[i] = rNodeStack.Pop();
SmToken aDummy;
@@ -2181,9 +2191,9 @@ void SmXMLDocContext_Impl::EndElement()
rNodeStack.Push(pSNode);
SmNodeArray LineArray;
- ULONG n = rNodeStack.Count();
+ sal_uLong n = rNodeStack.Count();
LineArray.resize(n);
- for (ULONG j = 0; j < n; j++)
+ for (sal_uLong j = 0; j < n; j++)
LineArray[n - (j + 1)] = rNodeStack.Pop();
SmStructureNode *pSNode2 = new SmTableNode(aDummy);
pSNode2->SetSubNodes(LineArray);
@@ -2192,6 +2202,12 @@ void SmXMLDocContext_Impl::EndElement()
void SmXMLFracContext_Impl::EndElement()
{
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ const bool bNodeCheck = rNodeStack.Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Fraction (mfrac) tag is missing component" );
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -2199,23 +2215,19 @@ void SmXMLFracContext_Impl::EndElement()
aToken.eType = TOVER;
SmStructureNode *pSNode = new SmBinVerNode(aToken);
SmNode *pOper = new SmRectangleNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- OSL_ENSURE(rNodeStack.Count() - nElementCount == 2,
- "Fraction (mfrac) tag is missing component");
- if (rNodeStack.Count() - nElementCount == 2)
- {
- SmNode *pSecond = rNodeStack.Pop();
- SmNode *pFirst = rNodeStack.Pop();
- pSNode->SetSubNodes(pFirst,pOper,pSecond);
- rNodeStack.Push(pSNode);
- }
+ SmNode *pSecond = rNodeStack.Pop();
+ SmNode *pFirst = rNodeStack.Pop();
+ pSNode->SetSubNodes(pFirst,pOper,pSecond);
+ rNodeStack.Push(pSNode);
}
void SmXMLRootContext_Impl::EndElement()
{
/*The <mroot> element requires exactly 2 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Root tag is missing component");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Root tag is missing component");
+ if (!bNodeCheck)
+ return;
SmToken aToken;
aToken.cMathChar = MS_SQRT; //Temporary: alert, based on StarSymbol font
@@ -2257,12 +2269,12 @@ void SmXMLRowContext_Impl::EndElement()
{
SmNodeArray aRelationArray;
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- ULONG nSize = rNodeStack.Count()-nElementCount;
+ sal_uLong nSize = rNodeStack.Count()-nElementCount;
if (nSize > 0)
{
aRelationArray.resize(nSize);
- for (ULONG j=rNodeStack.Count()-nElementCount;j > 0;j--)
+ for (sal_uLong j=rNodeStack.Count()-nElementCount;j > 0;j--)
aRelationArray[j-1] = rNodeStack.Pop();
@@ -2452,8 +2464,9 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
{
bHasPrescripts=true;
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount > 0,
- "Sub has no arguments");
+ OSL_ENSURE( GetSmImport().GetNodeStack().Count() - nElementCount > 0,
+ "Sub has no arguments");
+
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
if (rNodeStack.Count()-nElementCount > 1)
{
@@ -2462,7 +2475,7 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TRSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
@@ -2471,14 +2484,14 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aReverseStack.Push(pThing);
}
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2511,11 +2524,11 @@ void SmXMLTableContext_Impl::EndElement()
SmNodeStack aReverseStack;
aExpressionArray.resize(rNodeStack.Count()-nElementCount);
- ULONG nRows = rNodeStack.Count()-nElementCount;
- USHORT nCols = 0;
+ sal_uLong nRows = rNodeStack.Count()-nElementCount;
+ sal_uInt16 nCols = 0;
SmStructureNode *pArray;
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 0;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 0;i--)
{
pArray = (SmStructureNode *)rNodeStack.Pop();
if (pArray->GetNumSubNodes() == 0)
@@ -2541,11 +2554,11 @@ void SmXMLTableContext_Impl::EndElement()
aReverseStack.Push(pArray);
}
aExpressionArray.resize(nCols*nRows);
- ULONG j=0;
+ sal_uLong j=0;
while (aReverseStack.Count())
{
pArray = (SmStructureNode *)aReverseStack.Pop();
- for (USHORT i=0;i<pArray->GetNumSubNodes();i++)
+ for (sal_uInt16 i=0;i<pArray->GetNumSubNodes();i++)
aExpressionArray[j++] = pArray->GetSubNode(i);
}
@@ -2556,7 +2569,7 @@ void SmXMLTableContext_Impl::EndElement()
aToken.eType = TMATRIX;
SmMatrixNode *pSNode = new SmMatrixNode(aToken);
pSNode->SetSubNodes(aExpressionArray);
- pSNode->SetRowCol(static_cast<USHORT>(nRows),nCols);
+ pSNode->SetRowCol(static_cast<sal_uInt16>(nRows),nCols);
rNodeStack.Push(pSNode);
}
@@ -2619,19 +2632,19 @@ void SmXMLMultiScriptsContext_Impl::EndElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TLSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
aReverseStack.Push(rNodeStack.Pop());
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2661,7 +2674,7 @@ void SmXMLActionContext_Impl::EndElement()
first pushed one*/
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 1;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 1;i--)
{
delete rNodeStack.Pop();
}
@@ -3005,7 +3018,12 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
if ( xInfo->hasPropertyByName( pValues->Name ) )
xProps->setPropertyValue( pValues->Name, pValues->Value );
}
- catch( Exception& )
+ catch (beans::PropertyVetoException &e)
+ {
+ (void) e;
+ // dealing with read-only properties here. Nothing to do...
+ }
+ catch( Exception& e)
{
OSL_FAIL( "SmXMLImport::SetConfigurationSettings: Exception!" );
}
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 21572f4ece..804b8b44c5 100644..100755
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -55,9 +55,9 @@ public:
SmXMLImportWrapper(com::sun::star::uno::Reference<com::sun::star::frame::XModel> &rRef)
: xModel(rRef) {}
- ULONG Import(SfxMedium &rMedium);
+ sal_uLong Import(SfxMedium &rMedium);
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory,
@@ -66,7 +66,7 @@ public:
const sal_Char* pFilterName,
sal_Bool bEncrypted );
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
const sal_Char* pStreamName,
@@ -251,10 +251,10 @@ public:
const SvXMLTokenMap &GetPresTableElemTokenMap();
const SvXMLTokenMap &GetColorTokenMap();
- SmNodeStack & GetNodeStack() {return aNodeStack;}
- SmNode *GetTree() { return aNodeStack.Pop();}
- sal_Bool GetSuccess() { return bSuccess; }
- String &GetText() { return aText;}
+ SmNodeStack & GetNodeStack() { return aNodeStack; }
+ SmNode *GetTree() { return aNodeStack.Pop(); }
+ sal_Bool GetSuccess() { return bSuccess; }
+ String &GetText() { return aText; }
virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index f50ea4e0eb..8724938451 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -107,8 +107,8 @@ void MathType::Init()
/*ToDo replace with table rather than switch, returns
- TRUE in the case that the char is just a char, and
- FALSE if the character is an operator which must not be
+ sal_True in the case that the char is just a char, and
+ sal_False if the character is an operator which must not be
placed inside the quote sequence designed to protect
against being parsed as a keyword
@@ -615,7 +615,7 @@ int MathType::Parse(SotStorage *pStor)
//sigh, theres no point! MathType (in some bizarre subvarient) pads
//the end of the formula with ENDs (0)'s
- ULONG nEnd = pS->Tell();
+ sal_uLong nEnd = pS->Tell();
OSL_ENSURE(nEnd == pS->Seek(STREAM_SEEK_TO_END),
"Possibly unfully parsed formula");
# endif
@@ -2026,8 +2026,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
case NEXPRESSION:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2043,8 +2043,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
{
*pS << sal_uInt8(0x0a);
*pS << sal_uInt8(LINE);
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
*pS << sal_uInt8(END);
@@ -2063,8 +2063,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
default:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2110,15 +2110,15 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
int nBytes=(pMatrix->GetNumRows()+1)*2/8;
if (((pMatrix->GetNumRows()+1)*2)%8)
nBytes++;
- for (USHORT j = 0; j < nBytes; j++)
+ for (sal_uInt16 j = 0; j < nBytes; j++)
*pS << sal_uInt8(0x00); //row_parts
nBytes=(pMatrix->GetNumCols()+1)*2/8;
if (((pMatrix->GetNumCols()+1)*2)%8)
nBytes++;
- for (USHORT k = 0; k < nBytes; k++)
+ for (sal_uInt16 k = 0; k < nBytes; k++)
*pS << sal_uInt8(0x00); //col_parts
- USHORT nSize = pMatrix->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pMatrix->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pMatrix->GetSubNode(i))
{
*pS << sal_uInt8(LINE); //line
@@ -2132,7 +2132,7 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
//Root Node, PILE equivalent, i.e. vertical stack
void MathType::HandleTable(SmNode *pNode,int nLevel)
{
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//The root of the starmath is a table, if
//we convert this them each iteration of
//conversion from starmath to mathtype will
@@ -2150,7 +2150,7 @@ void MathType::HandleTable(SmNode *pNode,int nLevel)
*pS << sal_uInt8(0x01); //hAlign
}
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
{
*pS << sal_uInt8(LINE);
@@ -2195,7 +2195,7 @@ void MathType::HandleRoot(SmNode *pNode,int nLevel)
}
sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos,sal_Bool bTest)
+ sal_uLong *pPos,sal_Bool bTest)
{
sal_uInt8 nVariation2=0xff;
@@ -2385,7 +2385,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
*pS << sal_uInt8(TMPL); //Template
bIsReInterpBrace=0;
sal_uInt8 nBSpec=0x10;
- ULONG nLoc = pS->Tell();
+ sal_uLong nLoc = pS->Tell();
if (pLeft)
{
switch (pLeft->GetToken().eType)
@@ -2443,7 +2443,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
HandleNodes(pLeft,nLevel+1);
if (bIsReInterpBrace)
{
- ULONG nLoc2 = pS->Tell();
+ sal_uLong nLoc2 = pS->Tell();
pS->Seek(nLoc);
*pS << sal_uInt8(0x2D);
pS->Seek(nLoc2);
@@ -2491,7 +2491,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
if (HandleLim(pNode,nLevel))
return;
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt8 nVariation;
switch (pNode->GetToken().eType)
@@ -2513,7 +2513,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
sal_uInt8 nOldVariation=nVariation;
sal_uInt8 nIntVariation=nVariation;
- ULONG nPos2=0;
+ sal_uLong nPos2=0;
if (nVariation != 0xff)
{
nPos2 = pS->Tell();
@@ -3078,8 +3078,8 @@ void MathType::HandleMAlign(SmNode *pNode,int nLevel)
nHAlign=1;
break;
}
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
nHAlign=nPushedHAlign;
@@ -3261,7 +3261,7 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
{
if ((nInsertion != 0) && NULL != (pTemp = pNode->GetSubNode(0)))
{
- ULONG nPos = pS->Tell();
+ sal_uLong nPos = pS->Tell();
nInsertion--;
pS->Seek(nInsertion);
switch(pTemp->GetToken().eType)
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index ec3aa24db7..c29c665b01 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -123,7 +123,7 @@ private:
void HandleRoot(SmNode *pNode,int nLevel);
void HandleSubSupScript(SmNode *pNode,int nLevel);
sal_uInt8 HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos=NULL,sal_Bool bTest=TRUE);
+ sal_uLong *pPos=NULL,sal_Bool bTest=sal_True);
void HandleFractions(SmNode *pNode,int nLevel);
void HandleBrace(SmNode *pNode,int nLevel);
void HandleVerticalBrace(SmNode *pNode,int nLevel);
@@ -142,7 +142,7 @@ private:
sal_uInt8 nVAlign;
int nPendingAttributes;
- ULONG nInsertion;
+ sal_uLong nInsertion;
sal_Int16 aSizeTable[7];
sal_Int16 nDefaultSize;
diff --git a/starmath/source/menu_tmpl.src b/starmath/source/menu_tmpl.src
deleted file mode 100644
index 70348c73d0..0000000000
--- a/starmath/source/menu_tmpl.src
+++ /dev/null
@@ -1,160 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#ifndef _SFX_HRC //autogen
-#include <sfx2/sfx.hrc>
-#endif
-#ifndef _GLOBLMN_HRC //autogen
-#include <svx/globlmn.hrc>
-#endif
-#ifndef _GLOBALACC_SRC //autogen
-#include <svx/globlac.hrc>
-#endif
-#ifndef _SVX_SVXIDS_HRC //autogen
-#include <svx/svxids.hrc>
-#endif
-
-#ifndef _STARMATH_HRC
-#include "starmath.hrc"
-#endif
-
-#ifndef MN_HELP
-#define MN_HELP
-#endif
-
-/////////////////////////////////////////////////////////////////
-
-/*
-
-The application menu bar resource has become obsolete. You can now find the menu bar definition at:
-<project>/smath/menubar/menubar.xml.
-
-*/
-
-/////////////////////////////////////////////////////////////////
-
-Accelerator RID_SMACCEL
-{
- ItemList =
- {
- AI_UNDO
- AI_REDO
- AcceleratorItem
- {
- Identifier = SID_SELECT ;
- Key = KeyCode
- {
- Code = KEY_A ;
- Modifier1 = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_NEXTMARK ;
- Key = KeyCode
- {
- Code = KEY_F4 ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_PREVMARK ;
- Key = KeyCode
- {
- Code = KEY_F4 ;
- Shift = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_NEXTERR ;
- Key = KeyCode
- {
- Code = KEY_F3 ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_PREVERR ;
- Key = KeyCode
- {
- Code = KEY_F3 ;
- Shift = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_DRAW ;
- Key = KeyCode
- {
- Code = KEY_F9 ;
- };
- };
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 00e3e3ea26..c2a7556964 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -50,8 +50,13 @@
#include <math.h>
#include <float.h>
+
#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
+
+using ::rtl::OUString;
+
+
////////////////////////////////////////
// SmTmpDevice
// Allows for font and color changes. The original settings will be restored
@@ -157,13 +162,13 @@ bool SmNode::IsVisible() const
}
-USHORT SmNode::GetNumSubNodes() const
+sal_uInt16 SmNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -187,8 +192,8 @@ void SmNode::SetPhantom(bool bIsPhantomP)
bIsPhantom = bIsPhantomP;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetPhantom(bIsPhantom);
}
@@ -200,14 +205,14 @@ void SmNode::SetColor(const Color& rColor)
GetFont().SetColor(rColor);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetColor(rColor);
}
-void SmNode::SetAttribut(USHORT nAttrib)
+void SmNode::SetAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -218,14 +223,14 @@ void SmNode::SetAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetAttribut(nAttrib);
}
-void SmNode::ClearAttribut(USHORT nAttrib)
+void SmNode::ClearAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -236,8 +241,8 @@ void SmNode::ClearAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->ClearAttribut(nAttrib);
}
@@ -249,14 +254,14 @@ void SmNode::SetFont(const SmFace &rFace)
GetFont() = rFace;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFont(rFace);
}
-void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
+void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
//! 'rSize' is in units of pts
{
Size aFntSize;
@@ -304,8 +309,8 @@ void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFontSize(rSize, nType);
}
@@ -316,8 +321,8 @@ void SmNode::SetSize(const Fraction &rSize)
GetFont() *= rSize;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetSize(rSize);
}
@@ -331,8 +336,8 @@ void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree )
if (bApplyToSubTree)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetRectHorAlign(eHorAlign);
}
@@ -370,8 +375,8 @@ void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
GetFont().SetItalic(ITALIC_NONE);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Prepare(rFormat, rDocShell);
}
@@ -386,8 +391,8 @@ void SmNode::ToggleDebug() const
pThis->bIsDebug = bIsDebug ? false : true;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = pThis->GetSubNode(i)))
pNode->ToggleDebug();
}
@@ -402,8 +407,8 @@ void SmNode::Move(const Point& rPosition)
SmRect::Move(rPosition);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Move(rPosition);
}
@@ -412,8 +417,8 @@ void SmNode::Move(const Point& rPosition)
void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
}
@@ -421,10 +426,10 @@ void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->CreateTextFromNode(rText);
if (nSize > 1)
@@ -435,17 +440,17 @@ void SmNode::CreateTextFromNode(String &rText)
}
-void SmNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG /*nWidth*/)
+void SmNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong /*nWidth*/)
{
}
-void SmNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG /*nHeight*/)
+void SmNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong /*nHeight*/)
{
}
-const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
+const SmNode * SmNode::FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const
// returns (first) ** visible ** (sub)node with the tokens text at
// position 'nRow', 'nCol'.
//! (there should be exactly one such node if any)
@@ -456,8 +461,8 @@ const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
return this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -482,8 +487,8 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -529,8 +534,8 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{
const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -639,17 +644,23 @@ void SmNode::DumpAsDot(std::ostream &out, String* label, int number, int& id, in
}
#endif /* DEBUG_ENABLE_DUMPASDOT */
+long SmNode::GetFormulaBaseline() const
+{
+ DBG_ASSERT( 0, "This dummy implementation should not have been called." );
+ return 0;
+}
+
///////////////////////////////////////////////////////////////////////////
SmStructureNode::SmStructureNode( const SmStructureNode &rNode ) :
SmNode( rNode.GetType(), rNode.GetToken() )
{
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -664,7 +675,7 @@ SmStructureNode::~SmStructureNode()
{
SmNode *pNode;
- for (USHORT i = 0; i < GetNumSubNodes(); i++)
+ for (sal_uInt16 i = 0; i < GetNumSubNodes(); i++)
if (NULL != (pNode = GetSubNode(i)))
delete pNode;
}
@@ -674,12 +685,12 @@ SmStructureNode & SmStructureNode::operator = ( const SmStructureNode &rNode )
{
SmNode::operator = ( rNode );
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -721,13 +732,13 @@ bool SmStructureNode::IsVisible() const
}
-USHORT SmStructureNode::GetNumSubNodes() const
+sal_uInt16 SmStructureNode::GetNumSubNodes() const
{
- return (USHORT) aSubNodes.size();
+ return (sal_uInt16) aSubNodes.size();
}
-SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
+SmNode * SmStructureNode::GetSubNode(sal_uInt16 nIndex)
{
return aSubNodes[nIndex];
}
@@ -735,8 +746,8 @@ SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
void SmStructureNode::GetAccessibleText( String &rText ) const
{
- USHORT nNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNodes; ++i)
+ sal_uInt16 nNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNodes; ++i)
{
const SmNode *pNode = ((SmStructureNode *) this)->GetSubNode(i);
if (pNode)
@@ -757,13 +768,13 @@ bool SmVisibleNode::IsVisible() const
}
-USHORT SmVisibleNode::GetNumSubNodes() const
+sal_uInt16 SmVisibleNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmVisibleNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmVisibleNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -782,10 +793,10 @@ void SmGraphicNode::GetAccessibleText( String &rText ) const
void SmExpressionNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{
pNode->CreateTextFromNode(rText);
@@ -812,7 +823,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point rPosition;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
// make distance depend on font size
long nDist = +(rFormat.GetDistance(DIS_VERTICAL)
@@ -824,7 +835,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arrange subnodes and get maximum width of them
long nMaxWidth = 0,
nTmp;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{ pNode->Arrange(rDev, rFormat);
@@ -833,7 +844,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
Point aPos;
- SmRect::operator = (SmRect(nMaxWidth, 0));
+ SmRect::operator = (SmRect(nMaxWidth, 1));
for (i = 0; i < nSize; i++)
{ if (NULL != (pNode = GetSubNode(i)))
{ const SmRect &rNodeRect = pNode->GetRect();
@@ -848,6 +859,22 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
ExtendBy(rNodeRect, nSize > 1 ? RCP_NONE : RCP_ARG);
}
}
+ // --> 4.7.2010 #i972#
+ if (HasBaseline())
+ nFormulaBaseline = GetBaseline();
+ else
+ {
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ aTmpDev.SetFont(GetFont());
+
+ SmRect aRect = (SmRect(aTmpDev, &rFormat, C2S("a"),
+ GetFont().GetBorderWidth()));
+ nFormulaBaseline = GetAlignM();
+ // move from middle position by constant - distance
+ // between middle and baseline for single letter
+ nFormulaBaseline += aRect.GetBaseline() - aRect.GetAlignM();
+ }
+ // <--
}
@@ -857,6 +884,12 @@ SmNode * SmTableNode::GetLeftMost()
}
+long SmTableNode::GetFormulaBaseline() const
+{
+ return nFormulaBaseline;
+}
+
+
/**************************************************************************/
@@ -878,8 +911,8 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arranges all subnodes in one row with some extra space between
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- USHORT i;
+ sal_uInt16 nSize = GetNumSubNodes();
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
@@ -887,20 +920,21 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
- // provide an empty rectangle with alignment parameters for the "current"
- // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the
- // same sub-/supscript positions.)
- //! be sure to use a character that has explicitly defined HiAttribut
- //! line in rect.cxx such as 'a' in order to make 'vec a' look same to
- //! 'vec {a}'.
- SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"),
- GetFont().GetBorderWidth()));
- // make sure that the rectangle occupies (almost) no space
- SetWidth(1);
- SetItalicSpaces(0, 0);
-
if (nSize < 1)
+ {
+ // provide an empty rectangle with alignment parameters for the "current"
+ // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the
+ // same sub-/supscript positions.)
+ //! be sure to use a character that has explicitly defined HiAttribut
+ //! line in rect.cxx such as 'a' in order to make 'vec a' look same to
+ //! 'vec {a}'.
+ SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"),
+ GetFont().GetBorderWidth()));
+ // make sure that the rectangle occupies (almost) no space
+ SetWidth(1);
+ SetItalicSpaces(0, 0);
return;
+ }
// make distance depend on font size
long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L;
@@ -908,14 +942,17 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nDist = 0;
Point aPos;
- for (i = 0; i < nSize; i++)
+ // copy the first node into LineNode and extend by the others
+ if (NULL != (pNode = GetSubNode(0)))
+ SmRect::operator = (pNode->GetRect());
+
+ for (i = 1; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{
aPos = pNode->AlignTo(*this, RP_RIGHT, RHA_CENTER, RVA_BASELINE);
- // no horizontal space before first node
- if (i)
- aPos.X() += nDist;
+ // add horizontal space to the left for each but the first sub node
+ aPos.X() += nDist;
pNode->MoveTo(aPos);
ExtendBy( *pNode, RCP_XOR );
@@ -1227,14 +1264,14 @@ bool IsPointInLine(const Point &rPoint1,
}
-USHORT GetLineIntersectionPoint(Point &rResult,
+sal_uInt16 GetLineIntersectionPoint(Point &rResult,
const Point& rPoint1, const Point &rHeading1,
const Point& rPoint2, const Point &rHeading2)
{
OSL_ENSURE(rHeading1 != Point(), "Sm : 0 vector");
OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
- USHORT nRes = 1;
+ sal_uInt16 nRes = 1;
const double eps = 5.0 * DBL_EPSILON;
// sind die Richtumgsvektoren linear abhaengig ?
@@ -1506,7 +1543,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// (as would be in "a_{1_{2_{3_4}}}")
if (GetFont().GetSize().Height() > rFormat.GetBaseSize().Height() / 3)
{
- USHORT nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
+ sal_uInt16 nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
SIZ_LIMITS : SIZ_INDEX;
Fraction aFraction ( rFormat.GetRelSize(nIndex), 100 );
pSubSup->SetSize(aFraction);
@@ -1688,10 +1725,10 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
long nFaceHeight = GetFont().GetSize().Height();
// Uebergroesse in % ermitteln
- USHORT nPerc = 0;
+ sal_uInt16 nPerc = 0;
if (!bIsABS && bScale)
{ // im Fall von Klammern mit Uebergroesse...
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
nPerc = rFormat.GetDistance(nIndex);
}
@@ -1762,12 +1799,12 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- USHORT nNumSubNodes = GetNumSubNodes();
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
if (nNumSubNodes == 0)
return;
// arrange arguments
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nNumSubNodes; i += 2)
GetSubNode(i)->Arrange(rDev, rFormat);
@@ -1786,9 +1823,9 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// scale separators to required height and arrange them
bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetSize().Height();
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
- USHORT nPerc = rFormat.GetDistance(nIndex);
+ sal_uInt16 nPerc = rFormat.GetDistance(nIndex);
if (bScale)
nHeight += 2 * (nHeight * nPerc / 100L);
for (i = 1; i < nNumSubNodes; i += 2)
@@ -2130,7 +2167,7 @@ void SmFontNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
break;
}
if (nFnt != -1)
- { GetFont() = rFormat.GetFont( sal::static_int_cast< USHORT >(nFnt) );
+ { GetFont() = rFormat.GetFont( sal::static_int_cast< sal_uInt16 >(nFnt) );
SetFont(GetFont());
}
@@ -2181,7 +2218,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmFontNode::SetSizeParameter(const Fraction& rValue, USHORT Type)
+void SmFontNode::SetSizeParameter(const Fraction& rValue, sal_uInt16 Type)
{
nSizeType = Type;
aFontSize = rValue;
@@ -2199,13 +2236,13 @@ SmPolyLineNode::SmPolyLineNode(const SmToken &rNodeToken)
}
-void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nNewWidth)
+void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nNewWidth)
{
aToSize.Width() = nNewWidth;
}
-void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nNewHeight)
+void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nNewHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nNewHeight;
@@ -2255,13 +2292,13 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
/**************************************************************************/
-void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
nBodyWidth = nWidth;
}
-void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
// etwas extra Laenge damit der horizontale Balken spaeter ueber dem
// Argument positioniert ist
@@ -2272,13 +2309,13 @@ void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
/**************************************************************************/
-void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
aToSize.Width() = nWidth;
}
-void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nHeight)
+void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nHeight;
@@ -2299,7 +2336,7 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
aTmpDev.SetFont(GetFont());
// add some borderspace
- ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
+ sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
nHeight += 2 * nTmpBorderWidth;
//! use this method in order to have 'SmRect::HasAlignInfo() == true'
@@ -2311,14 +2348,14 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
/**************************************************************************/
-SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(eNodeType, rNodeToken)
{
nFontDesc = nFontDescP;
}
-SmTextNode::SmTextNode( const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(NTEXT, rNodeToken)
{
nFontDesc = nFontDescP;
@@ -2355,7 +2392,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- USHORT nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
+ sal_uInt16 nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
SIZ_FUNCTION : SIZ_TEXT;
GetFont() *= Fraction (rFormat.GetRelSize(nSizeDesc), 100);
@@ -2458,9 +2495,9 @@ void SmTextNode::AdjustFontDesc()
void SmMatrixNode::CreateTextFromNode(String &rText)
{
APPEND(rText,"matrix {");
- for (USHORT i = 0; i < nNumRows; i++)
+ for (sal_uInt16 i = 0; i < nNumRows; i++)
{
- for (USHORT j = 0; j < nNumCols; j++)
+ for (sal_uInt16 j = 0; j < nNumCols; j++)
{
SmNode *pNode = GetSubNode(i * nNumCols + j);
pNode->CreateTextFromNode(rText);
@@ -2480,7 +2517,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point aPosition,
aOffset;
SmNode *pNode;
- USHORT i, j;
+ sal_uInt16 i, j;
// initialize array that is to hold the maximum widhts of all
// elements (subnodes) in that column.
@@ -2489,10 +2526,10 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pColWidth[j] = 0;
// arrange subnodes and calculate the aboves arrays contents
- USHORT nNodes = GetNumSubNodes();
+ sal_uInt16 nNodes = GetNumSubNodes();
for (i = 0; i < nNodes; i++)
{
- USHORT nIdx = nNodes - 1 - i;
+ sal_uInt16 nIdx = nNodes - 1 - i;
if (NULL != (pNode = GetSubNode(nIdx)))
{
pNode->Arrange(rDev, rFormat);
@@ -2576,7 +2613,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmMatrixNode::SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols)
+void SmMatrixNode::SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols)
{
nNumRows = nMatrixRows;
nNumCols = nMatrixCols;
@@ -2600,7 +2637,7 @@ SmMathSymbolNode::SmMathSymbolNode(const SmToken &rNodeToken)
SetText( cChar );
}
-void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
+void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, sal_uLong nWidth)
{
// Since there is no function to do this, we try to approximate it:
Size aFntSize (GetFont().GetSize());
@@ -2623,7 +2660,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
GetFont().SetSize(aFntSize);
}
-void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
Size aFntSize (GetFont().GetSize());
@@ -2723,7 +2760,7 @@ void SmRectangleNode::CreateTextFromNode(String &rText)
void SmAttributNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
OSL_ENSURE(nSize == 2, "Node missing members");
rText.Append('{');
sal_Unicode nLast=0;
@@ -2793,7 +2830,7 @@ bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
}
-SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) :
+SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc) :
SmTextNode(eNodeType, rNodeToken, _nFontDesc)
{
bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
@@ -2817,7 +2854,9 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
String aName( GetToken().aText.Copy(1) );
if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName( aName )))
{
- SetText( pSym->GetCharacter() );
+ sal_UCS4 cChar = pSym->GetCharacter();
+ String aTmp( OUString( &cChar, 1 ) );
+ SetText( aTmp );
GetFont() = pSym->GetFace();
}
else
@@ -2846,7 +2885,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
{
OSL_ENSURE( GetText().Len() == 1, "a symbol should only consist of 1 char!" );
bool bItalic = false;
- INT16 nStyle = rFormat.GetGreekCharStyle();
+ sal_Int16 nStyle = rFormat.GetGreekCharStyle();
OSL_ENSURE( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" );
if (nStyle == 1)
bItalic = true;
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 6a649d0e5c..13f0242593 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -85,8 +85,8 @@ SmToken::SmToken() :
SmToken::SmToken(SmTokenType eTokenType,
sal_Unicode cMath,
const sal_Char* pText,
- ULONG nTokenGroup,
- USHORT nTokenLevel) {
+ sal_uLong nTokenGroup,
+ sal_uInt16 nTokenLevel) {
eType = eTokenType;
cMathChar = cMath;
aText.AssignAscii(pText);
@@ -315,8 +315,8 @@ const SmTokenTableEntry * SmParser::GetTokenTableEntry( const String &rName )
const SmTokenTableEntry * pRes = 0;
if (rName.Len())
{
- INT32 nEntries = SAL_N_ELEMENTS(aTokenTable);
- for (INT32 i = 0; i < nEntries; ++i)
+ sal_Int32 nEntries = SAL_N_ELEMENTS(aTokenTable);
+ for (sal_Int32 i = 0; i < nEntries; ++i)
{
if (rName.EqualsIgnoreCaseAscii( aTokenTable[i].pIdent ))
{
@@ -351,7 +351,7 @@ bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
break;
- INT16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
+ sal_Int16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
bool bIsDelim = (*pDelim != 0 ||
nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
nTypJp == com::sun::star::i18n::UnicodeType::CONTROL);
@@ -361,24 +361,24 @@ bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
#endif
-void SmParser::Insert(const String &rText, USHORT nPos)
+void SmParser::Insert(const String &rText, sal_uInt16 nPos)
{
- BufferString.Insert(rText, nPos);
+ m_aBufferString.Insert(rText, nPos);
xub_StrLen nLen = rText.Len();
- BufferIndex = BufferIndex + nLen;
- nTokenIndex = nTokenIndex + nLen;
+ m_nBufferIndex = m_nBufferIndex + nLen;
+ m_nTokenIndex = m_nTokenIndex + nLen;
}
-void SmParser::Replace( USHORT nPos, USHORT nLen, const String &rText )
+void SmParser::Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText )
{
- OSL_ENSURE( nPos + nLen <= BufferString.Len(), "argument mismatch" );
+ OSL_ENSURE( nPos + nLen <= m_aBufferString.Len(), "argument mismatch" );
- BufferString.Replace( nPos, nLen, rText );
- INT16 nChg = rText.Len() - nLen;
- BufferIndex = BufferIndex + nChg;
- nTokenIndex = nTokenIndex + nChg;
+ m_aBufferString.Replace( nPos, nLen, rText );
+ sal_Int16 nChg = rText.Len() - nLen;
+ m_nBufferIndex = m_nBufferIndex + nChg;
+ m_nTokenIndex = m_nTokenIndex + nChg;
}
@@ -405,7 +405,7 @@ void SmParser::NextToken()
{
static const String aEmptyStr;
- xub_StrLen nBufLen = BufferString.Len();
+ xub_StrLen nBufLen = m_aBufferString.Len();
ParseResult aRes;
xub_StrLen nRealStart;
bool bCont;
@@ -415,13 +415,13 @@ void SmParser::NextToken()
{
// skip white spaces
while (UnicodeType::SPACE_SEPARATOR ==
- aCC.getType( BufferString, BufferIndex ))
- ++BufferIndex;
+ aCC.getType( m_aBufferString, m_nBufferIndex ))
+ ++m_nBufferIndex;
sal_Int32 nStartFlags = coStartFlags;
sal_Int32 nContFlags = coContFlags;
- sal_Unicode cFirstChar = BufferString.GetChar( BufferIndex );
- aRes = aCC.parseAnyToken( BufferString, BufferIndex,
+ sal_Unicode cFirstChar = m_aBufferString.GetChar( m_nBufferIndex );
+ aRes = aCC.parseAnyToken( m_aBufferString, m_nBufferIndex,
nStartFlags, aEmptyStr,
nContFlags, aEmptyStr );
@@ -438,7 +438,7 @@ void SmParser::NextToken()
aCC.setLocale( aDotLoc );
aTmpRes = aCC.parsePredefinedToken(
KParseType::ASC_NUMBER,
- BufferString, BufferIndex,
+ m_aBufferString, m_nBufferIndex,
KParseTokens::ASC_DIGIT, aEmptyStr,
KParseTokens::ASC_DIGIT | KParseTokens::ASC_DOT, aEmptyStr );
aCC.setLocale( aOldLoc );
@@ -446,29 +446,29 @@ void SmParser::NextToken()
aRes.TokenType = aTmpRes.TokenType;
}
- nRealStart = BufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
- BufferIndex = nRealStart;
+ nRealStart = m_nBufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
+ m_nBufferIndex = nRealStart;
bCont = false;
if ( aRes.TokenType == 0 &&
nRealStart < nBufLen &&
- '\n' == BufferString.GetChar( nRealStart ) )
+ '\n' == m_aBufferString.GetChar( nRealStart ) )
{
// keep data needed for tokens row and col entry up to date
- ++Row;
- BufferIndex = ColOff = nRealStart + 1;
+ ++m_Row;
+ m_nBufferIndex = m_nColOff = nRealStart + 1;
bCont = true;
}
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
- String aName( BufferString.Copy( nRealStart, 2 ));
+ String aName( m_aBufferString.Copy( nRealStart, 2 ));
if ( aName.EqualsAscii( "%%" ))
{
//SkipComment
- BufferIndex = nRealStart + 2;
- while (BufferIndex < nBufLen &&
- '\n' != BufferString.GetChar( BufferIndex ))
- ++BufferIndex;
+ m_nBufferIndex = nRealStart + 2;
+ while (m_nBufferIndex < nBufLen &&
+ '\n' != m_aBufferString.GetChar( m_nBufferIndex ))
+ ++m_nBufferIndex;
bCont = true;
}
}
@@ -476,33 +476,33 @@ void SmParser::NextToken()
} while (bCont);
// set index of current token
- nTokenIndex = BufferIndex;
+ m_nTokenIndex = m_nBufferIndex;
- CurToken.nRow = Row;
- CurToken.nCol = nRealStart - ColOff + 1;
+ m_aCurToken.nRow = m_Row;
+ m_aCurToken.nCol = nRealStart - m_nColOff + 1;
bool bHandled = true;
if (nRealStart >= nBufLen)
{
- CurToken.eType = TEND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.Erase();
+ m_aCurToken.eType = TEND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.Erase();
}
else if ((aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER))
|| (bNumStart && (aRes.TokenType & KParseType::IDENTNAME)))
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
- CurToken.eType = TNUMBER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = BufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) );
+ m_aCurToken.eType = TNUMBER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = m_aBufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) );
#if OSL_DEBUG_LEVEL > 1
- if (!IsDelimiter( BufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
+ if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
{
DBG_WARNING( "identifier really finished? (compatibility!)" );
}
@@ -510,59 +510,59 @@ void SmParser::NextToken()
}
else if (aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING)
{
- CurToken.eType = TTEXT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = aRes.DequotedNameOrString;
- CurToken.nRow = Row;
- CurToken.nCol = nRealStart - ColOff + 2;
+ m_aCurToken.eType = TTEXT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = aRes.DequotedNameOrString;
+ m_aCurToken.nRow = m_Row;
+ m_aCurToken.nCol = nRealStart - m_nColOff + 2;
}
else if (aRes.TokenType & KParseType::IDENTNAME)
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
- String aName( BufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
+ String aName( m_aBufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
const SmTokenTableEntry *pEntry = GetTokenTableEntry( aName );
if (pEntry)
{
- CurToken.eType = pEntry->eType;
- CurToken.cMathChar = pEntry->cMathChar;
- CurToken.nGroup = pEntry->nGroup;
- CurToken.nLevel = pEntry->nLevel;
- CurToken.aText.AssignAscii( pEntry->pIdent );
+ m_aCurToken.eType = pEntry->eType;
+ m_aCurToken.cMathChar = pEntry->cMathChar;
+ m_aCurToken.nGroup = pEntry->nGroup;
+ m_aCurToken.nLevel = pEntry->nLevel;
+ m_aCurToken.aText.AssignAscii( pEntry->pIdent );
}
else
{
- CurToken.eType = TIDENT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = aName;
+ m_aCurToken.eType = TIDENT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = aName;
#if OSL_DEBUG_LEVEL > 1
- if (!IsDelimiter( BufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
+ if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
{
DBG_WARNING( "identifier really finished? (compatibility!)" );
}
#endif
}
}
- else if (aRes.TokenType == 0 && '_' == BufferString.GetChar( nRealStart ))
+ else if (aRes.TokenType == 0 && '_' == m_aBufferString.GetChar( nRealStart ))
{
- CurToken.eType = TRSUB;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGPOWER;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "_" );
+ m_aCurToken.eType = TRSUB;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGPOWER;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "_" );
aRes.EndPos = nRealStart + 1;
}
else if (aRes.TokenType & KParseType::BOOLEAN)
{
sal_Int32 &rnEndPos = aRes.EndPos;
- String aName( BufferString.Copy( nRealStart,
+ String aName( m_aBufferString.Copy( nRealStart,
sal::static_int_cast< xub_StrLen >(rnEndPos - nRealStart) ));
if (2 >= aName.Len())
{
@@ -571,91 +571,91 @@ void SmParser::NextToken()
{
case '<':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<<" ))
{
- CurToken.eType = TLL;
- CurToken.cMathChar = MS_LL;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<<" );
+ m_aCurToken.eType = TLL;
+ m_aCurToken.cMathChar = MS_LL;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<<" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<=" ))
{
- CurToken.eType = TLE;
- CurToken.cMathChar = MS_LE;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<=" );
+ m_aCurToken.eType = TLE;
+ m_aCurToken.cMathChar = MS_LE;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<=" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<>" ))
{
- CurToken.eType = TNEQ;
- CurToken.cMathChar = MS_NEQ;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<>" );
+ m_aCurToken.eType = TNEQ;
+ m_aCurToken.cMathChar = MS_NEQ;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<>" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 3 ).
+ else if (m_aBufferString.Copy( nRealStart, 3 ).
EqualsAscii( "<?>" ))
{
- CurToken.eType = TPLACE;
- CurToken.cMathChar = MS_PLACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "<?>" );
+ m_aCurToken.eType = TPLACE;
+ m_aCurToken.cMathChar = MS_PLACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "<?>" );
rnEndPos = nRealStart + 3;
}
else
{
- CurToken.eType = TLT;
- CurToken.cMathChar = MS_LT;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<" );
+ m_aCurToken.eType = TLT;
+ m_aCurToken.cMathChar = MS_LT;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<" );
}
}
break;
case '>':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( ">=" ))
{
- CurToken.eType = TGE;
- CurToken.cMathChar = MS_GE;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">=" );
+ m_aCurToken.eType = TGE;
+ m_aCurToken.cMathChar = MS_GE;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">=" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( ">>" ))
{
- CurToken.eType = TGG;
- CurToken.cMathChar = MS_GG;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">>" );
+ m_aCurToken.eType = TGG;
+ m_aCurToken.cMathChar = MS_GG;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">>" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TGT;
- CurToken.cMathChar = MS_GT;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">" );
+ m_aCurToken.eType = TGT;
+ m_aCurToken.cMathChar = MS_GT;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">" );
}
}
break;
@@ -667,7 +667,7 @@ void SmParser::NextToken()
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
sal_Int32 &rnEndPos = aRes.EndPos;
- String aName( BufferString.Copy( nRealStart,
+ String aName( m_aBufferString.Copy( nRealStart,
sal::static_int_cast< xub_StrLen >(rnEndPos - nRealStart) ) );
if (1 == aName.Len())
@@ -680,12 +680,12 @@ void SmParser::NextToken()
//! modifies aRes.EndPos
OSL_ENSURE( rnEndPos >= nBufLen ||
- '%' != BufferString.GetChar( sal::static_int_cast< xub_StrLen >(rnEndPos) ),
+ '%' != m_aBufferString.GetChar( sal::static_int_cast< xub_StrLen >(rnEndPos) ),
"unexpected comment start" );
// get identifier of user-defined character
ParseResult aTmpRes = aCC.parseAnyToken(
- BufferString, rnEndPos,
+ m_aBufferString, rnEndPos,
KParseTokens::ANY_LETTER,
aEmptyStr,
coContFlags,
@@ -697,20 +697,20 @@ void SmParser::NextToken()
// default setting for the case that no identifier
// i.e. a valid symbol-name is following the '%'
// character
- CurToken.eType = TTEXT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = String();
- CurToken.nRow = sal::static_int_cast< xub_StrLen >(Row);
- CurToken.nCol = nTmpStart - ColOff;
+ m_aCurToken.eType = TTEXT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = String();
+ m_aCurToken.nRow = sal::static_int_cast< xub_StrLen >(m_Row);
+ m_aCurToken.nCol = nTmpStart - m_nColOff;
if (aTmpRes.TokenType & KParseType::IDENTNAME)
{
xub_StrLen n = sal::static_int_cast< xub_StrLen >(aTmpRes.EndPos - nTmpStart);
- CurToken.eType = TSPECIAL;
- CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
+ m_aCurToken.eType = TSPECIAL;
+ m_aCurToken.aText = m_aBufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
OSL_ENSURE( aTmpRes.EndPos > rnEndPos,
"empty identifier" );
@@ -727,187 +727,187 @@ void SmParser::NextToken()
break;
case '[':
{
- CurToken.eType = TLBRACKET;
- CurToken.cMathChar = MS_LBRACKET;
- CurToken.nGroup = TGLBRACES;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "[" );
+ m_aCurToken.eType = TLBRACKET;
+ m_aCurToken.cMathChar = MS_LBRACKET;
+ m_aCurToken.nGroup = TGLBRACES;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "[" );
}
break;
case '\\':
{
- CurToken.eType = TESCAPE;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "\\" );
+ m_aCurToken.eType = TESCAPE;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "\\" );
}
break;
case ']':
{
- CurToken.eType = TRBRACKET;
- CurToken.cMathChar = MS_RBRACKET;
- CurToken.nGroup = TGRBRACES;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "]" );
+ m_aCurToken.eType = TRBRACKET;
+ m_aCurToken.cMathChar = MS_RBRACKET;
+ m_aCurToken.nGroup = TGRBRACES;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "]" );
}
break;
case '^':
{
- CurToken.eType = TRSUP;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGPOWER;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "^" );
+ m_aCurToken.eType = TRSUP;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGPOWER;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "^" );
}
break;
case '`':
{
- CurToken.eType = TSBLANK;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGBLANK;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "`" );
+ m_aCurToken.eType = TSBLANK;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGBLANK;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "`" );
}
break;
case '{':
{
- CurToken.eType = TLGROUP;
- CurToken.cMathChar = MS_LBRACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "{" );
+ m_aCurToken.eType = TLGROUP;
+ m_aCurToken.cMathChar = MS_LBRACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "{" );
}
break;
case '|':
{
- CurToken.eType = TOR;
- CurToken.cMathChar = MS_OR;
- CurToken.nGroup = TGSUM;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "|" );
+ m_aCurToken.eType = TOR;
+ m_aCurToken.cMathChar = MS_OR;
+ m_aCurToken.nGroup = TGSUM;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "|" );
}
break;
case '}':
{
- CurToken.eType = TRGROUP;
- CurToken.cMathChar = MS_RBRACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "}" );
+ m_aCurToken.eType = TRGROUP;
+ m_aCurToken.cMathChar = MS_RBRACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "}" );
}
break;
case '~':
{
- CurToken.eType = TBLANK;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGBLANK;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "~" );
+ m_aCurToken.eType = TBLANK;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGBLANK;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "~" );
}
break;
case '#':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "##" ))
{
- CurToken.eType = TDPOUND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "##" );
+ m_aCurToken.eType = TDPOUND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "##" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TPOUND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "#" );
+ m_aCurToken.eType = TPOUND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "#" );
}
}
break;
case '&':
{
- CurToken.eType = TAND;
- CurToken.cMathChar = MS_AND;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "&" );
+ m_aCurToken.eType = TAND;
+ m_aCurToken.cMathChar = MS_AND;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "&" );
}
break;
case '(':
{
- CurToken.eType = TLPARENT;
- CurToken.cMathChar = MS_LPARENT;
- CurToken.nGroup = TGLBRACES;
- CurToken.nLevel = 5; //! 0 to continue expression
- CurToken.aText.AssignAscii( "(" );
+ m_aCurToken.eType = TLPARENT;
+ m_aCurToken.cMathChar = MS_LPARENT;
+ m_aCurToken.nGroup = TGLBRACES;
+ m_aCurToken.nLevel = 5; //! 0 to continue expression
+ m_aCurToken.aText.AssignAscii( "(" );
}
break;
case ')':
{
- CurToken.eType = TRPARENT;
- CurToken.cMathChar = MS_RPARENT;
- CurToken.nGroup = TGRBRACES;
- CurToken.nLevel = 0; //! 0 to terminate expression
- CurToken.aText.AssignAscii( ")" );
+ m_aCurToken.eType = TRPARENT;
+ m_aCurToken.cMathChar = MS_RPARENT;
+ m_aCurToken.nGroup = TGRBRACES;
+ m_aCurToken.nLevel = 0; //! 0 to terminate expression
+ m_aCurToken.aText.AssignAscii( ")" );
}
break;
case '*':
{
- CurToken.eType = TMULTIPLY;
- CurToken.cMathChar = MS_MULTIPLY;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "*" );
+ m_aCurToken.eType = TMULTIPLY;
+ m_aCurToken.cMathChar = MS_MULTIPLY;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "*" );
}
break;
case '+':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "+-" ))
{
- CurToken.eType = TPLUSMINUS;
- CurToken.cMathChar = MS_PLUSMINUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "+-" );
+ m_aCurToken.eType = TPLUSMINUS;
+ m_aCurToken.cMathChar = MS_PLUSMINUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "+-" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TPLUS;
- CurToken.cMathChar = MS_PLUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "+" );
+ m_aCurToken.eType = TPLUS;
+ m_aCurToken.cMathChar = MS_PLUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "+" );
}
}
break;
case '-':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "-+" ))
{
- CurToken.eType = TMINUSPLUS;
- CurToken.cMathChar = MS_MINUSPLUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "-+" );
+ m_aCurToken.eType = TMINUSPLUS;
+ m_aCurToken.cMathChar = MS_MINUSPLUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "-+" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TMINUS;
- CurToken.cMathChar = MS_MINUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "-" );
+ m_aCurToken.eType = TMINUS;
+ m_aCurToken.cMathChar = MS_MINUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "-" );
}
}
break;
@@ -916,40 +916,40 @@ void SmParser::NextToken()
// for compatibility with SO5.2
// texts like .34 ...56 ... h ...78..90
// will be treated as numbers
- CurToken.eType = TNUMBER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
+ m_aCurToken.eType = TNUMBER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
- xub_StrLen nTxtStart = BufferIndex;
+ xub_StrLen nTxtStart = m_nBufferIndex;
sal_Unicode cChar;
do
{
- cChar = BufferString.GetChar( ++BufferIndex );
+ cChar = m_aBufferString.GetChar( ++m_nBufferIndex );
}
while ( cChar == '.' || IsDigit( cChar ) );
- CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTxtStart),
- sal::static_int_cast< xub_StrLen >(BufferIndex - nTxtStart) );
- aRes.EndPos = BufferIndex;
+ m_aCurToken.aText = m_aBufferString.Copy( sal::static_int_cast< xub_StrLen >(nTxtStart),
+ sal::static_int_cast< xub_StrLen >(m_nBufferIndex - nTxtStart) );
+ aRes.EndPos = m_nBufferIndex;
}
break;
case '/':
{
- CurToken.eType = TDIVIDEBY;
- CurToken.cMathChar = MS_SLASH;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "/" );
+ m_aCurToken.eType = TDIVIDEBY;
+ m_aCurToken.cMathChar = MS_SLASH;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "/" );
}
break;
case '=':
{
- CurToken.eType = TASSIGN;
- CurToken.cMathChar = MS_ASSIGN;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "=" );
+ m_aCurToken.eType = TASSIGN;
+ m_aCurToken.cMathChar = MS_ASSIGN;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "=" );
}
break;
default:
@@ -962,17 +962,17 @@ void SmParser::NextToken()
if (!bHandled)
{
- CurToken.eType = TCHARACTER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = BufferString.Copy( nRealStart, 1 );
+ m_aCurToken.eType = TCHARACTER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = m_aBufferString.Copy( nRealStart, 1 );
aRes.EndPos = nRealStart + 1;
}
- if (TEND != CurToken.eType)
- BufferIndex = sal::static_int_cast< xub_StrLen >(aRes.EndPos);
+ if (TEND != m_aCurToken.eType)
+ m_nBufferIndex = sal::static_int_cast< xub_StrLen >(aRes.EndPos);
}
@@ -986,25 +986,25 @@ void SmParser::Table()
SmNodeArray LineArray;
Line();
- while (CurToken.eType == TNEWLINE)
+ while (m_aCurToken.eType == TNEWLINE)
{
NextToken();
Line();
}
- if (CurToken.eType != TEND)
+ if (m_aCurToken.eType != TEND)
Error(PE_UNEXPECTED_CHAR);
- ULONG n = NodeStack.Count();
+ sal_uLong n = m_aNodeStack.Count();
LineArray.resize(n);
- for (ULONG i = 0; i < n; i++)
- LineArray[n - (i + 1)] = NodeStack.Pop();
+ for (sal_uLong i = 0; i < n; i++)
+ LineArray[n - (i + 1)] = m_aNodeStack.Pop();
- SmStructureNode *pSNode = new SmTableNode(CurToken);
+ SmStructureNode *pSNode = new SmTableNode(m_aCurToken);
pSNode->SetSubNodes(LineArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1026,19 +1026,21 @@ void SmParser::Align()
// (the dominant one in 4.0) and erase all others (especially old
// discarded tokens) from command string.
while (TokenInGroup(TGALIGN))
- { if (TokenInGroup(TGDISCARDED) || pSNode)
- { BufferIndex = GetTokenIndex();
- BufferString.Erase(BufferIndex, CurToken.aText.Len());
+ {
+ if (TokenInGroup(TGDISCARDED) || pSNode)
+ {
+ m_nBufferIndex = GetTokenIndex();
+ m_aBufferString.Erase(m_nBufferIndex, m_aCurToken.aText.Len());
}
else
- pSNode = new SmAlignNode(CurToken);
+ pSNode = new SmAlignNode(m_aCurToken);
NextToken();
}
}
else
{
- pSNode = new SmAlignNode(CurToken);
+ pSNode = new SmAlignNode(m_aCurToken);
NextToken();
@@ -1056,15 +1058,15 @@ void SmParser::Align()
Insert('}', GetTokenIndex());
if (pSNode)
- { pSNode->SetSubNodes(NodeStack.Pop(), 0);
- NodeStack.Push(pSNode);
+ { pSNode->SetSubNodes(m_aNodeStack.Pop(), 0);
+ m_aNodeStack.Push(pSNode);
}
}
void SmParser::Line()
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray ExpressionArray;
ExpressionArray.resize(n);
@@ -1072,19 +1074,19 @@ void SmParser::Line()
// start with single expression that may have an alignment statement
// (and go on with expressions that must not have alignment
// statements in 'while' loop below. See also 'Expression()'.)
- if (CurToken.eType != TEND && CurToken.eType != TNEWLINE)
+ if (m_aCurToken.eType != TEND && m_aCurToken.eType != TNEWLINE)
{ Align();
ExpressionArray.resize(++n);
- ExpressionArray[n - 1] = NodeStack.Pop();
+ ExpressionArray[n - 1] = m_aNodeStack.Pop();
}
- while (CurToken.eType != TEND && CurToken.eType != TNEWLINE)
+ while (m_aCurToken.eType != TEND && m_aCurToken.eType != TNEWLINE)
{ if (CONVERT_40_TO_50 != GetConversion())
Expression();
else
Align();
ExpressionArray.resize(++n);
- ExpressionArray[n - 1] = NodeStack.Pop();
+ ExpressionArray[n - 1] = m_aNodeStack.Pop();
}
//If there's no expression, add an empty one.
@@ -1093,44 +1095,43 @@ void SmParser::Line()
if(ExpressionArray.size() == 0)
ExpressionArray.push_back(new SmExpressionNode(SmToken()));
-
- SmStructureNode *pSNode = new SmLineNode(CurToken);
+ SmStructureNode *pSNode = new SmLineNode(m_aCurToken);
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
void SmParser::Expression()
{
bool bUseExtraSpaces = true;
- SmNode *pNode = NodeStack.Pop();
+ SmNode *pNode = m_aNodeStack.Pop();
if (pNode)
{
if (pNode->GetToken().eType == TNOSPACE)
bUseExtraSpaces = false;
else
- NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
+ m_aNodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray RelationArray;
RelationArray.resize(n);
Relation();
RelationArray.resize(++n);
- RelationArray[n - 1] = NodeStack.Pop();
+ RelationArray[n - 1] = m_aNodeStack.Pop();
- while (CurToken.nLevel >= 4)
+ while (m_aCurToken.nLevel >= 4)
{ Relation();
RelationArray.resize(++n);
- RelationArray[n - 1] = NodeStack.Pop();
+ RelationArray[n - 1] = m_aNodeStack.Pop();
}
- SmExpressionNode *pSNode = new SmExpressionNode(CurToken);
+ SmExpressionNode *pSNode = new SmExpressionNode(m_aCurToken);
pSNode->SetSubNodes(RelationArray);
pSNode->SetUseExtraSpaces(bUseExtraSpaces);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1139,16 +1140,16 @@ void SmParser::Relation()
Sum();
while (TokenInGroup(TGRELATION))
{
- SmStructureNode *pSNode = new SmBinHorNode(CurToken);
- SmNode *pFirst = NodeStack.Pop();
+ SmStructureNode *pSNode = new SmBinHorNode(m_aCurToken);
+ SmNode *pFirst = m_aNodeStack.Pop();
OpSubSup();
- SmNode *pSecond = NodeStack.Pop();
+ SmNode *pSecond = m_aNodeStack.Pop();
Sum();
- pSNode->SetSubNodes(pFirst, pSecond, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pSecond, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
@@ -1158,16 +1159,16 @@ void SmParser::Sum()
Product();
while (TokenInGroup(TGSUM))
{
- SmStructureNode *pSNode = new SmBinHorNode(CurToken);
- SmNode *pFirst = NodeStack.Pop();
+ SmStructureNode *pSNode = new SmBinHorNode(m_aCurToken);
+ SmNode *pFirst = m_aNodeStack.Pop();
OpSubSup();
- SmNode *pSecond = NodeStack.Pop();
+ SmNode *pSecond = m_aNodeStack.Pop();
Product();
- pSNode->SetSubNodes(pFirst, pSecond, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pSecond, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
@@ -1178,36 +1179,36 @@ void SmParser::Product()
while (TokenInGroup(TGPRODUCT))
{ SmStructureNode *pSNode;
- SmNode *pFirst = NodeStack.Pop(),
+ SmNode *pFirst = m_aNodeStack.Pop(),
*pOper;
bool bSwitchArgs = false;
- SmTokenType eType = CurToken.eType;
+ SmTokenType eType = m_aCurToken.eType;
switch (eType)
{
case TOVER:
- pSNode = new SmBinVerNode(CurToken);
- pOper = new SmRectangleNode(CurToken);
+ pSNode = new SmBinVerNode(m_aCurToken);
+ pOper = new SmRectangleNode(m_aCurToken);
NextToken();
break;
case TBOPER:
- pSNode = new SmBinHorNode(CurToken);
+ pSNode = new SmBinHorNode(m_aCurToken);
NextToken();
//Let the glyph node know it's a binary operation
- CurToken.eType = TBOPER;
- CurToken.nGroup = TGPRODUCT;
+ m_aCurToken.eType = TBOPER;
+ m_aCurToken.nGroup = TGPRODUCT;
GlyphSpecial();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
case TOVERBRACE :
case TUNDERBRACE :
- pSNode = new SmVerticalBraceNode(CurToken);
- pOper = new SmMathSymbolNode(CurToken);
+ pSNode = new SmVerticalBraceNode(m_aCurToken);
+ pOper = new SmMathSymbolNode(m_aCurToken);
NextToken();
break;
@@ -1215,11 +1216,11 @@ void SmParser::Product()
case TWIDEBACKSLASH:
case TWIDESLASH:
{
- SmBinDiagonalNode *pSTmp = new SmBinDiagonalNode(CurToken);
+ SmBinDiagonalNode *pSTmp = new SmBinDiagonalNode(m_aCurToken);
pSTmp->SetAscending(eType == TWIDESLASH);
pSNode = pSTmp;
- pOper = new SmPolyLineNode(CurToken);
+ pOper = new SmPolyLineNode(m_aCurToken);
NextToken();
bSwitchArgs = true;
@@ -1227,25 +1228,25 @@ void SmParser::Product()
}
default:
- pSNode = new SmBinHorNode(CurToken);
+ pSNode = new SmBinHorNode(m_aCurToken);
OpSubSup();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
}
Power();
if (bSwitchArgs)
//! vgl siehe SmBinDiagonalNode::Arrange
- pSNode->SetSubNodes(pFirst, NodeStack.Pop(), pOper);
+ pSNode->SetSubNodes(pFirst, m_aNodeStack.Pop(), pOper);
else
- pSNode->SetSubNodes(pFirst, pOper, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pOper, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
-void SmParser::SubSup(ULONG nActiveGroup)
+void SmParser::SubSup(sal_uLong nActiveGroup)
{
OSL_ENSURE(nActiveGroup == TGPOWER || nActiveGroup == TGLIMIT,
"Sm: wrong token group");
@@ -1254,8 +1255,8 @@ void SmParser::SubSup(ULONG nActiveGroup)
// already finish
return;
- SmSubSupNode *pNode = new SmSubSupNode(CurToken);
- //! Of course 'CurToken' is just the first sub-/supscript token.
+ SmSubSupNode *pNode = new SmSubSupNode(m_aCurToken);
+ //! Of course 'm_aCurToken' is just the first sub-/supscript token.
//! It should be of no further interest. The positions of the
//! sub-/supscripts will be identified by the corresponding subnodes
//! index in the 'aSubNodes' array (enum value from 'SmSubSup').
@@ -1265,14 +1266,14 @@ void SmParser::SubSup(ULONG nActiveGroup)
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- aSubNodes[0] = NodeStack.Pop();
- for (USHORT i = 1; i < aSubNodes.size(); i++)
+ aSubNodes[0] = m_aNodeStack.Pop();
+ for (sal_uInt16 i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
// process all sub-/supscripts
int nIndex = 0;
while (TokenInGroup(nActiveGroup))
- { SmTokenType eType (CurToken.eType);
+ { SmTokenType eType (m_aCurToken.eType);
// skip sub-/supscript token
NextToken();
@@ -1305,18 +1306,18 @@ void SmParser::SubSup(ULONG nActiveGroup)
// set sub-/supscript if not already done
if (aSubNodes[nIndex] != NULL)
Error(PE_DOUBLE_SUBSUPSCRIPT);
- aSubNodes[nIndex] = NodeStack.Pop();
+ aSubNodes[nIndex] = m_aNodeStack.Pop();
}
pNode->SetSubNodes(aSubNodes);
- NodeStack.Push(pNode);
+ m_aNodeStack.Push(pNode);
}
void SmParser::OpSubSup()
{
// push operator symbol
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
// skip operator token
NextToken();
// get sub- supscripts if any
@@ -1337,28 +1338,28 @@ void SmParser::Power()
void SmParser::Blank()
{
OSL_ENSURE(TokenInGroup(TGBLANK), "Sm : wrong token");
- SmBlankNode *pBlankNode = new SmBlankNode(CurToken);
+ SmBlankNode *pBlankNode = new SmBlankNode(m_aCurToken);
while (TokenInGroup(TGBLANK))
{
- pBlankNode->IncreaseBy(CurToken);
+ pBlankNode->IncreaseBy(m_aCurToken);
NextToken();
}
// Blanks am Zeilenende ignorieren wenn die entsprechende Option gesetzt ist
- if ( CurToken.eType == TNEWLINE ||
- (CurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) )
+ if ( m_aCurToken.eType == TNEWLINE ||
+ (m_aCurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) )
{
pBlankNode->Clear();
}
- NodeStack.Push(pBlankNode);
+ m_aNodeStack.Push(pBlankNode);
}
void SmParser::Term()
{
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TESCAPE :
Escape();
@@ -1367,15 +1368,15 @@ void SmParser::Term()
case TNOSPACE :
case TLGROUP :
{
- bool bNoSpace = CurToken.eType == TNOSPACE;
+ bool bNoSpace = m_aCurToken.eType == TNOSPACE;
if (bNoSpace) // push 'no space' node and continue to parse expression
{
- NodeStack.Push(new SmExpressionNode(CurToken));
+ m_aNodeStack.Push(new SmExpressionNode(m_aCurToken));
NextToken();
}
- if (CurToken.eType != TLGROUP)
+ if (m_aCurToken.eType != TLGROUP)
{
- NodeStack.Pop(); // get rid of the 'no space' node pushed above
+ m_aNodeStack.Pop(); // get rid of the 'no space' node pushed above
Term();
}
else
@@ -1383,20 +1384,20 @@ void SmParser::Term()
NextToken();
// allow for empty group
- if (CurToken.eType == TRGROUP)
+ if (m_aCurToken.eType == TRGROUP)
{
if (bNoSpace) // get rid of the 'no space' node pushed above
- NodeStack.Pop();
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
+ m_aNodeStack.Pop();
+ SmStructureNode *pSNode = new SmExpressionNode(m_aCurToken);
pSNode->SetSubNodes(NULL, NULL);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
NextToken();
}
else // go as usual
{
Align();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
else
NextToken();
@@ -1415,16 +1416,16 @@ void SmParser::Term()
break;
case TTEXT :
- NodeStack.Push(new SmTextNode(CurToken, FNT_TEXT));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_TEXT));
NextToken();
break;
case TIDENT :
case TCHARACTER :
- NodeStack.Push(new SmTextNode(CurToken, FNT_VARIABLE));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_VARIABLE));
NextToken();
break;
case TNUMBER :
- NodeStack.Push(new SmTextNode(CurToken, FNT_NUMBER));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_NUMBER));
NextToken();
break;
@@ -1461,12 +1462,12 @@ void SmParser::Term()
case TDOTSLOW :
case TDOTSUP :
case TDOTSVERT :
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
break;
case TPLACE:
- NodeStack.Push(new SmPlaceNode(CurToken));
+ m_aNodeStack.Push(new SmPlaceNode(m_aCurToken));
NextToken();
break;
@@ -1501,7 +1502,7 @@ void SmParser::Term()
{ SmStructureNodeArray aArray;
bool bIsAttr;
- USHORT n = 0;
+ sal_uInt16 n = 0;
while (true == (bIsAttr = TokenInGroup(TGATTRIBUT))
|| TokenInGroup(TGFONTATTR))
{ aArray.resize(n + 1);
@@ -1514,19 +1515,19 @@ void SmParser::Term()
// check if casting in following line is ok
OSL_ENSURE(!NodeStack.Top()->IsVisible(), "Sm : Ooops...");
- aArray[n] = (SmStructureNode *) NodeStack.Pop();
+ aArray[n] = (SmStructureNode *) m_aNodeStack.Pop();
n++;
}
Power();
- SmNode *pFirstNode = NodeStack.Pop();
+ SmNode *pFirstNode = m_aNodeStack.Pop();
while (n > 0)
{ aArray[n - 1]->SetSubNodes(0, pFirstNode);
pFirstNode = aArray[n - 1];
n--;
}
- NodeStack.Push(pFirstNode);
+ m_aNodeStack.Push(pFirstNode);
}
else if (TokenInGroup(TGFUNCTION))
{ if (CONVERT_40_TO_50 != GetConversion())
@@ -1542,9 +1543,9 @@ void SmParser::Term()
//
Function();
- SmNode *pFunc = NodeStack.Pop();
+ SmNode *pFunc = m_aNodeStack.Pop();
- if (CurToken.eType == TLPARENT)
+ if (m_aCurToken.eType == TLPARENT)
{ Term();
}
else
@@ -1555,8 +1556,8 @@ void SmParser::Term()
Insert('}', GetTokenIndex());
SmStructureNode *pSNode = new SmExpressionNode(pFunc->GetToken());
- pSNode->SetSubNodes(pFunc, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFunc, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
else
@@ -1569,7 +1570,7 @@ void SmParser::Escape()
{
NextToken();
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TLPARENT :
case TRPARENT :
@@ -1596,8 +1597,8 @@ void SmParser::Escape()
Error(PE_UNEXPECTED_TOKEN);
}
- SmNode *pNode = new SmMathSymbolNode(CurToken);
- NodeStack.Push(pNode);
+ SmNode *pNode = new SmMathSymbolNode(m_aCurToken);
+ m_aNodeStack.Push(pNode);
NextToken();
}
@@ -1606,27 +1607,27 @@ void SmParser::Escape()
void SmParser::Operator()
{
if (TokenInGroup(TGOPER))
- { SmStructureNode *pSNode = new SmOperNode(CurToken);
+ { SmStructureNode *pSNode = new SmOperNode(m_aCurToken);
// put operator on top of stack
Oper();
if (TokenInGroup(TGLIMIT) || TokenInGroup(TGPOWER))
- SubSup(CurToken.nGroup);
- SmNode *pOperator = NodeStack.Pop();
+ SubSup(m_aCurToken.nGroup);
+ SmNode *pOperator = m_aNodeStack.Pop();
// get argument
Power();
- pSNode->SetSubNodes(pOperator, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pOperator, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
void SmParser::Oper()
{
- SmTokenType eType (CurToken.eType);
+ SmTokenType eType (m_aCurToken.eType);
SmNode *pNode = NULL;
switch (eType)
@@ -1640,7 +1641,7 @@ void SmParser::Oper()
case TLINT :
case TLLINT :
case TLLLINT :
- pNode = new SmMathSymbolNode(CurToken);
+ pNode = new SmMathSymbolNode(m_aCurToken);
break;
case TLIM :
@@ -1657,27 +1658,27 @@ void SmParser::Oper()
break;
}
if( pLim )
- CurToken.aText.AssignAscii( pLim );
- pNode = new SmTextNode(CurToken, FNT_TEXT);
+ m_aCurToken.aText.AssignAscii( pLim );
+ pNode = new SmTextNode(m_aCurToken, FNT_TEXT);
}
break;
case TOVERBRACE :
case TUNDERBRACE :
- pNode = new SmMathSymbolNode(CurToken);
+ pNode = new SmMathSymbolNode(m_aCurToken);
break;
case TOPER :
NextToken();
OSL_ENSURE(CurToken.eType == TSPECIAL, "Sm: wrong token");
- pNode = new SmGlyphSpecialNode(CurToken);
+ pNode = new SmGlyphSpecialNode(m_aCurToken);
break;
default :
OSL_ENSURE(0, "Sm: unknown case");
}
- NodeStack.Push(pNode);
+ m_aNodeStack.Push(pNode);
NextToken();
}
@@ -1687,8 +1688,8 @@ void SmParser::UnOper()
{
OSL_ENSURE(TokenInGroup(TGUNOPER), "Sm: wrong token");
- SmToken aNodeToken = CurToken;
- SmTokenType eType = CurToken.eType;
+ SmToken aNodeToken = m_aCurToken;
+ SmTokenType eType = m_aCurToken.eType;
bool bIsPostfix = eType == TFACT;
SmStructureNode *pSNode;
@@ -1706,16 +1707,16 @@ void SmParser::UnOper()
case TNROOT :
NextToken();
Power();
- pExtra = NodeStack.Pop();
+ pExtra = m_aNodeStack.Pop();
break;
case TUOPER :
NextToken();
//Let the glyph know what it is...
- CurToken.eType = TUOPER;
- CurToken.nGroup = TGUNOPER;
+ m_aCurToken.eType = TUOPER;
+ m_aCurToken.nGroup = TGUNOPER;
GlyphSpecial();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
case TPLUS :
@@ -1725,7 +1726,7 @@ void SmParser::UnOper()
case TNEG :
case TFACT :
OpSubSup();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
default :
@@ -1734,7 +1735,7 @@ void SmParser::UnOper()
// get argument
Power();
- pArg = NodeStack.Pop();
+ pArg = m_aNodeStack.Pop();
if (eType == TABS)
{ pSNode = new SmBraceNode(aNodeToken);
@@ -1768,7 +1769,7 @@ void SmParser::UnOper()
pSNode->SetSubNodes(pOper, pArg);
}
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1776,35 +1777,35 @@ void SmParser::Attribut()
{
OSL_ENSURE(TokenInGroup(TGATTRIBUT), "Sm: wrong token group");
- SmStructureNode *pSNode = new SmAttributNode(CurToken);
+ SmStructureNode *pSNode = new SmAttributNode(m_aCurToken);
SmNode *pAttr;
SmScaleMode eScaleMode = SCALE_NONE;
// get appropriate node for the attribut itself
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{ case TUNDERLINE :
case TOVERLINE :
case TOVERSTRIKE :
- pAttr = new SmRectangleNode(CurToken);
+ pAttr = new SmRectangleNode(m_aCurToken);
eScaleMode = SCALE_WIDTH;
break;
case TWIDEVEC :
case TWIDEHAT :
case TWIDETILDE :
- pAttr = new SmMathSymbolNode(CurToken);
+ pAttr = new SmMathSymbolNode(m_aCurToken);
eScaleMode = SCALE_WIDTH;
break;
default :
- pAttr = new SmMathSymbolNode(CurToken);
+ pAttr = new SmMathSymbolNode(m_aCurToken);
}
NextToken();
pSNode->SetSubNodes(pAttr, 0);
pSNode->SetScaleMode(eScaleMode);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1812,14 +1813,14 @@ void SmParser::FontAttribut()
{
OSL_ENSURE(TokenInGroup(TGFONTATTR), "Sm: wrong token group");
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TITALIC :
case TNITALIC :
case TBOLD :
case TNBOLD :
case TPHANTOM :
- NodeStack.Push(new SmFontNode(CurToken));
+ m_aNodeStack.Push(new SmFontNode(m_aCurToken));
NextToken();
break;
@@ -1851,14 +1852,14 @@ void SmParser::Color()
{ NextToken();
if (TokenInGroup(TGCOLOR))
- { aToken = CurToken;
+ { aToken = m_aCurToken;
NextToken();
}
else
Error(PE_COLOR_EXPECTED);
- } while (CurToken.eType == TCOLOR);
+ } while (m_aCurToken.eType == TCOLOR);
- NodeStack.Push(new SmFontNode(aToken));
+ m_aNodeStack.Push(new SmFontNode(aToken));
}
@@ -1872,14 +1873,14 @@ void SmParser::Font()
{ NextToken();
if (TokenInGroup(TGFONT))
- { aToken = CurToken;
+ { aToken = m_aCurToken;
NextToken();
}
else
Error(PE_FONT_EXPECTED);
- } while (CurToken.eType == TFONT);
+ } while (m_aCurToken.eType == TFONT);
- NodeStack.Push(new SmFontNode(aToken));
+ m_aNodeStack.Push(new SmFontNode(aToken));
}
@@ -1909,12 +1910,12 @@ void SmParser::FontSize()
{
OSL_ENSURE(CurToken.eType == TSIZE, "Sm : Ooops...");
- USHORT Type;
- SmFontNode *pFontNode = new SmFontNode(CurToken);
+ sal_uInt16 Type;
+ SmFontNode *pFontNode = new SmFontNode(m_aCurToken);
NextToken();
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TNUMBER: Type = FNTSIZ_ABSOLUT; break;
case TPLUS: Type = FNTSIZ_PLUS; break;
@@ -1931,7 +1932,7 @@ void SmParser::FontSize()
if (Type != FNTSIZ_ABSOLUT)
{
NextToken();
- if (CurToken.eType != TNUMBER)
+ if (m_aCurToken.eType != TNUMBER)
{
delete pFontNode;
Error(PE_SIZE_EXPECTED);
@@ -1941,10 +1942,10 @@ void SmParser::FontSize()
// get number argument
Fraction aValue( 1L );
- if (lcl_IsNumber( CurToken.aText ))
+ if (lcl_IsNumber( m_aCurToken.aText ))
{
double fTmp;
- if ((fTmp = CurToken.aText.ToDouble()) != 0.0)
+ if ((fTmp = m_aCurToken.aText.ToDouble()) != 0.0)
{
aValue = fTmp;
@@ -1970,7 +1971,7 @@ void SmParser::FontSize()
NextToken();
pFontNode->SetSizeParameter(aValue, Type);
- NodeStack.Push(pFontNode);
+ m_aNodeStack.Push(pFontNode);
}
@@ -1979,14 +1980,14 @@ void SmParser::Brace()
OSL_ENSURE(CurToken.eType == TLEFT || TokenInGroup(TGLBRACES),
"Sm: kein Klammer Ausdruck");
- SmStructureNode *pSNode = new SmBraceNode(CurToken);
+ SmStructureNode *pSNode = new SmBraceNode(m_aCurToken);
SmNode *pBody = 0,
*pLeft = 0,
*pRight = 0;
SmScaleMode eScaleMode = SCALE_NONE;
SmParseError eError = PE_NONE;
- if (CurToken.eType == TLEFT)
+ if (m_aCurToken.eType == TLEFT)
{ NextToken();
eScaleMode = SCALE_HEIGHT;
@@ -1994,19 +1995,19 @@ void SmParser::Brace()
// check for left bracket
if (TokenInGroup(TGLBRACES) || TokenInGroup(TGRBRACES))
{
- pLeft = new SmMathSymbolNode(CurToken);
+ pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
Bracebody(true);
- pBody = NodeStack.Pop();
+ pBody = m_aNodeStack.Pop();
- if (CurToken.eType == TRIGHT)
+ if (m_aCurToken.eType == TRIGHT)
{ NextToken();
// check for right bracket
if (TokenInGroup(TGLBRACES) || TokenInGroup(TGRBRACES))
{
- pRight = new SmMathSymbolNode(CurToken);
+ pRight = new SmMathSymbolNode(m_aCurToken);
NextToken();
}
else
@@ -2022,11 +2023,11 @@ void SmParser::Brace()
{
if (TokenInGroup(TGLBRACES))
{
- pLeft = new SmMathSymbolNode(CurToken);
+ pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
Bracebody(false);
- pBody = NodeStack.Pop();
+ pBody = m_aNodeStack.Pop();
SmTokenType eExpectedType = TUNKNOWN;
switch (pLeft->GetToken().eType)
@@ -2043,9 +2044,9 @@ void SmParser::Brace()
OSL_ENSURE(0, "Sm: unknown case");
}
- if (CurToken.eType == eExpectedType)
+ if (m_aCurToken.eType == eExpectedType)
{
- pRight = new SmMathSymbolNode(CurToken);
+ pRight = new SmMathSymbolNode(m_aCurToken);
NextToken();
}
else
@@ -2060,7 +2061,7 @@ void SmParser::Brace()
OSL_ENSURE(pRight, "Sm: NULL pointer");
pSNode->SetSubNodes(pLeft, pBody, pRight);
pSNode->SetScaleMode(eScaleMode);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
else
{ delete pSNode;
@@ -2075,37 +2076,37 @@ void SmParser::Brace()
void SmParser::Bracebody(bool bIsLeftRight)
{
- SmStructureNode *pBody = new SmBracebodyNode(CurToken);
+ SmStructureNode *pBody = new SmBracebodyNode(m_aCurToken);
SmNodeArray aNodes;
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
// get body if any
if (bIsLeftRight)
{
do
{
- if (CurToken.eType == TMLINE)
+ if (m_aCurToken.eType == TMLINE)
{
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
nNum++;
}
- else if (CurToken.eType != TRIGHT)
+ else if (m_aCurToken.eType != TRIGHT)
{ Align();
nNum++;
- if (CurToken.eType != TMLINE && CurToken.eType != TRIGHT)
+ if (m_aCurToken.eType != TMLINE && m_aCurToken.eType != TRIGHT)
Error(PE_RIGHT_EXPECTED);
}
- } while (CurToken.eType != TEND && CurToken.eType != TRIGHT);
+ } while (m_aCurToken.eType != TEND && m_aCurToken.eType != TRIGHT);
}
else
{
do
{
- if (CurToken.eType == TMLINE)
+ if (m_aCurToken.eType == TMLINE)
{
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
nNum++;
}
@@ -2113,26 +2114,26 @@ void SmParser::Bracebody(bool bIsLeftRight)
{ Align();
nNum++;
- if (CurToken.eType != TMLINE && !TokenInGroup(TGRBRACES))
+ if (m_aCurToken.eType != TMLINE && !TokenInGroup(TGRBRACES))
Error(PE_RBRACE_EXPECTED);
}
- } while (CurToken.eType != TEND && !TokenInGroup(TGRBRACES));
+ } while (m_aCurToken.eType != TEND && !TokenInGroup(TGRBRACES));
}
// build argument vector in parsing order
aNodes.resize(nNum);
- for (USHORT i = 0; i < nNum; i++)
- aNodes[nNum - 1 - i] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < nNum; i++)
+ aNodes[nNum - 1 - i] = m_aNodeStack.Pop();
pBody->SetSubNodes(aNodes);
pBody->SetScaleMode(bIsLeftRight ? SCALE_HEIGHT : SCALE_NONE);
- NodeStack.Push(pBody);
+ m_aNodeStack.Push(pBody);
}
void SmParser::Function()
{
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TFUNC:
NextToken(); // skip "FUNC"-statement
@@ -2157,7 +2158,7 @@ void SmParser::Function()
case TLN :
case TLOG :
case TEXP :
- NodeStack.Push(new SmTextNode(CurToken, FNT_FUNCTION));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_FUNCTION));
NextToken();
break;
@@ -2170,7 +2171,7 @@ void SmParser::Function()
void SmParser::Binom()
{
SmNodeArray ExpressionArray;
- SmStructureNode *pSNode = new SmTableNode(CurToken);
+ SmStructureNode *pSNode = new SmTableNode(m_aCurToken);
NextToken();
@@ -2180,10 +2181,10 @@ void SmParser::Binom()
ExpressionArray.resize(2);
for (int i = 0; i < 2; i++)
- ExpressionArray[2 - (i + 1)] = NodeStack.Pop();
+ ExpressionArray[2 - (i + 1)] = m_aNodeStack.Pop();
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -2191,9 +2192,9 @@ void SmParser::Stack()
{
SmNodeArray ExpressionArray;
NextToken();
- if (CurToken.eType == TLGROUP)
+ if (m_aCurToken.eType == TLGROUP)
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
do
{
@@ -2201,25 +2202,25 @@ void SmParser::Stack()
Align();
n++;
}
- while (CurToken.eType == TPOUND);
+ while (m_aCurToken.eType == TPOUND);
ExpressionArray.resize(n);
- for (USHORT i = 0; i < n; i++)
- ExpressionArray[n - (i + 1)] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < n; i++)
+ ExpressionArray[n - (i + 1)] = m_aNodeStack.Pop();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
NextToken();
//We need to let the table node know it context
//it's used in SmNodeToTextVisitor
- SmToken aTok = CurToken;
+ SmToken aTok = m_aCurToken;
aTok.eType = TSTACK;
SmStructureNode *pSNode = new SmTableNode(aTok);
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
else
Error(PE_LGROUP_EXPECTED);
@@ -2231,9 +2232,9 @@ void SmParser::Matrix()
SmNodeArray ExpressionArray;
NextToken();
- if (CurToken.eType == TLGROUP)
+ if (m_aCurToken.eType == TLGROUP)
{
- USHORT c = 0;
+ sal_uInt16 c = 0;
do
{
@@ -2241,19 +2242,19 @@ void SmParser::Matrix()
Align();
c++;
}
- while (CurToken.eType == TPOUND);
+ while (m_aCurToken.eType == TPOUND);
- USHORT r = 1;
+ sal_uInt16 r = 1;
- while (CurToken.eType == TDPOUND)
+ while (m_aCurToken.eType == TDPOUND)
{
NextToken();
- for (USHORT i = 0; i < c; i++)
+ for (sal_uInt16 i = 0; i < c; i++)
{
Align();
if (i < (c - 1))
{
- if (CurToken.eType == TPOUND)
+ if (m_aCurToken.eType == TPOUND)
{
NextToken();
}
@@ -2269,18 +2270,18 @@ void SmParser::Matrix()
ExpressionArray.resize(nRC);
- for (USHORT i = 0; i < (nRC); i++)
- ExpressionArray[(nRC) - (i + 1)] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < (nRC); i++)
+ ExpressionArray[(nRC) - (i + 1)] = m_aNodeStack.Pop();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
NextToken();
- SmMatrixNode *pMNode = new SmMatrixNode(CurToken);
+ SmMatrixNode *pMNode = new SmMatrixNode(m_aCurToken);
pMNode->SetSubNodes(ExpressionArray);
pMNode->SetRowCol(r, c);
- NodeStack.Push(pMNode);
+ m_aNodeStack.Push(pMNode);
}
else
Error(PE_LGROUP_EXPECTED);
@@ -2290,7 +2291,7 @@ void SmParser::Matrix()
void SmParser::Special()
{
bool bReplace = false;
- String &rName = CurToken.aText;
+ String &rName = m_aCurToken.aText;
String aNewName;
if (CONVERT_NONE == GetConversion())
@@ -2336,8 +2337,8 @@ void SmParser::Special()
{
OSL_ENSURE( pFrom->Count() == pTo->Count(),
"array length mismatch" );
- USHORT nCount = sal::static_int_cast< USHORT >(pFrom->Count());
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = sal::static_int_cast< sal_uInt16 >(pFrom->Count());
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (pFrom->GetString(i) == rName)
{
@@ -2357,28 +2358,33 @@ void SmParser::Special()
rName = aNewName;
}
- NodeStack.Push(new SmSpecialNode(CurToken));
+ // add symbol name to list of used symbols
+ const String aSymbolName( m_aCurToken.aText.Copy( 1 ) );
+ if (aSymbolName.Len() > 0 )
+ AddToUsedSymbols( aSymbolName );
+
+ m_aNodeStack.Push(new SmSpecialNode(m_aCurToken));
NextToken();
}
void SmParser::GlyphSpecial()
{
- NodeStack.Push(new SmGlyphSpecialNode(CurToken));
+ m_aNodeStack.Push(new SmGlyphSpecialNode(m_aCurToken));
NextToken();
}
void SmParser::Error(SmParseError eError)
{
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
- SmErrorNode *pErr = new SmErrorNode(eError, CurToken);
+ SmStructureNode *pSNode = new SmExpressionNode(m_aCurToken);
+ SmErrorNode *pErr = new SmErrorNode(eError, m_aCurToken);
pSNode->SetSubNodes(pErr, 0);
//! put a structure node on the stack (instead of the error node itself)
//! because sometimes such a node is expected in order to attach some
//! subnodes
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
AddError(eError, pSNode);
@@ -2391,56 +2397,57 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
{
- eConversion = CONVERT_NONE;
- bImportSymNames = bExportSymNames = false;
- nLang = Application::GetSettings().GetUILanguage();
+ m_eConversion = CONVERT_NONE;
+ bImportSymNames = m_bExportSymNames = false;
+ m_nLang = Application::GetSettings().GetUILanguage();
}
-
SmNode *SmParser::Parse(const String &rBuffer)
{
- BufferString = rBuffer;
- BufferString.ConvertLineEnd( LINEEND_LF );
- BufferIndex = 0;
- nTokenIndex = 0;
- Row = 1;
- ColOff = 0;
- CurError = -1;
+ ClearUsedSymbols();
+
+ m_aBufferString = rBuffer;
+ m_aBufferString.ConvertLineEnd( LINEEND_LF );
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
- for ( size_t i = 0, n = ErrDescList.size(); i < n; ++i )
- delete ErrDescList[ i ];
- ErrDescList.clear();
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
- NodeStack.Clear();
+ m_aNodeStack.Clear();
SetLanguage( Application::GetSettings().GetUILanguage() );
NextToken();
Table();
- return NodeStack.Pop();
+ return m_aNodeStack.Pop();
}
SmNode *SmParser::ParseExpression(const String &rBuffer)
{
- BufferString = rBuffer;
- BufferString.ConvertLineEnd( LINEEND_LF );
- BufferIndex = 0;
- nTokenIndex = 0;
- Row = 1;
- ColOff = 0;
- CurError = -1;
+ m_aBufferString = rBuffer;
+ m_aBufferString.ConvertLineEnd( LINEEND_LF );
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
- for ( size_t i = 0, n = ErrDescList.size(); i < n; ++i )
- delete ErrDescList[ i ];
- ErrDescList.clear();
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
- NodeStack.Clear();
+ m_aNodeStack.Clear();
SetLanguage( Application::GetSettings().GetUILanguage() );
NextToken();
Expression();
- return NodeStack.Pop();
+ return m_aNodeStack.Pop();
}
@@ -2452,7 +2459,7 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
pErrDesc->pNode = pNode;
pErrDesc->Text = String(SmResId(RID_ERR_IDENT));
- USHORT nRID;
+ sal_uInt16 nRID;
switch (Type)
{
case PE_UNEXPECTED_CHAR: nRID = RID_ERR_UNEXPECTEDCHARACTER; break;
@@ -2474,20 +2481,20 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
}
pErrDesc->Text += SmResId(nRID);
- ErrDescList.push_back( pErrDesc );
+ m_aErrDescList.push_back( pErrDesc );
- return ErrDescList.size()-1;
+ return m_aErrDescList.size()-1;
}
const SmErrorDesc *SmParser::NextError()
{
- if ( !ErrDescList.empty() )
- if (CurError > 0) return ErrDescList[ --CurError ];
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError > 0) return m_aErrDescList[ --m_nCurError ];
else
{
- CurError = 0;
- return ErrDescList[ CurError ];
+ m_nCurError = 0;
+ return m_aErrDescList[ m_nCurError ];
}
else return NULL;
}
@@ -2495,12 +2502,12 @@ const SmErrorDesc *SmParser::NextError()
const SmErrorDesc *SmParser::PrevError()
{
- if ( !ErrDescList.empty() )
- if (CurError < (int) (ErrDescList.size() - 1)) return ErrDescList[ ++CurError ];
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError < (int) (m_aErrDescList.size() - 1)) return m_aErrDescList[ ++m_nCurError ];
else
{
- CurError = (int) (ErrDescList.size() - 1);
- return ErrDescList[ CurError ];
+ m_nCurError = (int) (m_aErrDescList.size() - 1);
+ return m_aErrDescList[ m_nCurError ];
}
else return NULL;
}
@@ -2508,9 +2515,9 @@ const SmErrorDesc *SmParser::PrevError()
const SmErrorDesc *SmParser::GetError(size_t i)
{
- return ( i < ErrDescList.size() )
- ? ErrDescList[ i ]
- : ErrDescList[ CurError ];
+ return ( i < m_aErrDescList.size() )
+ ? m_aErrDescList[ i ]
+ : m_aErrDescList[ m_nCurError ];
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 473ea367c2..df43a1d8a2 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -140,7 +140,7 @@ void SmRect::CopyAlignInfo(const SmRect &rRect)
void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorder)
+ const XubString &rText, sal_uInt16 nBorder)
{
OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: Ooops...");
@@ -235,7 +235,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nEBorderWidth)
+ const XubString &rText, sal_uInt16 nEBorderWidth)
// get rectangle fitting for drawing 'rText' on OutputDevice 'rDev'
{
BuildRect(rDev, pFormat, rText, nEBorderWidth);
@@ -248,7 +248,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
OSL_ENSURE( nEBorderWidth >= 0, "BorderWidth is negative" );
if (nEBorderWidth < 0)
nEBorderWidth = 0;
- Init(rDev, pFormat, rText, (USHORT) nEBorderWidth);
+ Init(rDev, pFormat, rText, (sal_uInt16) nEBorderWidth);
}
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index 8c40793772..3ddb233b7e 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -119,92 +119,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/,
- void* pRegistryKey )
-{
- Reference< registry::XRegistryKey >
- xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Actual implementation and register its services
- sal_Int32 i;
- Reference< registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImport_getImplementationName() +
- aUnoServices );
-
- Sequence< OUString > aServices = SmXMLImport_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExport_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExport_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImportMeta_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLImportMeta_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportMetaOOO_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportMetaOOO_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportMeta_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportMeta_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImportSettings_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLImportSettings_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettingsOOO_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportSettingsOOO_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettings_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportSettings_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportContent_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportContent_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmDocument_getImplementationName() +
- aUnoServices );
-
- aServices = SmDocument_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/ )
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index e936de56c5..ca50ad3147 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -31,7 +31,7 @@
#include "smdetect.hxx"
-#include <framework/interaction.hxx>
+//#include <framework/interaction.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -170,7 +170,7 @@ SmFilterDetect::~SmFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -191,7 +191,7 @@ SmFilterDetect::~SmFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
aMedium.UseInteractionHandler( true );
bool bIsStorage = aMedium.IsStorage();
@@ -243,7 +243,7 @@ SmFilterDetect::~SmFilterDetect()
String aTmpFilterName;
if ( pFilter )
aTmpFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : FALSE, &aTmpFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : sal_False, &aTmpFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -263,20 +263,16 @@ SmFilterDetect::~SmFilterDetect()
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
-
- xInteraction->handle( xRequest );
-
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
}
}
@@ -311,7 +307,7 @@ SmFilterDetect::~SmFilterDetect()
aTypeName.Erase();
if (pStrm && !pStrm->GetError())
{
- SotStorageRef aStorage = new SotStorage ( pStrm, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStrm, sal_False );
if ( !aStorage->GetError() )
{
if ( aStorage->IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Equation Native" ) ) ) )
@@ -323,11 +319,11 @@ SmFilterDetect::~SmFilterDetect()
}
else
{
- const USHORT nSize = 5;
+ const sal_uInt16 nSize = 5;
sal_Char aBuffer[nSize+1];
aBuffer[nSize] = 0;
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
- ULONG nBytesRead = pStrm->Read( aBuffer, nSize );
+ sal_uLong nBytesRead = pStrm->Read( aBuffer, nSize );
if (nBytesRead == nSize)
{
if (0 == strncmp( "<?xml",aBuffer,nSize))
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 964e8d3471..fc891b53b3 100644..100755
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -63,7 +63,7 @@ TYPEINIT1( SmModule, SfxModule );
-SmResId::SmResId( USHORT nId )
+SmResId::SmResId( sal_uInt16 nId )
: ResId(nId, *SM_MOD()->GetResMgr())
{
}
@@ -99,8 +99,8 @@ const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -120,8 +120,8 @@ const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -141,8 +141,8 @@ const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -162,8 +162,8 @@ const String SmLocalizedSymbolData::GetExportSymbolSetName( const String &rUiNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -232,7 +232,7 @@ SFX_IMPL_INTERFACE(SmModule, SfxModule, SmResId(RID_APPLICATION))
SmModule::SmModule(SfxObjectFactory* pObjFact) :
- SfxModule(SfxApplication::CreateResManager("sm"), FALSE, pObjFact, NULL),
+ SfxModule(SfxApplication::CreateResManager("sm"), sal_False, pObjFact, NULL),
pColorConfig( 0 ),
pConfig( 0 ),
pLocSymbolData( 0 ),
@@ -327,7 +327,7 @@ void SmModule::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
switch (nWh)
{
case SID_CONFIGEVENT :
@@ -336,17 +336,7 @@ void SmModule::GetState(SfxItemSet &rSet)
}
}
-void SmModule::FillStatusBar(StatusBar &rBar)
-{
- rBar.InsertItem(SID_TEXTSTATUS, 300, SIB_LEFT | SIB_IN);
- rBar.InsertItem(SID_ATTR_ZOOM, rBar.GetTextWidth(C2S(" 100% ")));
- rBar.InsertItem(SID_MODIFYSTATUS, rBar.GetTextWidth(C2S(" * ")));
- rBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rBar ), SIB_USERDRAW );
- rBar.SetHelpId(SID_SIGNATURE, SID_SIGNATURE);
-
-}
-
-SfxItemSet* SmModule::CreateItemSet( USHORT nId )
+SfxItemSet* SmModule::CreateItemSet( sal_uInt16 nId )
{
SfxItemSet* pRet = 0;
if(nId == SID_SM_EDITOPTIONS)
@@ -359,20 +349,21 @@ SfxItemSet* SmModule::CreateItemSet( USHORT nId )
SID_PRINTTEXT, SID_PRINTTEXT,
SID_PRINTFRAME, SID_PRINTFRAME,
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
+ SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
0 );
GetConfig()->ConfigToItemSet(*pRet);
}
return pRet;
}
-void SmModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if(nId == SID_SM_EDITOPTIONS)
{
GetConfig()->ItemSetToConfig(rSet);
}
}
-SfxTabPage* SmModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SmModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = 0;
if(nId == SID_SM_TP_PRINTOPTIONS)
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 1c437c487c..1ccffb5551 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -31,6 +31,7 @@
#include "starmath.hrc"
#include "dialog.hrc"
#include "toolbox.hrc"
+#include "smcommands.h"
#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
#define MN_SUB_TOOLBAR 32
@@ -40,6 +41,7 @@
ModalDialog RID_FONTDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_FONTDIALOG";
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
@@ -54,6 +56,7 @@ ModalDialog RID_FONTDIALOG
};
ComboBox 1
{
+ HelpID = "starmath:ComboBox:RID_FONTDIALOG:1";
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 111 , 60 ) ;
TabStop = TRUE ;
@@ -62,6 +65,7 @@ ModalDialog RID_FONTDIALOG
};
CheckBox 1
{
+ HelpID = "starmath:CheckBox:RID_FONTDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 84 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
@@ -69,6 +73,7 @@ ModalDialog RID_FONTDIALOG
};
CheckBox 2
{
+ HelpID = "starmath:CheckBox:RID_FONTDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 97 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
@@ -107,7 +112,7 @@ ModalDialog RID_FONTSIZEDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_FONTSIZE ;
+ HelpId = CMD_SID_FONTSIZE ;
Size = MAP_APPFONT ( 171 , 120 ) ;
Text [ en-US ] = "Font Sizes" ;
FixedText 1
@@ -119,6 +124,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 1
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 6 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -139,6 +145,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 4
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:4";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 36 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -160,6 +167,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 5
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:5";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 51 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -181,6 +189,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 6
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:6";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 66 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -202,6 +211,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 7
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:7";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 81 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -223,6 +233,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 8
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:8";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 96 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -256,6 +267,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_FONTSIZEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 114 , 45 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -267,7 +279,7 @@ ModalDialog RID_FONTTYPEDIALOG
{
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_FONT ;
+ HelpId = CMD_SID_FONT ;
Size = MAP_APPFONT ( 282 , 153 ) ;
Text [ en-US ] = "Fonts" ;
Moveable = TRUE ;
@@ -292,6 +304,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 18 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -307,6 +320,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 2
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:2";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 33 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -322,6 +336,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 3
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:3";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 48 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -337,6 +352,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 4
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:4";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 63 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -352,6 +368,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 5
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:5";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 96 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -367,6 +384,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 6
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:6";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 111 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -382,6 +400,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 7
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:7";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 126 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -403,6 +422,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
MenuButton 1
{
+ HelpID = "starmath:MenuButton:RID_FONTTYPEDIALOG:1";
TabStop = TRUE ;
ButtonMenu = Menu , RID_FONTMENU ;
Pos = MAP_APPFONT ( 225 , 48 ) ;
@@ -411,6 +431,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_FONTTYPEDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 225 , 66 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -423,7 +444,7 @@ ModalDialog RID_DISTANCEDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_DISTANCE ;
+ HelpId = CMD_SID_DISTANCE ;
Size = MAP_APPFONT ( 240 , 90 ) ;
Text [ en-US ] = "Spacing" ;
FixedText 1
@@ -434,6 +455,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 1
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:1";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -454,6 +476,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 2
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:2";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -466,6 +489,7 @@ ModalDialog RID_DISTANCEDIALOG
};
CheckBox 1
{
+ HelpID = "starmath:CheckBox:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 55 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
@@ -481,6 +505,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 3
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:3";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -501,6 +526,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 4
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:4";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -526,6 +552,7 @@ ModalDialog RID_DISTANCEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 184 , 69 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -533,6 +560,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MenuButton 1
{
+ HelpID = "starmath:MenuButton:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
ButtonMenu = Menu , RID_DISTANCEMENU ;
Pos = MAP_APPFONT ( 184 , 51 ) ;
@@ -821,11 +849,12 @@ ModalDialog RID_ALIGNDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_ALIGN ;
+ HelpId = CMD_SID_ALIGN ;
Size = MAP_APPFONT ( 139 , 66 ) ;
Text [ en-US ] = "Alignment" ;
RadioButton 1
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 17 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -833,6 +862,7 @@ ModalDialog RID_ALIGNDIALOG
};
RadioButton 2
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 31 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -840,6 +870,7 @@ ModalDialog RID_ALIGNDIALOG
};
RadioButton 3
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:3";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -866,6 +897,7 @@ ModalDialog RID_ALIGNDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_ALIGNDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 83 , 46 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -875,6 +907,7 @@ ModalDialog RID_ALIGNDIALOG
TabPage RID_PRINTOPTIONPAGE
{
+ HelpID = "starmath:TabPage:RID_PRINTOPTIONPAGE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
@@ -887,6 +920,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_TITLEROW
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_TITLEROW";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -894,6 +928,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_EQUATION_TEXT
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_EQUATION_TEXT";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -901,6 +936,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_FRAME
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_FRAME";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -914,6 +950,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_ORIGINAL_SIZE
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ORIGINAL_SIZE";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 69 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -921,6 +958,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_FIT_TO_PAGE
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_FIT_TO_PAGE";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -928,6 +966,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_ZOOM
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ZOOM";
Pos = MAP_APPFONT ( 12 , 97 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Scaling" ;
@@ -935,6 +974,7 @@ TabPage RID_PRINTOPTIONPAGE
};
MetricField MF_ZOOM
{
+ HelpID = "starmath:MetricField:RID_PRINTOPTIONPAGE:MF_ZOOM";
Border = TRUE ;
Pos = MAP_APPFONT ( 18 , 111 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -955,15 +995,24 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_IGNORE_SPACING
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_IGNORE_SPACING";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 140 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "Ig~nore ~~ and ` at the end of the line";
};
+ CheckBox CB_SAVE_ONLY_USED_SYMBOLS
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 154 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ Text [ en-US ] = "Embed only used symbols (smaller file size)";
+ };
};
ModalDialog RID_SYMBOLDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_SYMBOLDIALOG";
OutputSize = TRUE ;
SVLook = TRUE ;
Closeable = TRUE; // Close Button in Window Leiste explizit einbauen
@@ -979,6 +1028,7 @@ ModalDialog RID_SYMBOLDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_SYMBOLDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 92, 57 ) ;
@@ -1010,6 +1060,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 177 , 6 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
@@ -1018,6 +1069,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 3
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:3";
Pos = MAP_APPFONT ( 177 , 24 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
TabStop = TRUE ;
@@ -1025,6 +1077,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 177 , 42 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
@@ -1034,6 +1087,7 @@ ModalDialog RID_SYMBOLDIALOG
ModalDialog RID_SYMDEFINEDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_SYMDEFINEDIALOG";
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
@@ -1048,8 +1102,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 1
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:1";
Pos = MAP_APPFONT ( 59 , 6 ) ;
- Size = MAP_APPFONT ( 80 , 50 ) ;
+ Size = MAP_APPFONT ( 80 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1063,8 +1118,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 2
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:2";
Pos = MAP_APPFONT ( 210 , 6 ) ;
- Size = MAP_APPFONT ( 80 , 50 ) ;
+ Size = MAP_APPFONT ( 80 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1087,8 +1143,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 4
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:4";
Pos = MAP_APPFONT ( 80 , 115 ) ;
- Size = MAP_APPFONT ( 100 , 80 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1102,8 +1159,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 5
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:5";
Pos = MAP_APPFONT ( 80 , 130 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1117,9 +1175,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 145 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
Sort = TRUE ;
DropDown = TRUE ;
@@ -1133,9 +1192,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ListBox LB_FONTS_SUBSET
{
+ HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:LB_FONTS_SUBSET";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 160 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
Sort = FALSE ;
DropDown = TRUE ;
@@ -1149,9 +1209,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 3
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:3";
Border = TRUE;
Pos = MAP_APPFONT ( 80 , 175 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = FALSE ;
@@ -1210,6 +1271,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 305 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1217,6 +1279,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 245 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1224,6 +1287,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 3
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:3";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 185 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1295,37 +1359,37 @@ Menu RID_VIEWMENU
MenuItem
{
Identifier = SID_VIEW050 ;
- HelpID = SID_VIEW050 ;
+ HelpId = CMD_SID_VIEW050 ;
Text [ en-US ] = "~View 50%" ;
};
MenuItem
{
Identifier = SID_VIEW100 ;
- HelpID = SID_VIEW100 ;
+ HelpId = CMD_SID_VIEW100 ;
Text [ en-US ] = "View ~100%" ;
};
MenuItem
{
Identifier = SID_VIEW200 ;
- HelpID = SID_VIEW200 ;
+ HelpId = CMD_SID_VIEW200 ;
Text [ en-US ] = "View ~200%" ;
};
MenuItem
{
Identifier = SID_ZOOMIN ;
- HelpID = SID_ZOOMIN ;
+ HelpId = CMD_SID_ZOOMIN ;
Text [ en-US ] = "~Zoom In" ;
};
MenuItem
{
Identifier = SID_ZOOMOUT ;
- HelpID = SID_ZOOMOUT ;
+ HelpId = CMD_SID_ZOOMOUT ;
Text [ en-US ] = "Zoom ~Out" ;
};
MenuItem
{
Identifier = SID_ADJUST ;
- HelpID = SID_ADJUST ;
+ HelpId = CMD_SID_ADJUST ;
Text [ en-US ] = "~Display All" ;
};
MenuItem
@@ -1335,7 +1399,7 @@ Menu RID_VIEWMENU
MenuItem
{
Identifier = SID_DRAW ;
- HelpID = SID_DRAW ;
+ HelpId = CMD_SID_DRAW ;
Text [ en-US ] = "U~pdate" ;
};
};
@@ -1439,1419 +1503,6 @@ Menu RID_FONTMENU
};
};
-FloatingWindow RID_TOOLBOXWINDOW
-{
- HelpId = HID_SMA_OPERATOR_WIN ;
- Border = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Text [ en-US ] = "Elements" ;
-
- ToolBox 1
- {
- // unary/binary operators
- HelpId = HID_SMA_UNBINOPS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 4 ;
-
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_PLUSX ;
- HelpId = HID_SMA_PLUSX ;
- Text [ en-US ] = "+ Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MINUSX ;
- HelpId = HID_SMA_MINUSX ;
- Text [ en-US ] = "- Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_PLUSMINUSX ;
- HelpId = HID_SMA_PLUSMINUSX ;
- Text [ en-US ] = "+- Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MINUSPLUSX ;
- HelpId = HID_SMA_MINUSPLUSX ;
- Text [ en-US ] = "-+ Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NEGX ;
- HelpId = HID_SMA_NEGX ;
- Text [ en-US ] = "Boolean NOT" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPLUSY ;
- HelpId = HID_SMA_XPLUSY ;
- Text [ en-US ] = "Addition +" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XCDOTY ;
- HelpId = HID_SMA_XCDOTY ;
- Text [ en-US ] = "Multiplication (Dot )" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XTIMESY ;
- HelpId = HID_SMA_XTIMESY ;
- Text [ en-US ] = "Multiplication (x)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSYMTIMESY ;
- HelpId = HID_SMA_XSYMTIMESY ;
- Text [ en-US ] = "Multiplication (*)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XANDY ;
- HelpId = HID_SMA_XANDY ;
- Text [ en-US ] = "Boolean AND" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XMINUSY ;
- HelpId = HID_SMA_XMINUSY ;
- Text [ en-US ] = "Subtraction -" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOVERY ;
- HelpId = HID_SMA_XOVERY ;
- Text [ en-US ] = "Division (Fraction)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XDIVY ;
- HelpId = HID_SMA_XDIVY ;
- Text [ en-US ] = "Division (÷)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSYMDIVIDEY ;
- HelpId = HID_SMA_XSYMDIVIDEY ;
- Text [ en-US ] = "Division (Slash)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XORY ;
- HelpId = HID_SMA_XORY ;
- Text [ en-US ] = "Boolean OR" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XCIRCY ;
- HelpId = HID_SMA_XCIRCY ;
- Text [ en-US ] = "Concatenate";
- };
- };
- };
- ToolBox 2
- {
- // relations
- HelpId = HID_SMA_RELATIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_XEQY ;
- HelpId = HID_SMA_XEQY ;
- Text [ en-US ] = "Is Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNEQY ;
- HelpId = HID_SMA_XNEQY ;
- Text [ en-US ] = "Is Not Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XAPPROXY ;
- HelpId = HID_SMA_XAPPROXY ;
- Text [ en-US ] = "Is Approximately Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XDIVIDESY ;
- HelpId = HID_SMA_XDIVIDESY ;
- Text [ en-US ] = "Divides";
- };
- ToolBoxItem
- {
- Identifier = RID_XNDIVIDESY ;
- HelpId = HID_SMA_XNDIVIDESY ;
- Text [ en-US ] = "Does Not Divide";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLTY ;
- HelpId = HID_SMA_XLTY ;
- Text [ en-US ] = "Is Less Than" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGTY ;
- HelpId = HID_SMA_XGTY ;
- Text [ en-US ] = "Is Greater Than" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSIMEQY ;
- HelpId = HID_SMA_XSIMEQY ;
- Text [ en-US ] = "Is Similar Or Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPARALLELY ;
- HelpId = HID_SMA_XPARALLELY ;
- Text [ en-US ] = "Is Parallel To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XORTHOY ;
- HelpId = HID_SMA_XORTHOY ;
- Text [ en-US ] = "Is Orthogonal To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLESLANTY ;
- HelpId = HID_SMA_XLESLANTY ;
- Text [ en-US ] = "Is Less Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGESLANTY ;
- HelpId = HID_SMA_XGESLANTY ;
- Text [ en-US ] = "Is Greater Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSIMY ;
- HelpId = HID_SMA_XSIMY ;
- Text [ en-US ] = "Is Similar To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XEQUIVY ;
- HelpId = HID_SMA_XEQUIVY ;
- Text [ en-US ] = "Is Congruent To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLEY ;
- HelpId = HID_SMA_XLEY ;
- Text [ en-US ] = "Is Less Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGEY ;
- HelpId = HID_SMA_XGEY ;
- Text [ en-US ] = "Is Greater Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPROPY ;
- HelpId = HID_SMA_XPROPY ;
- Text [ en-US ] = "Is Proportional To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XTOWARDY ;
- HelpId = HID_SMA_XTOWARDY ;
- Text [ en-US ] = "Toward" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_DLARROW ;
- HelpId = HID_SMA_DLARROW ;
- Text [ en-US ] = "Double Arrow Left";
- };
- ToolBoxItem
- {
- Identifier = RID_DLRARROW ;
- HelpId = HID_SMA_DLRARROW ;
- Text [ en-US ] = "Double Arrow Left And Right";
- };
- ToolBoxItem
- {
- Identifier = RID_DRARROW ;
- HelpId = HID_SMA_DRARROW ;
- Text [ en-US ] = "Double Arrow Right";
- };
- };
- };
- ToolBox 3
- {
- // set operations
- HelpId = HID_SMA_SETOPERATIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_XINY ;
- HelpId = HID_SMA_XINY ;
- Text [ en-US ] = "Is In" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNOTINY ;
- HelpId = HID_SMA_XNOTINY ;
- Text [ en-US ] = "Is Not In" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOWNSY ;
- HelpId = HID_SMA_XOWNSY ;
- Text [ en-US ] = "Owns" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_EMPTYSET ;
- HelpId = HID_SMA_EMPTYSET ;
- Text [ en-US ] = "Empty Set";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XINTERSECTIONY ;
- HelpId = HID_SMA_XINTERSECTIONY ;
- Text [ en-US ] = "Intersection" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XUNIONY ;
- HelpId = HID_SMA_XUNIONY ;
- Text [ en-US ] = "Union" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSETMINUSY ;
- HelpId = HID_SMA_XSETMINUSY ;
- Text [ en-US ] = "Difference" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSLASHY ;
- HelpId = HID_SMA_XSLASHY ;
- Text [ en-US ] = "Quotient Set" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALEPH ;
- HelpId = HID_SMA_ALEPH ;
- Text [ en-US ] = "Aleph";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUBSETY ;
- HelpId = HID_SMA_XSUBSETY ;
- Text [ en-US ] = "Subset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUBSETEQY ;
- HelpId = HID_SMA_XSUBSETEQY ;
- Text [ en-US ] = "Subset Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUPSETY ;
- HelpId = HID_SMA_XSUPSETY ;
- Text [ en-US ] = "Superset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUPSETEQY ;
- HelpId = HID_SMA_XSUPSETEQY ;
- Text [ en-US ] = "Superset Or Equal To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUBSETY ;
- HelpId = HID_SMA_XNSUBSETY ;
- Text [ en-US ] = "Not Subset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUBSETEQY ;
- HelpId = HID_SMA_XNSUBSETEQY ;
- Text [ en-US ] = "Not Subset Or Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUPSETY ;
- HelpId = HID_SMA_XNSUPSETY ;
- Text [ en-US ] = "Not Superset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUPSETEQY ;
- HelpId = HID_SMA_XNSUPSETEQY ;
- Text [ en-US ] = "Not Superset Or Equal" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SETN ;
- HelpId = HID_SMA_SETN ;
- Text [ en-US ] = "Natural Numbers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETZ ;
- HelpId = HID_SMA_SETZ ;
- Text [ en-US ] = "Integers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETQ ;
- HelpId = HID_SMA_SETQ ;
- Text [ en-US ] = "Set of Rational Numbers";
- };
- ToolBoxItem
- {
- Identifier = RID_SETR ;
- HelpId = HID_SMA_SETR ;
- Text [ en-US ] = "Real Numbers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETC ;
- HelpId = HID_SMA_SETC ;
- Text [ en-US ] = "Complex Numbers Set";
- };
- };
- };
- ToolBox 4
- {
- // functions
- HelpId = HID_SMA_FUNCTIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_EX ;
- HelpId = HID_SMA_EX ;
- Text [ en-US ] = "Exponential Function" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LNX ;
- HelpId = HID_SMA_LNX ;
- Text [ en-US ] = "Natural Logarithm" ;
- };
- ToolBoxItem
- {
- Identifier = RID_EXPX ;
- HelpId = HID_SMA_EXPX ;
- Text [ en-US ] = "Exponential Function" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LOGX ;
- HelpId = HID_SMA_LOGX ;
- Text [ en-US ] = "Logarithm" ;
- };
- ToolBoxItem
- {
- Identifier = RID_RSUPX ;
- HelpId = HID_SMA_RSUPX ;
- Text [ en-US ] = "Power";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SINX ;
- HelpId = HID_SMA_SINX ;
- Text [ en-US ] = "Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COSX ;
- HelpId = HID_SMA_COSX ;
- Text [ en-US ] = "Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TANX ;
- HelpId = HID_SMA_TANX ;
- Text [ en-US ] = "Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COTX ;
- HelpId = HID_SMA_COTX ;
- Text [ en-US ] = "Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SQRTX ;
- HelpId = HID_SMA_SQRTX ;
- Text [ en-US ] = "Square Root" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCSINX ;
- HelpId = HID_SMA_ARCSINX ;
- Text [ en-US ] = "Arcsine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCCOSX ;
- HelpId = HID_SMA_ARCCOSX ;
- Text [ en-US ] = "Arccosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCTANX ;
- HelpId = HID_SMA_ARCTANX ;
- Text [ en-US ] = "Arctangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCCOTX ;
- HelpId = HID_SMA_ARCCOTX ;
- Text [ en-US ] = "Arccotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NROOTXY ;
- HelpId = HID_SMA_NROOTXY ;
- Text [ en-US ] = "N-th Root" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SINHX ;
- HelpId = HID_SMA_SINHX ;
- Text [ en-US ] = "Hyperbolic Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COSHX ;
- HelpId = HID_SMA_COSHX ;
- Text [ en-US ] = "Hyperbolic Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TANHX ;
- HelpId = HID_SMA_TANHX ;
- Text [ en-US ] = "Hyperbolic Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COTHX ;
- HelpId = HID_SMA_COTHX ;
- Text [ en-US ] = "Hyperbolic Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ABSX ;
- HelpId = HID_SMA_ABSX ;
- Text [ en-US ] = "Absolute Value" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARSINHX ;
- HelpId = HID_SMA_ARSINHX ;
- Text [ en-US ] = "Area Hyperbolic Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCOSHX ;
- HelpId = HID_SMA_ARCOSHX ;
- Text [ en-US ] = "Area Hyperbolic Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARTANHX ;
- HelpId = HID_SMA_ARTANHX ;
- Text [ en-US ] = "Area Hyperbolic Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCOTHX ;
- HelpId = HID_SMA_ARCOTHX ;
- Text [ en-US ] = "Area Hyperbolic Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FACTX ;
- HelpId = HID_SMA_FACTX ;
- Text [ en-US ] = "Factorial" ;
- };
- };
- };
- ToolBox 5
- {
- // operators
- HelpId = HID_SMA_OPERATORS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 3 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LIMX ;
- HelpId = HID_SMA_LIMX ;
- Text [ en-US ] = "Limes" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SUMX ;
- HelpId = HID_SMA_SUMX ;
- Text [ en-US ] = "Sum" ;
- };
- ToolBoxItem
- {
- Identifier = RID_PRODX ;
- HelpId = HID_SMA_PRODX ;
- Text [ en-US ] = "Product" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COPRODX ;
- HelpId = HID_SMA_COPRODX ;
- Text [ en-US ] = "Coproduct" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FROMXTOY ;
- HelpId = HID_SMA_FROMXTOY ;
- Text [ en-US ] = "Upper And Lower Limit" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_INTX ;
- HelpId = HID_SMA_INTX ;
- Text [ en-US ] = "Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_IINTX ;
- HelpId = HID_SMA_IINTX ;
- Text [ en-US ] = "Double Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_IIINTX ;
- HelpId = HID_SMA_IIINTX ;
- Text [ en-US ] = "Triple Integral" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_FROMX ;
- HelpId = HID_SMA_FROMX ;
- Text [ en-US ] = "Lower Limit" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LINTX ;
- HelpId = HID_SMA_LINTX ;
- Text [ en-US ] = "Curve Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LLINTX ;
- HelpId = HID_SMA_LLINTX ;
- Text [ en-US ] = "Double Curve Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LLLINTX ;
- HelpId = HID_SMA_LLLINTX ;
- Text [ en-US ] = "Triple Curve Integral" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_TOX ;
- HelpId = HID_SMA_TOX ;
- Text [ en-US ] = "Upper Limit" ;
- };
- };
- };
- ToolBox 6
- {
- // attributs
- HelpId = HID_SMA_ATTRIBUTES_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_ACUTEX ;
- HelpId = HID_SMA_ACUTEX ;
- Text [ en-US ] = "Acute Accent";
- };
- ToolBoxItem
- {
- Identifier = RID_GRAVEX ;
- HelpId = HID_SMA_GRAVEX ;
- Text [ en-US ] = "Grave Accent";
- };
- ToolBoxItem
- {
- Identifier = RID_CHECKX ;
- HelpId = HID_SMA_CHECKX ;
- Text [ en-US ] = "Reverse Circumflex" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BREVEX ;
- HelpId = HID_SMA_BREVEX ;
- Text [ en-US ] = "Breve" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CIRCLEX ;
- HelpId = HID_SMA_CIRCLEX ;
- Text [ en-US ] = "Circle" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_VECX ;
- HelpId = HID_SMA_VECX ;
- Text [ en-US ] = "Vector Arrow" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TILDEX ;
- HelpId = HID_SMA_TILDEX ;
- Text [ en-US ] = "Tilde" ;
- };
- ToolBoxItem
- {
- Identifier = RID_HATX ;
- HelpId = HID_SMA_HATX ;
- Text [ en-US ] = "Circumflex" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BARX ;
- HelpId = HID_SMA_BARX ;
- Text [ en-US ] = "Line Above" ;
- };
- ToolBoxItem
- {
- Identifier = RID_DOTX ;
- HelpId = HID_SMA_DOTX ;
- Text [ en-US ] = "Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_WIDEVECX ;
- HelpId = HID_SMA_WIDEVECX ;
- Text [ en-US ] = "Large Vector Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_WIDETILDEX ;
- HelpId = HID_SMA_WIDETILDEX ;
- Text [ en-US ] = "Large Tilde";
- };
- ToolBoxItem
- {
- Identifier = RID_WIDEHATX ;
- HelpId = HID_SMA_WIDEHATX ;
- Text [ en-US ] = "Large Circumflex";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_DDOTX ;
- HelpId = HID_SMA_DDOTX ;
- Text [ en-US ] = "Double Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_OVERLINEX ;
- HelpId = HID_SMA_OVERLINEX ;
- Text [ en-US ] = "Line Over" ;
- };
- ToolBoxItem
- {
- Identifier = RID_UNDERLINEX ;
- HelpId = HID_SMA_UNDERLINEX ;
- Text [ en-US ] = "Line Below" ;
- };
- ToolBoxItem
- {
- Identifier = RID_OVERSTRIKEX ;
- HelpId = HID_SMA_OVERSTRIKEX ;
- Text [ en-US ] = "Line Through" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_DDDOTX ;
- HelpId = HID_SMA_DDDOTX ;
- Text [ en-US ] = "Triple Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_PHANTOMX ;
- HelpId = HID_SMA_PHANTOMX ;
- Text [ en-US ] = "Transparent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BOLDX ;
- HelpId = HID_SMA_BOLDX ;
- Text [ en-US ] = "Bold Font" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ITALX ;
- HelpId = HID_SMA_ITALX ;
- Text [ en-US ] = "Italic Font" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SIZEXY ;
- HelpId = HID_SMA_SIZEXY ;
- Text [ en-US ] = "Resize" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FONTXY ;
- HelpId = HID_SMA_FONTXY ;
- Text [ en-US ] = "Change Font" ;
- };
- };
- };
- ToolBox 7
- {
- // parentheses
- HelpId = HID_SMA_BRACKETS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LRPARENTX ;
- HelpId = HID_SMA_LRPARENTX ;
- Text [ en-US ] = "Round Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRBRACKETX ;
- HelpId = HID_SMA_LRBRACKETX ;
- Text [ en-US ] = "Square Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRDBRACKETX ;
- HelpId = HID_SMA_LRDBRACKETX ;
- Text [ en-US ] = "Double Square Brackets";
- };
- ToolBoxItem
- {
- Identifier = RID_LRLINEX ;
- HelpId = HID_SMA_LRLINEX ;
- Text [ en-US ] = "Single Lines" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRDLINEX ;
- HelpId = HID_SMA_LRDLINEX ;
- Text [ en-US ] = "Double Lines" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRBRACEX ;
- HelpId = HID_SMA_LRBRACEX ;
- Text [ en-US ] = "Braces" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRANGLEX ;
- HelpId = HID_SMA_LRANGLEX ;
- Text [ en-US ] = "Angle Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LMRANGLEXY ;
- HelpId = HID_SMA_LMRANGLEXY ;
- Text [ en-US ] = "Operator Brackets";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRGROUPX ;
- HelpId = HID_SMA_LRGROUPX ;
- Text [ en-US ] = "Group Brackets" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRPARENTX ;
- HelpId = HID_SMA_SLRPARENTX ;
- Text [ en-US ] = "Round Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRBRACKETX ;
- HelpId = HID_SMA_SLRBRACKETX ;
- Text [ en-US ] = "Square Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRDBRACKETX ;
- HelpId = HID_SMA_SLRDBRACKETX ;
- Text [ en-US ] = "Double Square Brackets (Scalable)";
- };
- ToolBoxItem
- {
- Identifier = RID_SLRLINEX ;
- HelpId = HID_SMA_SLRLINEX ;
- Text [ en-US ] = "Single Lines (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRDLINEX ;
- HelpId = HID_SMA_SLRDLINEX ;
- Text [ en-US ] = "Double Lines (Scalable)" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRBRACEX ;
- HelpId = HID_SMA_SLRBRACEX ;
- Text [ en-US ] = "Braces (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRANGLEX ;
- HelpId = HID_SMA_SLRANGLEX ;
- Text [ en-US ] = "Angle Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLMRANGLEXY ;
- HelpId = HID_SMA_SLMRANGLEXY ;
- Text [ en-US ] = "Operator Brackets (Scalable)";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOVERBRACEY ;
- HelpId = HID_SMA_XOVERBRACEY ;
- Text [ en-US ] = "Braces Top (Scalable)";
- };
- ToolBoxItem
- {
- Identifier = RID_XUNDERBRACEY ;
- HelpId = HID_SMA_XUNDERBRACEY ;
- Text [ en-US ] = "Braces Bottom (Scalable)";
- };
- };
- };
- ToolBox 8
- {
- // format
- HelpId = HID_SMA_FORMAT_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 3 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LSUPX ;
- HelpId = HID_SMA_LSUPX ;
- Text [ en-US ] = "Superscript Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CSUPX ;
- HelpId = HID_SMA_CSUPX ;
- Text [ en-US ] = "Superscript Top";
- };
- ToolBoxItem
- {
- Identifier = RID_RSUPX ;
- HelpId = HID_SMA_RSUPX ;
- Text [ en-US ] = "Superscript Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BINOMXY ;
- HelpId = HID_SMA_BINOMXY ;
- Text [ en-US ] = "Vertical Stack (2 Elements)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NEWLINE ;
- HelpId = HID_SMA_NEWLINE ;
- Text [ en-US ] = "New Line" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LSUBX ;
- HelpId = HID_SMA_LSUBX ;
- Text [ en-US ] = "Subscript Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CSUBX ;
- HelpId = HID_SMA_CSUBX ;
- Text [ en-US ] = "Subscript Bottom";
- };
- ToolBoxItem
- {
- Identifier = RID_RSUBX ;
- HelpId = HID_SMA_RSUBX ;
- Text [ en-US ] = "Subscript Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_STACK ;
- HelpId = HID_SMA_STACK ;
- Text [ en-US ] = "Vertical Stack" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SBLANK ;
- HelpId = HID_SMA_SBLANK ;
- Text [ en-US ] = "Small Gap" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNLX ;
- HelpId = HID_SMA_ALIGNLX ;
- Text [ en-US ] = "Align Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNCX ;
- HelpId = HID_SMA_ALIGNCX ;
- Text [ en-US ] = "Align Center" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNRX ;
- HelpId = HID_SMA_ALIGNRX ;
- Text [ en-US ] = "Align Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MATRIX ;
- HelpId = HID_SMA_MATRIX ;
- Text [ en-US ] = "Matrix Stack" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BLANK ;
- HelpId = HID_SMA_BLANK ;
- Text [ en-US ] = "Gap" ;
- };
- };
- };
- ToolBox 9
- {
- // misc
- HelpId = HID_SMA_FORMAT_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 4 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_INFINITY ;
- HelpId = HID_SMA_INFINITY ;
- Text [ en-US ] = "infinite";
- };
- ToolBoxItem
- {
- Identifier = RID_PARTIAL ;
- HelpId = HID_SMA_PARTIAL ;
- Text [ en-US ] = "Partial";
- };
- ToolBoxItem
- {
- Identifier = RID_NABLA ;
- HelpId = HID_SMA_NABLA ;
- Text [ en-US ] = "Nabla";
- };
- ToolBoxItem
- {
- Identifier = RID_EXISTS ;
- HelpId = HID_SMA_EXISTS ;
- Text [ en-US ] = "There Exists";
- };
- ToolBoxItem
- {
- Identifier = RID_FORALL ;
- HelpId = HID_SMA_FORALL ;
- Text [ en-US ] = "For All";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_HBAR ;
- HelpId = HID_SMA_HBAR ;
- Text [ en-US ] = "h Bar";
- };
- ToolBoxItem
- {
- Identifier = RID_LAMBDABAR ;
- HelpId = HID_SMA_LAMBDABAR ;
- Text [ en-US ] = "Lambda Bar";
- };
- ToolBoxItem
- {
- Identifier = RID_RE ;
- HelpId = HID_SMA_RE ;
- Text [ en-US ] = "Real Part";
- };
- ToolBoxItem
- {
- Identifier = RID_IM ;
- HelpId = HID_SMA_IM ;
- Text [ en-US ] = "Imaginary Part";
- };
- ToolBoxItem
- {
- Identifier = RID_WP ;
- HelpId = HID_SMA_WP ;
- Text [ en-US ] = "Weierstrass p";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LEFTARROW ;
- HelpId = HID_SMA_LEFTARROW ;
- Text [ en-US ] = "Left Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_RIGHTARROW ;
- HelpId = HID_SMA_RIGHTARROW ;
- Text [ en-US ] = "Right Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_UPARROW ;
- HelpId = HID_SMA_UPARROW ;
- Text [ en-US ] = "Up Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_DOWNARROW ;
- HelpId = HID_SMA_DOWNARROW ;
- Text [ en-US ] = "Down Arrow";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSLOW ;
- HelpId = HID_SMA_DOTSLOW ;
- Text [ en-US ] = "Dots At Bottom";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSAXIS ;
- HelpId = HID_SMA_DOTSAXIS ;
- Text [ en-US ] = "Dots In Middle";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSVERT ;
- HelpId = HID_SMA_DOTSVERT ;
- Text [ en-US ] = "Dots Vertically";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSUP ;
- HelpId = HID_SMA_DOTSUP ;
- Text [ en-US ] = "Dots To Top";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSDOWN ;
- HelpId = HID_SMA_DOTSDOWN ;
- Text [ en-US ] = "Dots to Bottom";
- };
- };
- };
- ToolBox 10
- {
- // main menu of selection-window
- HelpId = HID_SMA_SELECTION_TBX ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( 65 , 38 ) ;
- SVLook = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_UNBINOPS_CAT ;
- HelpId = HID_SMA_UNBINOPS_CAT ;
- Text [ en-US ] = "Unary/Binary Operators" ;
- };
- ToolBoxItem
- {
- Identifier = RID_RELATIONS_CAT ;
- HelpId = HID_SMA_RELATIONS_CAT ;
- Text [ en-US ] = "Relations" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SETOPERATIONS_CAT ;
- HelpId = HID_SMA_SETOPERATIONS_CAT ;
- Text [ en-US ] = "Set Operations" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FUNCTIONS_CAT ;
- HelpId = HID_SMA_FUNCTIONS_CAT ;
- Text [ en-US ] = "Functions" ;
- };
- ToolBoxItem
- {
- Identifier = RID_OPERATORS_CAT ;
- HelpId = HID_SMA_OPERATORS_CAT ;
- Text [ en-US ] = "Operators" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ATTRIBUTES_CAT ;
- HelpId = HID_SMA_ATTRIBUTES_CAT ;
- Text [ en-US ] = "Attributes" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MISC_CAT ;
- HelpId = HID_SMA_MISC_CAT ;
- Text [ en-US ] = "Others";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_BRACKETS_CAT ;
- HelpId = HID_SMA_BRACKETS_CAT ;
- Text [ en-US ] = "Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FORMAT_CAT ;
- HelpId = HID_SMA_FORMAT_CAT ;
- Text [ en-US ] = "Formats" ;
- };
- };
- };
- FixedLine FL_TOOLBOX_CAT_DELIM
- {
- Pos = MAP_APPFONT ( 0 , 44 ) ;
- Size = MAP_APPFONT ( 65 , 4 ) ;
- };
-};
-
#define CMDBOXWINDOW_TEXT \
Text [ en-US ] = "Commands" ; \
@@ -2870,318 +1521,6 @@ DockingWindow RID_CMDBOXWINDOW\
};
-#define UNBINOPS_IDLIST \
- IdList = \
- { \
- RID_PLUSX ; \
- RID_MINUSX ; \
- RID_PLUSMINUSX ; \
- RID_MINUSPLUSX ; \
- RID_XPLUSY ; \
- RID_XCDOTY ; \
- RID_XTIMESY ; \
- RID_XSYMTIMESY ; \
- RID_XMINUSY ; \
- RID_XOVERY ; \
- RID_XDIVY ; \
- RID_XSYMDIVIDEY ; \
- RID_NEGX ; \
- RID_XANDY ; \
- RID_XORY ; \
- RID_XCIRCY ; \
- }; \
- IdCount = { 16 ; };
-
- ImageList RID_IL_UNBINOPS
- {
- Prefix = "un";
- MaskColor = IMAGE_STDBTN_COLOR ;
- UNBINOPS_IDLIST
- };
-
-#define RELATIONS_IDLIST \
- IdList = \
- { \
- RID_XEQY ; \
- RID_XNEQY ; \
- RID_XEQUIVY ; \
- RID_XORTHOY ; \
- RID_XLTY ; \
- RID_XGTY ; \
- RID_XAPPROXY ; \
- RID_XPARALLELY ; \
- RID_XLESLANTY ; \
- RID_XGESLANTY ; \
- RID_XSIMEQY ; \
- RID_XPROPY ; \
- RID_XLEY ; \
- RID_XGEY ; \
- RID_XSIMY ; \
- RID_XTOWARDY ; \
- RID_XDIVIDESY ; \
- RID_XNDIVIDESY; \
- RID_DLARROW ; \
- RID_DLRARROW ; \
- RID_DRARROW ; \
- }; \
- IdCount ={ 21 ; };
-
- ImageList RID_IL_RELATIONS
- {
- Prefix = "bi";
- MaskColor = IMAGE_STDBTN_COLOR ;
- RELATIONS_IDLIST
- };
-
-#define SETOPERATIONS_IDLIST \
- IdList = \
- { \
- RID_XINY ; \
- RID_XNOTINY ; \
- RID_XOWNSY ; \
- RID_XINTERSECTIONY ; \
- RID_XUNIONY ; \
- RID_XSETMINUSY ; \
- RID_XSLASHY ; \
- RID_XSUBSETY ; \
- RID_XSUBSETEQY ; \
- RID_XSUPSETY ; \
- RID_XSUPSETEQY ; \
- RID_XNSUBSETY ; \
- RID_XNSUBSETEQY ; \
- RID_XNSUPSETY ; \
- RID_XNSUPSETEQY ; \
- RID_EMPTYSET ; \
- RID_ALEPH ; \
- RID_SETN ; \
- RID_SETZ ; \
- RID_SETQ ; \
- RID_SETR ; \
- RID_SETC ; \
- }; \
- IdCount = { 22 ; };
-
- ImageList RID_IL_SETOPERATIONS
- {
- Prefix = "op";
- MaskColor = IMAGE_STDBTN_COLOR ;
- SETOPERATIONS_IDLIST
- };
-
-#define FUNCTIONS_IDLIST \
- IdList = \
- { \
- RID_ABSX ; \
- RID_FACTX ; \
- RID_SQRTX ; \
- RID_NROOTXY ; \
- RID_EX ; \
- RID_LNX ; \
- RID_EXPX ; \
- RID_LOGX ; \
- RID_SINX ; \
- RID_COSX ; \
- RID_TANX ; \
- RID_COTX ; \
- RID_SINHX ; \
- RID_COSHX ; \
- RID_TANHX ; \
- RID_COTHX ; \
- RID_ARCSINX ; \
- RID_ARCCOSX ; \
- RID_ARCTANX ; \
- RID_ARCCOTX ; \
- RID_ARSINHX ; \
- RID_ARCOSHX ; \
- RID_ARTANHX ; \
- RID_ARCOTHX ; \
- RID_RSUPX ; \
- }; \
- IdCount = { 25 ; };
-
- ImageList RID_IL_FUNCTIONS
- {
- Prefix = "fu";
- MaskColor = IMAGE_STDBTN_COLOR ;
- FUNCTIONS_IDLIST
- };
-
-#define OPERATORS_IDLIST \
- IdList = \
- { \
- RID_LIMX ; \
- RID_SUMX ; \
- RID_PRODX ; \
- RID_COPRODX ; \
- RID_INTX ; \
- RID_IINTX ; \
- RID_IIINTX ; \
- RID_LINTX ; \
- RID_LLINTX ; \
- RID_LLLINTX ; \
- RID_FROMXTOY ; \
- RID_FROMX ; \
- RID_TOX ; \
- }; \
- IdCount = { 13 ; };
-
- ImageList RID_IL_OPERATORS
- {
- Prefix = "fo";
- MaskColor = IMAGE_STDBTN_COLOR ;
- OPERATORS_IDLIST
- };
-
-#define ATTRIBUTES_IDLIST \
- IdList = \
- { \
- RID_ACUTEX ; \
- RID_GRAVEX ; \
- RID_CHECKX ; \
- RID_BREVEX ; \
- RID_BARX ; \
- RID_VECX ; \
- RID_HATX ; \
- RID_TILDEX ; \
- RID_CIRCLEX ; \
- RID_DOTX ; \
- RID_DDOTX ; \
- RID_DDDOTX ; \
- RID_OVERLINEX ; \
- RID_UNDERLINEX ; \
- RID_OVERSTRIKEX ; \
- RID_PHANTOMX ; \
- RID_BOLDX ; \
- RID_ITALX ; \
- RID_SIZEXY ; \
- RID_FONTXY ; \
- RID_WIDEHATX ; \
- RID_WIDETILDEX ; \
- RID_WIDEVECX ; \
- }; \
- IdCount = { 23 ; };
-
- ImageList RID_IL_ATTRIBUTES
- {
- Prefix = "at";
- MaskColor = IMAGE_STDBTN_COLOR ;
- ATTRIBUTES_IDLIST
- };
-
-#define BRACKETS_IDLIST \
- IdList = \
- { \
- RID_LRPARENTX ; \
- RID_LRBRACKETX ; \
- RID_LRANGLEX ; \
- RID_LRBRACEX ; \
- RID_LRLINEX ; \
- RID_LRDLINEX ; \
- RID_LMRANGLEXY ; \
- RID_LRGROUPX ; \
- RID_SLRPARENTX ; \
- RID_SLRBRACKETX ; \
- RID_SLRANGLEX ; \
- RID_SLRBRACEX ; \
- RID_SLRLINEX ; \
- RID_SLRDLINEX ; \
- RID_SLMRANGLEXY ; \
- RID_LRDBRACKETX ; \
- RID_SLRDBRACKETX ; \
- RID_XOVERBRACEY ; \
- RID_XUNDERBRACEY ; \
- }; \
- IdCount = { 19 ; };
-
- ImageList RID_IL_BRACKETS
- {
- Prefix = "al";
- MaskColor = IMAGE_STDBTN_COLOR ;
- BRACKETS_IDLIST
- };
-
-#define FORMAT_IDLIST \
- IdList = \
- { \
- RID_NEWLINE ; \
- RID_SBLANK ; \
- RID_BLANK ; \
- RID_BINOMXY ; \
- RID_STACK ; \
- RID_MATRIX ; \
- RID_ALIGNLX ; \
- RID_ALIGNCX ; \
- RID_ALIGNRX ; \
- RID_RSUBX ; \
- RID_RSUPX ; \
- RID_LSUBX ; \
- RID_LSUPX ; \
- RID_CSUBX ; \
- RID_CSUPX ; \
- }; \
- IdCount = { 15 ; };
-
- ImageList RID_IL_FORMAT
- {
- Prefix = "co";
- MaskColor = IMAGE_STDBTN_COLOR ;
- FORMAT_IDLIST
- };
-
-#define MISC_IDLIST \
- IdList = \
- { \
- RID_INFINITY ; \
- RID_PARTIAL ; \
- RID_NABLA ; \
- RID_EXISTS ; \
- RID_FORALL ; \
- RID_HBAR; \
- RID_LAMBDABAR ; \
- RID_RE ; \
- RID_IM ; \
- RID_WP ; \
- RID_LEFTARROW ; \
- RID_RIGHTARROW ; \
- RID_UPARROW ; \
- RID_DOWNARROW ; \
- RID_DOTSLOW ; \
- RID_DOTSAXIS ; \
- RID_DOTSVERT ; \
- RID_DOTSUP ; \
- RID_DOTSDOWN ; \
- }; \
- IdCount = { 19 ; };
-
- ImageList RID_IL_MISC
- {
- Prefix = "mi";
- MaskColor = IMAGE_STDBTN_COLOR ;
- MISC_IDLIST
- };
-
-#define CATALOG_IDLIST \
- IdList = \
- { \
- RID_UNBINOPS_CAT ; \
- RID_RELATIONS_CAT ; \
- RID_SETOPERATIONS_CAT ; \
- RID_FUNCTIONS_CAT ; \
- RID_OPERATORS_CAT ; \
- RID_ATTRIBUTES_CAT ; \
- RID_MISC_CAT ; \
- RID_BRACKETS_CAT ; \
- RID_FORMAT_CAT ; \
- }; \
- IdCount = { 9 ; };
-
- ImageList RID_IL_CATALOG
- {
- Prefix = "im";
- MaskColor = IMAGE_STDBTN_COLOR ;
- CATALOG_IDLIST
- };
-
String STR_CMDBOXWINDOW
{
CMDBOXWINDOW_TEXT
@@ -3308,76 +1647,6 @@ String RID_ERR_RIGHTEXPECTED
Text [ en-US ] = "'RIGHT' expected" ;
};
-#include "menu.src"
-
-ToolBox RID_MATH_TOOLBOX
-{
- HelpId = RID_MATH_TOOLBOX ;
- Customize = TRUE ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Align = BOXALIGN_LEFT ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_ZOOMIN ;
- HelpID = SID_ZOOMIN ;
- Text [ en-US ] = "Zoom In" ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOMOUT ;
- HelpID = SID_ZOOMOUT ;
- Text [ en-US ] = "Zoom Out" ;
- };
- ToolBoxItem
- {
- Identifier = SID_VIEW100 ;
- HelpID = SID_VIEW100 ;
- Text [ en-US ] = "Zoom 100%" ;
- };
- ToolBoxItem
- {
- Identifier = SID_ADJUST ;
- HelpID = SID_ADJUST ;
- Text [ en-US ] = "Entire Formula" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW ;
- HelpID = SID_DRAW ;
- Text [ en-US ] = "Refresh" ;
- };
- ToolBoxItem
- {
- Identifier = SID_FORMULACURSOR ;
- HelpID = SID_FORMULACURSOR ;
- Text [ en-US ] = "Formula Cursor";
- };
- ToolBoxItem
- {
- Identifier = SID_SYMBOLS_CATALOGUE ;
- HelpID = SID_SYMBOLS_CATALOGUE ;
- Text [ en-US ] = "Symbols" ;
- };
- };
-};
-
String RID_MATH_TOOLBOX
{
Text [ en-US ] = "Main Toolbar" ;
@@ -3390,21 +1659,12 @@ StringArray RID_PRINTUIOPTIONS
< "%PRODUCTNAME %s"; >;
< "Contents"; >;
< "~Title"; >;
- < "Specifies whether you want the name of the document to be included in the printout"; >;
< "~Formula text"; >;
- < "Specifies whether to include the contents of the 'Commands' window at the bottom of the printout."; >;
< "B~orders"; >;
- < "Applies a thin border to the formula area in the printout."; >;
< "Size"; >;
< "O~riginal size"; >;
- < "Prints the formula without adjusting the current font size."; >;
< "Fit to ~page"; >;
- < "Adjusts the formula to the page format used in the printout."; >;
< "~Scaling"; >;
- < "Reduces or enlarges the size of the printed formula by a specified enlargement factor."; >;
- < "Miscellaneous options"; >;
- < "Ig~nore ~~ and ` at the end of the line"; >;
- < "Specfies that these space wildcards will be removed if they are at the end of a line."; >;
};
};
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index cd3147b066..7775ee695d 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -78,7 +78,7 @@ SmSym::SmSym(const SmSym& rSymbol)
}
-SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
+SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
const String& rSet, bool bIsPredefined)
{
m_aName = m_aExportName = rName;
@@ -207,15 +207,20 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
}
else if (pFound && !bForceChange && bSymbolConflict)
{
- // TODO: but what ...
+ // TODO: to solve this a document owned symbol manager would be required ...
OSL_ENSURE( 0, "symbol conflict, different symbol with same name found!" );
+ // symbols in all formulas. A copy of the global one would be needed here
+ // and then the new symbol has to be forcefully applied. This would keep
+ // the current formula intact but will leave the set of symbols in the
+ // global symbol manager somewhat to chance.
}
+
+ OSL_ENSURE( bAdded, "failed to add symbol" );
+ if (bAdded)
+ m_bModified = true;
+ DBG_ASSERT( bAdded || (pFound && !bSymbolConflict), "AddOrReplaceSymbol: unresolved symbol conflict" );
}
- OSL_ENSURE( bAdded, "failed to add symbol" );
- if (bAdded)
- m_bModified = true;
-
return bAdded;
}
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index a4159c6089..3ee46f14ae 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -46,9 +46,9 @@
////////////////////////////////////////////////////////////
-static USHORT GetImageListRID( USHORT nCategoryRID )
+static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nCategoryRID)
{
case RID_UNBINOPS_CAT : nRes = RID_IL_UNBINOPS; break;
@@ -67,7 +67,7 @@ static USHORT GetImageListRID( USHORT nCategoryRID )
}
-static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
+static sal_Int16 GetToolBoxCategoriesIndex( sal_uInt16 nCategoryRID )
{
sal_Int16 nIdx = -1;
switch (nCategoryRID)
@@ -88,9 +88,9 @@ static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
}
-static USHORT GetCategoryRID( USHORT nResId )
+static sal_uInt16 GetCategoryRID( sal_uInt16 nResId )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nResId)
{
case RID_IL_UNBINOPS : nRes = RID_UNBINOPS_CAT; break;
@@ -121,7 +121,7 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
SfxChildWindow *pChildWindow,
Window *pParent) :
SfxFloatingWindow(pTmpBindings, pChildWindow, pParent, SmResId(RID_TOOLBOXWINDOW)),
- aToolBoxCat(this, SmResId(NUM_TBX_CATEGORIES + 1)),
+ aToolBoxCat(this, SmResId(TOOLBOX_CATALOG)),
aToolBoxCat_Delim(this, SmResId( FL_TOOLBOX_CAT_DELIM ))
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmToolBoxWindow::SmToolBoxWindow" );
@@ -129,14 +129,14 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
// allow for cursor travelling between toolbox and sub-categories
SetStyle( GetStyle() | WB_DIALOGCONTROL );
- nActiveCategoryRID = sal::static_int_cast< USHORT >(-1);
+ nActiveCategoryRID = USHRT_MAX;
aToolBoxCat.SetClickHdl(LINK(this, SmToolBoxWindow, CategoryClickHdl));
- USHORT i;
- for (i = 0; i < NUM_TBX_CATEGORIES; i++)
+ sal_uInt16 i;
+ for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
- ToolBox *pBox = new ToolBox(this, SmResId (i+1));
+ ToolBox *pBox = new ToolBox(this, SmResId( TOOLBOX_CAT_A + i ));
vToolBoxCategories[i] = pBox;
pBox->SetSelectHdl(LINK(this, SmToolBoxWindow, CmdSelectHdl));
}
@@ -146,15 +146,12 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
aImageLists [i] = 0;
FreeResource();
-
- ApplyImageLists( RID_UNBINOPS_CAT );
- SetCategory( RID_UNBINOPS_CAT );
}
SmToolBoxWindow::~SmToolBoxWindow()
{
int i;
- for (i = 0; i < NUM_TBX_CATEGORIES; i++)
+ for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
ToolBox *pBox = vToolBoxCategories[i];
delete pBox;
@@ -171,7 +168,7 @@ SmViewShell * SmToolBoxWindow::GetView()
}
-const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
+const ImageList * SmToolBoxWindow::GetImageList( sal_uInt16 nResId )
{
// creates the image list via its resource id and stores that
// list for later use in the respective array.
@@ -179,7 +176,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
const ImageList *pIL = 0;
// get index to use
- USHORT nCategoryRID = GetCategoryRID( nResId );
+ sal_uInt16 nCategoryRID = GetCategoryRID( nResId );
sal_Int16 nIndex = GetToolBoxCategoriesIndex( nCategoryRID );
if (nIndex == -1 && (nResId == RID_IL_CATALOG))
nIndex = NUM_TBX_CATEGORIES;
@@ -197,7 +194,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
}
-void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
+void SmToolBoxWindow::ApplyImageLists( sal_uInt16 nCategoryRID )
{
// set image list for toolbox 'catalog'
const ImageList *pImageList = GetImageList( RID_IL_CATALOG );
@@ -207,7 +204,7 @@ void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
// set image list for active (visible) category of 'catalog'
sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
- USHORT nResId = GetImageListRID( nCategoryRID );
+ sal_uInt16 nResId = GetImageListRID( nCategoryRID );
pImageList = GetImageList( nResId );
OSL_ENSURE( pImageList && nIdx >= 0, "image list or index missing" );
if (pImageList && nIdx >= 0)
@@ -227,11 +224,11 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
static bool bSetPosition = true;
if (STATE_CHANGE_INITSHOW == nStateChange)
{
+ SetCategory( nActiveCategoryRID == USHRT_MAX ? RID_UNBINOPS_CAT : nActiveCategoryRID );
+
// calculate initial position to be used after creation of the window...
AdjustPosSize( bSetPosition );
bSetPosition = false;
-
- SetCategory(RID_UNBINOPS_CAT);
}
//... otherwise the base class will remember the last position of the window
SfxFloatingWindow::StateChanged( nStateChange );
@@ -241,7 +238,7 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
{
Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
- Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 5 ) );
+ Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 4 /* see nLines in SetCategory*/ ) );
OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
// catalog settings
@@ -249,14 +246,12 @@ void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
aToolBoxCat.SetSizePixel( aCatSize );
// settings for catalog / category delimiter
Point aP( aToolBoxCat_Delim.GetPosPixel() );
- aP.X() += 5;
+ aP.X() = 0;
aToolBoxCat_Delim.SetPosPixel( aP );
- Size aS( aCatSize.Width() - 10, 10 );
- aToolBoxCat_Delim.SetSizePixel( aS );
+ aToolBoxCat_Delim.SetSizePixel( Size( aCatSize.Width(), aToolBoxCat_Delim.GetSizePixel().Height() ) );
// category settings
- aP.X() = 0;
aP.Y() += aToolBoxCat_Delim.GetSizePixel().Height();
- for (int i = 0; i < NUM_TBX_CATEGORIES; i++)
+ for (int i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
vToolBoxCategories[i]->SetPosPixel( aP );
vToolBoxCategories[i]->SetSizePixel( aCmdSize );
@@ -285,7 +280,7 @@ void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
}
-BOOL SmToolBoxWindow::Close()
+sal_Bool SmToolBoxWindow::Close()
{
SmViewShell *pViewSh = GetView();
if (pViewSh)
@@ -302,66 +297,63 @@ void SmToolBoxWindow::GetFocus()
aToolBoxCat.GrabFocus();
}
-void SmToolBoxWindow::SetCategory(USHORT nCategoryRID)
+void SmToolBoxWindow::SetCategory(sal_uInt16 nCategoryRID)
{
if (nCategoryRID != nActiveCategoryRID)
- {
ApplyImageLists( nCategoryRID );
- USHORT nLines;
- // check for valid resource id
- switch (nCategoryRID)
- {
- case RID_UNBINOPS_CAT : nLines = 4; break;
- case RID_RELATIONS_CAT: nLines = 5; break;
- case RID_SETOPERATIONS_CAT: nLines = 5; break;
- case RID_FUNCTIONS_CAT: nLines = 5; break;
- case RID_OPERATORS_CAT: nLines = 3; break;
- case RID_ATTRIBUTES_CAT: nLines = 5; break;
- case RID_MISC_CAT: nLines = 4; break;
- case RID_BRACKETS_CAT: nLines = 5; break;
- case RID_FORMAT_CAT: nLines = 3; break;
- default:
- // nothing to be done
- return;
- }
+ sal_uInt16 nLines;
+ // check for valid resource id
+ switch (nCategoryRID)
+ {
+ case RID_UNBINOPS_CAT : nLines = 4; break;
+ case RID_RELATIONS_CAT: nLines = 4; break;
+ case RID_SETOPERATIONS_CAT: nLines = 4; break;
+ case RID_FUNCTIONS_CAT: nLines = 4; break;
+ case RID_OPERATORS_CAT: nLines = 3; break;
+ case RID_ATTRIBUTES_CAT: nLines = 4; break;
+ case RID_MISC_CAT: nLines = 4; break;
+ case RID_BRACKETS_CAT: nLines = 4; break;
+ case RID_FORMAT_CAT: nLines = 3; break;
+ default:
+ // nothing to be done
+ return;
+ }
- pToolBoxCmd->Hide();
+ pToolBoxCmd->Hide();
- sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
+ sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
OSL_ENSURE( nIdx >= 0, "unkown category" );
- if (nIdx >= 0)
- pToolBoxCmd = vToolBoxCategories[nIdx];
+ if (nIdx >= 0)
+ pToolBoxCmd = vToolBoxCategories[nIdx];
- // calculate actual size of window to use
- Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
- Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) );
+ // calculate actual size of window to use
+ Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
+ Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) );
OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
- // main window settings
- Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3);
- SetOutputSizePixel( aWndSize );
+ // main window settings
+ Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3);
+ SetOutputSizePixel( aWndSize );
- if (nActiveCategoryRID)
+ if (nActiveCategoryRID)
aToolBoxCat.CheckItem(nActiveCategoryRID, false);
- nActiveCategoryRID = nCategoryRID;
+ nActiveCategoryRID = nCategoryRID;
aToolBoxCat.CheckItem(nActiveCategoryRID, true);
- pToolBoxCmd->Show();
- }
+ pToolBoxCmd->Show();
}
-IMPL_LINK_INLINE_START( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
+IMPL_LINK( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
{
int nItemId = pToolBox->GetCurItemId();
if (nItemId != 0)
- SetCategory( sal::static_int_cast< USHORT >(nItemId) );
+ SetCategory( sal::static_int_cast< sal_uInt16 >(nItemId) );
return 0;
}
-IMPL_LINK_INLINE_END( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
-IMPL_LINK_INLINE_START( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
+IMPL_LINK( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
{
SmViewShell *pViewSh = GetView();
if (pViewSh)
@@ -370,7 +362,6 @@ IMPL_LINK_INLINE_START( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
new SfxInt16Item(SID_INSERTCOMMAND, pToolBox->GetCurItemId()), 0L);
return 0;
}
-IMPL_LINK_INLINE_END( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
/**************************************************************************/
@@ -378,7 +369,7 @@ IMPL_LINK_INLINE_END( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
SFX_IMPL_FLOATINGWINDOW(SmToolBoxWrapper, SID_TOOLBOXWINDOW);
SmToolBoxWrapper::SmToolBoxWrapper(Window *pParentWindow,
- USHORT nId, SfxBindings* pBindings,
+ sal_uInt16 nId, SfxBindings* pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
{
diff --git a/starmath/source/toolbox.hrc b/starmath/source/toolbox.hrc
index 9b15d99e20..c4fc6f3bce 100644..100755
--- a/starmath/source/toolbox.hrc
+++ b/starmath/source/toolbox.hrc
@@ -28,7 +28,19 @@
#ifndef _TOOLBOX_HRC_
#define _TOOLBOX_HRC_
-#define FL_TOOLBOX_CAT_DELIM 21
+#define FL_TOOLBOX_CAT_DELIM 1
+#define TOOLBOX_CATALOG 10
+#define TOOLBOX_CAT_A 11
+#define TOOLBOX_CAT_B 12
+#define TOOLBOX_CAT_C 13
+#define TOOLBOX_CAT_D 14
+#define TOOLBOX_CAT_E 15
+#define TOOLBOX_CAT_F 16
+#define TOOLBOX_CAT_G 17
+#define TOOLBOX_CAT_H 18
+#define TOOLBOX_CAT_I 19
+
+#define NUM_TBX_CATEGORIES (TOOLBOX_CAT_I - TOOLBOX_CAT_A + 1)
#endif
diff --git a/starmath/source/toolbox.src b/starmath/source/toolbox.src
new file mode 100755
index 0000000000..e4dc7c12bd
--- /dev/null
+++ b/starmath/source/toolbox.src
@@ -0,0 +1,1777 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <sfx2/sfx.hrc>
+#include <svx/globlmn.hrc>
+#include "starmath.hrc"
+#include "toolbox.hrc"
+
+#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
+#define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR
+
+
+FloatingWindow RID_TOOLBOXWINDOW
+{
+ HelpId = HID_SMA_OPERATOR_WIN ;
+ Border = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 0 , 0 ) ; // to be calculated programmatically
+ Text [ en-US ] = "Elements" ;
+
+ ToolBox TOOLBOX_CATALOG
+ {
+ // main menu of selection-window
+ HelpId = HID_SMA_SELECTION_TBX ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 65 , 38 ) ;
+ SVLook = TRUE ;
+ LineCount = 2 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_UNBINOPS_CAT ;
+ HelpId = HID_SMA_UNBINOPS_CAT ;
+ Text [ en-US ] = "Unary/Binary Operators" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RELATIONS_CAT ;
+ HelpId = HID_SMA_RELATIONS_CAT ;
+ Text [ en-US ] = "Relations" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETOPERATIONS_CAT ;
+ HelpId = HID_SMA_SETOPERATIONS_CAT ;
+ Text [ en-US ] = "Set Operations" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FUNCTIONS_CAT ;
+ HelpId = HID_SMA_FUNCTIONS_CAT ;
+ Text [ en-US ] = "Functions" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OPERATORS_CAT ;
+ HelpId = HID_SMA_OPERATORS_CAT ;
+ Text [ en-US ] = "Operators" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ATTRIBUTES_CAT ;
+ HelpId = HID_SMA_ATTRIBUTES_CAT ;
+ Text [ en-US ] = "Attributes" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MISC_CAT ;
+ HelpId = HID_SMA_MISC_CAT ;
+ Text [ en-US ] = "Others";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BRACKETS_CAT ;
+ HelpId = HID_SMA_BRACKETS_CAT ;
+ Text [ en-US ] = "Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FORMAT_CAT ;
+ HelpId = HID_SMA_FORMAT_CAT ;
+ Text [ en-US ] = "Formats" ;
+ };
+ };
+ };
+
+ FixedLine FL_TOOLBOX_CAT_DELIM
+ {
+ Pos = MAP_APPFONT ( 0 , 44 ) ;
+ Size = MAP_APPFONT ( 65 , 8 ) ;
+ };
+
+ ToolBox TOOLBOX_CAT_A
+ {
+ // unary/binary operators
+ HelpId = HID_SMA_UNBINOPS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 4 ;
+
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_PLUSX ;
+ HelpId = HID_SMA_PLUSX ;
+ Text [ en-US ] = "+ Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MINUSX ;
+ HelpId = HID_SMA_MINUSX ;
+ Text [ en-US ] = "- Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PLUSMINUSX ;
+ HelpId = HID_SMA_PLUSMINUSX ;
+ Text [ en-US ] = "+- Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MINUSPLUSX ;
+ HelpId = HID_SMA_MINUSPLUSX ;
+ Text [ en-US ] = "-+ Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NEGX ;
+ HelpId = HID_SMA_NEGX ;
+ Text [ en-US ] = "Boolean NOT" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPLUSY ;
+ HelpId = HID_SMA_XPLUSY ;
+ Text [ en-US ] = "Addition +" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XCDOTY ;
+ HelpId = HID_SMA_XCDOTY ;
+ Text [ en-US ] = "Multiplication (Dot )" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XTIMESY ;
+ HelpId = HID_SMA_XTIMESY ;
+ Text [ en-US ] = "Multiplication (x)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSYMTIMESY ;
+ HelpId = HID_SMA_XSYMTIMESY ;
+ Text [ en-US ] = "Multiplication (*)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XANDY ;
+ HelpId = HID_SMA_XANDY ;
+ Text [ en-US ] = "Boolean AND" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XMINUSY ;
+ HelpId = HID_SMA_XMINUSY ;
+ Text [ en-US ] = "Subtraction -" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOVERY ;
+ HelpId = HID_SMA_XOVERY ;
+ Text [ en-US ] = "Division (Fraction)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XDIVY ;
+ HelpId = HID_SMA_XDIVY ;
+ Text [ en-US ] = "Division (÷)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSYMDIVIDEY ;
+ HelpId = HID_SMA_XSYMDIVIDEY ;
+ Text [ en-US ] = "Division (Slash)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XORY ;
+ HelpId = HID_SMA_XORY ;
+ Text [ en-US ] = "Boolean OR" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XCIRCY ;
+ HelpId = HID_SMA_XCIRCY ;
+ Text [ en-US ] = "Concatenate";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_B
+ {
+ // relations
+ HelpId = HID_SMA_RELATIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_XEQY ;
+ HelpId = HID_SMA_XEQY ;
+ Text [ en-US ] = "Is Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNEQY ;
+ HelpId = HID_SMA_XNEQY ;
+ Text [ en-US ] = "Is Not Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XAPPROXY ;
+ HelpId = HID_SMA_XAPPROXY ;
+ Text [ en-US ] = "Is Approximately Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XDIVIDESY ;
+ HelpId = HID_SMA_XDIVIDESY ;
+ Text [ en-US ] = "Divides";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNDIVIDESY ;
+ HelpId = HID_SMA_XNDIVIDESY ;
+ Text [ en-US ] = "Does Not Divide";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLTY ;
+ HelpId = HID_SMA_XLTY ;
+ Text [ en-US ] = "Is Less Than" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGTY ;
+ HelpId = HID_SMA_XGTY ;
+ Text [ en-US ] = "Is Greater Than" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSIMEQY ;
+ HelpId = HID_SMA_XSIMEQY ;
+ /* ### ACHTUNG: Neuer Text in Resource? ist �hnlich oder gleich : ist �hnlich oder glech */
+ Text [ en-US ] = "Is Similar Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPARALLELY ;
+ HelpId = HID_SMA_XPARALLELY ;
+ Text [ en-US ] = "Is Parallel To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XORTHOY ;
+ HelpId = HID_SMA_XORTHOY ;
+ Text [ en-US ] = "Is Orthogonal To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLESLANTY ;
+ HelpId = HID_SMA_XLESLANTY ;
+ Text [ en-US ] = "Is Less Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGESLANTY ;
+ HelpId = HID_SMA_XGESLANTY ;
+ Text [ en-US ] = "Is Greater Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSIMY ;
+ HelpId = HID_SMA_XSIMY ;
+ Text [ en-US ] = "Is Similar To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XEQUIVY ;
+ HelpId = HID_SMA_XEQUIVY ;
+ Text [ en-US ] = "Is Congruent To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLEY ;
+ HelpId = HID_SMA_XLEY ;
+ Text [ en-US ] = "Is Less Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGEY ;
+ HelpId = HID_SMA_XGEY ;
+ Text [ en-US ] = "Is Greater Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPROPY ;
+ HelpId = HID_SMA_XPROPY ;
+ Text [ en-US ] = "Is Proportional To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XTOWARDY ;
+ HelpId = HID_SMA_XTOWARDY ;
+ Text [ en-US ] = "Toward" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DLARROW ;
+ HelpId = HID_SMA_DLARROW ;
+ Text [ en-US ] = "Double Arrow Left";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DLRARROW ;
+ HelpId = HID_SMA_DLRARROW ;
+ Text [ en-US ] = "Double Arrow Left And Right";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DRARROW ;
+ HelpId = HID_SMA_DRARROW ;
+ Text [ en-US ] = "Double Arrow Right";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_C
+ {
+ // set operations
+ HelpId = HID_SMA_SETOPERATIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_XINY ;
+ HelpId = HID_SMA_XINY ;
+ Text [ en-US ] = "Is In" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNOTINY ;
+ HelpId = HID_SMA_XNOTINY ;
+ Text [ en-US ] = "Is Not In" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOWNSY ;
+ HelpId = HID_SMA_XOWNSY ;
+ Text [ en-US ] = "Owns" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EMPTYSET ;
+ HelpId = HID_SMA_EMPTYSET ;
+ Text [ en-US ] = "Empty Set";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XINTERSECTIONY ;
+ HelpId = HID_SMA_XINTERSECTIONY ;
+ Text [ en-US ] = "Intersection" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XUNIONY ;
+ HelpId = HID_SMA_XUNIONY ;
+ Text [ en-US ] = "Union" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSETMINUSY ;
+ HelpId = HID_SMA_XSETMINUSY ;
+ Text [ en-US ] = "Difference" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSLASHY ;
+ HelpId = HID_SMA_XSLASHY ;
+ Text [ en-US ] = "Quotient Set" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALEPH ;
+ HelpId = HID_SMA_ALEPH ;
+ Text [ en-US ] = "Aleph";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUBSETY ;
+ HelpId = HID_SMA_XSUBSETY ;
+ Text [ en-US ] = "Subset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUBSETEQY ;
+ HelpId = HID_SMA_XSUBSETEQY ;
+ Text [ en-US ] = "Subset Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUPSETY ;
+ HelpId = HID_SMA_XSUPSETY ;
+ Text [ en-US ] = "Superset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUPSETEQY ;
+ HelpId = HID_SMA_XSUPSETEQY ;
+ Text [ en-US ] = "Superset Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUBSETY ;
+ HelpId = HID_SMA_XNSUBSETY ;
+ Text [ en-US ] = "Not Subset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUBSETEQY ;
+ HelpId = HID_SMA_XNSUBSETEQY ;
+ Text [ en-US ] = "Not Subset Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUPSETY ;
+ HelpId = HID_SMA_XNSUPSETY ;
+ Text [ en-US ] = "Not Superset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUPSETEQY ;
+ HelpId = HID_SMA_XNSUPSETEQY ;
+ Text [ en-US ] = "Not Superset Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETN ;
+ HelpId = HID_SMA_SETN ;
+ Text [ en-US ] = "Natural Numbers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETZ ;
+ HelpId = HID_SMA_SETZ ;
+ Text [ en-US ] = "Integers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETQ ;
+ HelpId = HID_SMA_SETQ ;
+ Text [ en-US ] = "Set of Rational Numbers";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETR ;
+ HelpId = HID_SMA_SETR ;
+ Text [ en-US ] = "Real Numbers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETC ;
+ HelpId = HID_SMA_SETC ;
+ Text [ en-US ] = "Complex Numbers Set";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_D
+ {
+ // functions
+ HelpId = HID_SMA_FUNCTIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_EX ;
+ HelpId = HID_SMA_EX ;
+ Text [ en-US ] = "Exponential Function" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LNX ;
+ HelpId = HID_SMA_LNX ;
+ Text [ en-US ] = "Natural Logarithm" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EXPX ;
+ HelpId = HID_SMA_EXPX ;
+ Text [ en-US ] = "Exponential Function" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LOGX ;
+ HelpId = HID_SMA_LOGX ;
+ Text [ en-US ] = "Logarithm" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUPX ;
+ HelpId = HID_SMA_RSUPX ;
+ Text [ en-US ] = "Power";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SINX ;
+ HelpId = HID_SMA_SINX ;
+ Text [ en-US ] = "Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COSX ;
+ HelpId = HID_SMA_COSX ;
+ Text [ en-US ] = "Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TANX ;
+ HelpId = HID_SMA_TANX ;
+ Text [ en-US ] = "Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COTX ;
+ HelpId = HID_SMA_COTX ;
+ Text [ en-US ] = "Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SQRTX ;
+ HelpId = HID_SMA_SQRTX ;
+ Text [ en-US ] = "Square Root" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCSINX ;
+ HelpId = HID_SMA_ARCSINX ;
+ Text [ en-US ] = "Arcsine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCCOSX ;
+ HelpId = HID_SMA_ARCCOSX ;
+ Text [ en-US ] = "Arccosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCTANX ;
+ HelpId = HID_SMA_ARCTANX ;
+ Text [ en-US ] = "Arctangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCCOTX ;
+ HelpId = HID_SMA_ARCCOTX ;
+ Text [ en-US ] = "Arccotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NROOTXY ;
+ HelpId = HID_SMA_NROOTXY ;
+ Text [ en-US ] = "N-th Root" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SINHX ;
+ HelpId = HID_SMA_SINHX ;
+ Text [ en-US ] = "Hyperbolic Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COSHX ;
+ HelpId = HID_SMA_COSHX ;
+ Text [ en-US ] = "Hyperbolic Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TANHX ;
+ HelpId = HID_SMA_TANHX ;
+ Text [ en-US ] = "Hyperbolic Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COTHX ;
+ HelpId = HID_SMA_COTHX ;
+ Text [ en-US ] = "Hyperbolic Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ABSX ;
+ HelpId = HID_SMA_ABSX ;
+ Text [ en-US ] = "Absolute Value" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARSINHX ;
+ HelpId = HID_SMA_ARSINHX ;
+ Text [ en-US ] = "Area Hyperbolic Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCOSHX ;
+ HelpId = HID_SMA_ARCOSHX ;
+ Text [ en-US ] = "Area Hyperbolic Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARTANHX ;
+ HelpId = HID_SMA_ARTANHX ;
+ Text [ en-US ] = "Area Hyperbolic Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCOTHX ;
+ HelpId = HID_SMA_ARCOTHX ;
+ Text [ en-US ] = "Area Hyperbolic Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FACTX ;
+ HelpId = HID_SMA_FACTX ;
+ Text [ en-US ] = "Factorial" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_E
+ {
+ // operators
+ HelpId = HID_SMA_OPERATORS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 3 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LIMX ;
+ HelpId = HID_SMA_LIMX ;
+ Text [ en-US ] = "Limes" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SUMX ;
+ HelpId = HID_SMA_SUMX ;
+ Text [ en-US ] = "Sum" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PRODX ;
+ HelpId = HID_SMA_PRODX ;
+ Text [ en-US ] = "Product" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COPRODX ;
+ HelpId = HID_SMA_COPRODX ;
+ Text [ en-US ] = "Coproduct" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FROMXTOY ;
+ HelpId = HID_SMA_FROMXTOY ;
+ Text [ en-US ] = "Upper And Lower Limit" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_INTX ;
+ HelpId = HID_SMA_INTX ;
+ Text [ en-US ] = "Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IINTX ;
+ HelpId = HID_SMA_IINTX ;
+ Text [ en-US ] = "Double Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IIINTX ;
+ HelpId = HID_SMA_IIINTX ;
+ Text [ en-US ] = "Triple Integral" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FROMX ;
+ HelpId = HID_SMA_FROMX ;
+ Text [ en-US ] = "Lower Limit" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LINTX ;
+ HelpId = HID_SMA_LINTX ;
+ Text [ en-US ] = "Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LLINTX ;
+ HelpId = HID_SMA_LLINTX ;
+ Text [ en-US ] = "Double Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LLLINTX ;
+ HelpId = HID_SMA_LLLINTX ;
+ Text [ en-US ] = "Triple Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TOX ;
+ HelpId = HID_SMA_TOX ;
+ Text [ en-US ] = "Upper Limit" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_F
+ {
+ // attributs
+ HelpId = HID_SMA_ATTRIBUTES_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_ACUTEX ;
+ HelpId = HID_SMA_ACUTEX ;
+ Text [ en-US ] = "Acute Accent";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_GRAVEX ;
+ HelpId = HID_SMA_GRAVEX ;
+ Text [ en-US ] = "Grave Accent";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CHECKX ;
+ HelpId = HID_SMA_CHECKX ;
+ Text [ en-US ] = "Reverse Circumflex" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BREVEX ;
+ HelpId = HID_SMA_BREVEX ;
+ Text [ en-US ] = "Breve" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CIRCLEX ;
+ HelpId = HID_SMA_CIRCLEX ;
+ Text [ en-US ] = "Circle" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_VECX ;
+ HelpId = HID_SMA_VECX ;
+ Text [ en-US ] = "Vector Arrow" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TILDEX ;
+ HelpId = HID_SMA_TILDEX ;
+ Text [ en-US ] = "Tilde" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_HATX ;
+ HelpId = HID_SMA_HATX ;
+ Text [ en-US ] = "Circumflex" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BARX ;
+ HelpId = HID_SMA_BARX ;
+ Text [ en-US ] = "Line Above" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTX ;
+ HelpId = HID_SMA_DOTX ;
+ Text [ en-US ] = "Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDEVECX ;
+ HelpId = HID_SMA_WIDEVECX ;
+ Text [ en-US ] = "Large Vector Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDETILDEX ;
+ HelpId = HID_SMA_WIDETILDEX ;
+ Text [ en-US ] = "Large Tilde";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDEHATX ;
+ HelpId = HID_SMA_WIDEHATX ;
+ Text [ en-US ] = "Large Circumflex";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DDOTX ;
+ HelpId = HID_SMA_DDOTX ;
+ Text [ en-US ] = "Double Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OVERLINEX ;
+ HelpId = HID_SMA_OVERLINEX ;
+ Text [ en-US ] = "Line Over" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_UNDERLINEX ;
+ HelpId = HID_SMA_UNDERLINEX ;
+ Text [ en-US ] = "Line Below" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OVERSTRIKEX ;
+ HelpId = HID_SMA_OVERSTRIKEX ;
+ Text [ en-US ] = "Line Through" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DDDOTX ;
+ HelpId = HID_SMA_DDDOTX ;
+ Text [ en-US ] = "Triple Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PHANTOMX ;
+ HelpId = HID_SMA_PHANTOMX ;
+ Text [ en-US ] = "Transparent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BOLDX ;
+ HelpId = HID_SMA_BOLDX ;
+ Text [ en-US ] = "Bold Font" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ITALX ;
+ HelpId = HID_SMA_ITALX ;
+ Text [ en-US ] = "Italic Font" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SIZEXY ;
+ HelpId = HID_SMA_SIZEXY ;
+ Text [ en-US ] = "Resize" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FONTXY ;
+ HelpId = HID_SMA_FONTXY ;
+ Text [ en-US ] = "Change Font" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_G
+ {
+ // parentheses
+ HelpId = HID_SMA_BRACKETS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LRPARENTX ;
+ HelpId = HID_SMA_LRPARENTX ;
+ Text [ en-US ] = "Round Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRBRACKETX ;
+ HelpId = HID_SMA_LRBRACKETX ;
+ Text [ en-US ] = "Square Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRDBRACKETX ;
+ HelpId = HID_SMA_LRDBRACKETX ;
+ Text [ en-US ] = "Double Square Brackets";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRLINEX ;
+ HelpId = HID_SMA_LRLINEX ;
+ Text [ en-US ] = "Single Lines" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRDLINEX ;
+ HelpId = HID_SMA_LRDLINEX ;
+ Text [ en-US ] = "Double Lines" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRBRACEX ;
+ HelpId = HID_SMA_LRBRACEX ;
+ Text [ en-US ] = "Braces" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRANGLEX ;
+ HelpId = HID_SMA_LRANGLEX ;
+ Text [ en-US ] = "Angle Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LMRANGLEXY ;
+ HelpId = HID_SMA_LMRANGLEXY ;
+ Text [ en-US ] = "Operator Brackets";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRGROUPX ;
+ HelpId = HID_SMA_LRGROUPX ;
+ Text [ en-US ] = "Group Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRPARENTX ;
+ HelpId = HID_SMA_SLRPARENTX ;
+ Text [ en-US ] = "Round Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRBRACKETX ;
+ HelpId = HID_SMA_SLRBRACKETX ;
+ Text [ en-US ] = "Square Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRDBRACKETX ;
+ HelpId = HID_SMA_SLRDBRACKETX ;
+ Text [ en-US ] = "Double Square Brackets (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRLINEX ;
+ HelpId = HID_SMA_SLRLINEX ;
+ Text [ en-US ] = "Single Lines (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRDLINEX ;
+ HelpId = HID_SMA_SLRDLINEX ;
+ Text [ en-US ] = "Double Lines (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRBRACEX ;
+ HelpId = HID_SMA_SLRBRACEX ;
+ Text [ en-US ] = "Braces (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRANGLEX ;
+ HelpId = HID_SMA_SLRANGLEX ;
+ Text [ en-US ] = "Angle Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLMRANGLEXY ;
+ HelpId = HID_SMA_SLMRANGLEXY ;
+ Text [ en-US ] = "Operator Brackets (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOVERBRACEY ;
+ HelpId = HID_SMA_XOVERBRACEY ;
+ Text [ en-US ] = "Braces Top (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XUNDERBRACEY ;
+ HelpId = HID_SMA_XUNDERBRACEY ;
+ Text [ en-US ] = "Braces Bottom (Scalable)";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_H
+ {
+ // format
+ HelpId = HID_SMA_FORMAT_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 3 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LSUPX ;
+ HelpId = HID_SMA_LSUPX ;
+ Text [ en-US ] = "Superscript Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CSUPX ;
+ HelpId = HID_SMA_CSUPX ;
+ Text [ en-US ] = "Superscript Top";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUPX ;
+ HelpId = HID_SMA_RSUPX ;
+ Text [ en-US ] = "Superscript Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BINOMXY ;
+ HelpId = HID_SMA_BINOMXY ;
+ Text [ en-US ] = "Vertical Stack (2 Elements)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NEWLINE ;
+ HelpId = HID_SMA_NEWLINE ;
+ Text [ en-US ] = "New Line" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LSUBX ;
+ HelpId = HID_SMA_LSUBX ;
+ Text [ en-US ] = "Subscript Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CSUBX ;
+ HelpId = HID_SMA_CSUBX ;
+ Text [ en-US ] = "Subscript Bottom";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUBX ;
+ HelpId = HID_SMA_RSUBX ;
+ Text [ en-US ] = "Subscript Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_STACK ;
+ HelpId = HID_SMA_STACK ;
+ Text [ en-US ] = "Vertical Stack" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SBLANK ;
+ HelpId = HID_SMA_SBLANK ;
+ Text [ en-US ] = "Small Gap" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNLX ;
+ HelpId = HID_SMA_ALIGNLX ;
+ Text [ en-US ] = "Align Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNCX ;
+ HelpId = HID_SMA_ALIGNCX ;
+ Text [ en-US ] = "Align Center" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNRX ;
+ HelpId = HID_SMA_ALIGNRX ;
+ Text [ en-US ] = "Align Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MATRIX ;
+ HelpId = HID_SMA_MATRIX ;
+ Text [ en-US ] = "Matrix Stack" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BLANK ;
+ HelpId = HID_SMA_BLANK ;
+ Text [ en-US ] = "Gap" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_I
+ {
+ // misc
+ HelpId = HID_SMA_FORMAT_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 4 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_INFINITY ;
+ HelpId = HID_SMA_INFINITY ;
+ Text [ en-US ] = "infinite";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PARTIAL ;
+ HelpId = HID_SMA_PARTIAL ;
+ Text [ en-US ] = "Partial";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NABLA ;
+ HelpId = HID_SMA_NABLA ;
+ Text [ en-US ] = "Nabla";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EXISTS ;
+ HelpId = HID_SMA_EXISTS ;
+ Text [ en-US ] = "There Exists";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FORALL ;
+ HelpId = HID_SMA_FORALL ;
+ Text [ en-US ] = "For All";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_HBAR ;
+ HelpId = HID_SMA_HBAR ;
+ Text [ en-US ] = "h Bar";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LAMBDABAR ;
+ HelpId = HID_SMA_LAMBDABAR ;
+ Text [ en-US ] = "Lambda Bar";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RE ;
+ HelpId = HID_SMA_RE ;
+ Text [ en-US ] = "Real Part";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IM ;
+ HelpId = HID_SMA_IM ;
+ Text [ en-US ] = "Imaginary Part";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WP ;
+ HelpId = HID_SMA_WP ;
+ Text [ en-US ] = "Weierstrass p";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LEFTARROW ;
+ HelpId = HID_SMA_LEFTARROW ;
+ Text [ en-US ] = "Left Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RIGHTARROW ;
+ HelpId = HID_SMA_RIGHTARROW ;
+ Text [ en-US ] = "Right Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_UPARROW ;
+ HelpId = HID_SMA_UPARROW ;
+ Text [ en-US ] = "Up Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOWNARROW ;
+ HelpId = HID_SMA_DOWNARROW ;
+ Text [ en-US ] = "Down Arrow";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSLOW ;
+ HelpId = HID_SMA_DOTSLOW ;
+ Text [ en-US ] = "Dots At Bottom";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSAXIS ;
+ HelpId = HID_SMA_DOTSAXIS ;
+ Text [ en-US ] = "Dots In Middle";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSVERT ;
+ HelpId = HID_SMA_DOTSVERT ;
+ Text [ en-US ] = "Dots Vertically";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSUP ;
+ HelpId = HID_SMA_DOTSUP ;
+ Text [ en-US ] = "Dots To Top";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSDOWN ;
+ HelpId = HID_SMA_DOTSDOWN ;
+ Text [ en-US ] = "Dots to Bottom";
+ };
+ };
+ };
+};
+
+
+
+#define UNBINOPS_IDLIST \
+ IdList = \
+ { \
+ RID_PLUSX ; \
+ RID_MINUSX ; \
+ RID_PLUSMINUSX ; \
+ RID_MINUSPLUSX ; \
+ RID_XPLUSY ; \
+ RID_XCDOTY ; \
+ RID_XTIMESY ; \
+ RID_XSYMTIMESY ; \
+ RID_XMINUSY ; \
+ RID_XOVERY ; \
+ RID_XDIVY ; \
+ RID_XSYMDIVIDEY ; \
+ RID_NEGX ; \
+ RID_XANDY ; \
+ RID_XORY ; \
+ RID_XCIRCY ; \
+ }; \
+ IdCount = { 16 ; };
+
+ ImageList RID_IL_UNBINOPS
+ {
+ Prefix = "un";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ UNBINOPS_IDLIST
+ };
+
+#define RELATIONS_IDLIST \
+ IdList = \
+ { \
+ RID_XEQY ; \
+ RID_XNEQY ; \
+ RID_XEQUIVY ; \
+ RID_XORTHOY ; \
+ RID_XLTY ; \
+ RID_XGTY ; \
+ RID_XAPPROXY ; \
+ RID_XPARALLELY ; \
+ RID_XLESLANTY ; \
+ RID_XGESLANTY ; \
+ RID_XSIMEQY ; \
+ RID_XPROPY ; \
+ RID_XLEY ; \
+ RID_XGEY ; \
+ RID_XSIMY ; \
+ RID_XTOWARDY ; \
+ RID_XDIVIDESY ; \
+ RID_XNDIVIDESY; \
+ RID_DLARROW ; \
+ RID_DLRARROW ; \
+ RID_DRARROW ; \
+ }; \
+ IdCount ={ 21 ; };
+
+ ImageList RID_IL_RELATIONS
+ {
+ Prefix = "bi";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ RELATIONS_IDLIST
+ };
+
+#define SETOPERATIONS_IDLIST \
+ IdList = \
+ { \
+ RID_XINY ; \
+ RID_XNOTINY ; \
+ RID_XOWNSY ; \
+ RID_XINTERSECTIONY ; \
+ RID_XUNIONY ; \
+ RID_XSETMINUSY ; \
+ RID_XSLASHY ; \
+ RID_XSUBSETY ; \
+ RID_XSUBSETEQY ; \
+ RID_XSUPSETY ; \
+ RID_XSUPSETEQY ; \
+ RID_XNSUBSETY ; \
+ RID_XNSUBSETEQY ; \
+ RID_XNSUPSETY ; \
+ RID_XNSUPSETEQY ; \
+ RID_EMPTYSET ; \
+ RID_ALEPH ; \
+ RID_SETN ; \
+ RID_SETZ ; \
+ RID_SETQ ; \
+ RID_SETR ; \
+ RID_SETC ; \
+ }; \
+ IdCount = { 22 ; };
+
+ ImageList RID_IL_SETOPERATIONS
+ {
+ Prefix = "op";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ SETOPERATIONS_IDLIST
+ };
+
+#define FUNCTIONS_IDLIST \
+ IdList = \
+ { \
+ RID_ABSX ; \
+ RID_FACTX ; \
+ RID_SQRTX ; \
+ RID_NROOTXY ; \
+ RID_EX ; \
+ RID_LNX ; \
+ RID_EXPX ; \
+ RID_LOGX ; \
+ RID_SINX ; \
+ RID_COSX ; \
+ RID_TANX ; \
+ RID_COTX ; \
+ RID_SINHX ; \
+ RID_COSHX ; \
+ RID_TANHX ; \
+ RID_COTHX ; \
+ RID_ARCSINX ; \
+ RID_ARCCOSX ; \
+ RID_ARCTANX ; \
+ RID_ARCCOTX ; \
+ RID_ARSINHX ; \
+ RID_ARCOSHX ; \
+ RID_ARTANHX ; \
+ RID_ARCOTHX ; \
+ RID_RSUPX ; \
+ }; \
+ IdCount = { 25 ; };
+
+ ImageList RID_IL_FUNCTIONS
+ {
+ Prefix = "fu";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ FUNCTIONS_IDLIST
+ };
+
+#define OPERATORS_IDLIST \
+ IdList = \
+ { \
+ RID_LIMX ; \
+ RID_SUMX ; \
+ RID_PRODX ; \
+ RID_COPRODX ; \
+ RID_INTX ; \
+ RID_IINTX ; \
+ RID_IIINTX ; \
+ RID_LINTX ; \
+ RID_LLINTX ; \
+ RID_LLLINTX ; \
+ RID_FROMXTOY ; \
+ RID_FROMX ; \
+ RID_TOX ; \
+ }; \
+ IdCount = { 13 ; };
+
+ ImageList RID_IL_OPERATORS
+ {
+ Prefix = "fo";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ OPERATORS_IDLIST
+ };
+
+#define ATTRIBUTES_IDLIST \
+ IdList = \
+ { \
+ RID_ACUTEX ; \
+ RID_GRAVEX ; \
+ RID_CHECKX ; \
+ RID_BREVEX ; \
+ RID_BARX ; \
+ RID_VECX ; \
+ RID_HATX ; \
+ RID_TILDEX ; \
+ RID_CIRCLEX ; \
+ RID_DOTX ; \
+ RID_DDOTX ; \
+ RID_DDDOTX ; \
+ RID_OVERLINEX ; \
+ RID_UNDERLINEX ; \
+ RID_OVERSTRIKEX ; \
+ RID_PHANTOMX ; \
+ RID_BOLDX ; \
+ RID_ITALX ; \
+ RID_SIZEXY ; \
+ RID_FONTXY ; \
+ RID_WIDEHATX ; \
+ RID_WIDETILDEX ; \
+ RID_WIDEVECX ; \
+ }; \
+ IdCount = { 23 ; };
+
+ ImageList RID_IL_ATTRIBUTES
+ {
+ Prefix = "at";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ ATTRIBUTES_IDLIST
+ };
+
+#define BRACKETS_IDLIST \
+ IdList = \
+ { \
+ RID_LRPARENTX ; \
+ RID_LRBRACKETX ; \
+ RID_LRANGLEX ; \
+ RID_LRBRACEX ; \
+ RID_LRLINEX ; \
+ RID_LRDLINEX ; \
+ RID_LMRANGLEXY ; \
+ RID_LRGROUPX ; \
+ RID_SLRPARENTX ; \
+ RID_SLRBRACKETX ; \
+ RID_SLRANGLEX ; \
+ RID_SLRBRACEX ; \
+ RID_SLRLINEX ; \
+ RID_SLRDLINEX ; \
+ RID_SLMRANGLEXY ; \
+ RID_LRDBRACKETX ; \
+ RID_SLRDBRACKETX ; \
+ RID_XOVERBRACEY ; \
+ RID_XUNDERBRACEY ; \
+ }; \
+ IdCount = { 19 ; };
+
+ ImageList RID_IL_BRACKETS
+ {
+ Prefix = "al";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ BRACKETS_IDLIST
+ };
+
+#define FORMAT_IDLIST \
+ IdList = \
+ { \
+ RID_NEWLINE ; \
+ RID_SBLANK ; \
+ RID_BLANK ; \
+ RID_BINOMXY ; \
+ RID_STACK ; \
+ RID_MATRIX ; \
+ RID_ALIGNLX ; \
+ RID_ALIGNCX ; \
+ RID_ALIGNRX ; \
+ RID_RSUBX ; \
+ RID_RSUPX ; \
+ RID_LSUBX ; \
+ RID_LSUPX ; \
+ RID_CSUBX ; \
+ RID_CSUPX ; \
+ }; \
+ IdCount = { 15 ; };
+
+ ImageList RID_IL_FORMAT
+ {
+ Prefix = "co";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ FORMAT_IDLIST
+ };
+
+#define MISC_IDLIST \
+ IdList = \
+ { \
+ RID_INFINITY ; \
+ RID_PARTIAL ; \
+ RID_NABLA ; \
+ RID_EXISTS ; \
+ RID_FORALL ; \
+ RID_HBAR; \
+ RID_LAMBDABAR ; \
+ RID_RE ; \
+ RID_IM ; \
+ RID_WP ; \
+ RID_LEFTARROW ; \
+ RID_RIGHTARROW ; \
+ RID_UPARROW ; \
+ RID_DOWNARROW ; \
+ RID_DOTSLOW ; \
+ RID_DOTSAXIS ; \
+ RID_DOTSVERT ; \
+ RID_DOTSUP ; \
+ RID_DOTSDOWN ; \
+ }; \
+ IdCount = { 19 ; };
+
+ ImageList RID_IL_MISC
+ {
+ Prefix = "mi";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ MISC_IDLIST
+ };
+
+#define CATALOG_IDLIST \
+ IdList = \
+ { \
+ RID_UNBINOPS_CAT ; \
+ RID_RELATIONS_CAT ; \
+ RID_SETOPERATIONS_CAT ; \
+ RID_FUNCTIONS_CAT ; \
+ RID_OPERATORS_CAT ; \
+ RID_ATTRIBUTES_CAT ; \
+ RID_MISC_CAT ; \
+ RID_BRACKETS_CAT ; \
+ RID_FORMAT_CAT ; \
+ }; \
+ IdCount = { 9 ; };
+
+ ImageList RID_IL_CATALOG
+ {
+ Prefix = "im";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ CATALOG_IDLIST
+ };
+
+
+
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index b02c332356..736203a16a 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -82,7 +82,7 @@ SmPrintUIOptions::SmPrintUIOptions()
{
ResStringArray aLocalizedStrings( SmResId( RID_PRINTUIOPTIONS ) );
OSL_ENSURE( aLocalizedStrings.Count() >= 18, "resource incomplete" );
- if( aLocalizedStrings.Count() < 18 ) // bad resource ?
+ if( aLocalizedStrings.Count() < 9 ) // bad resource ?
return;
SmModule *pp = SM_MOD();
@@ -100,42 +100,42 @@ SmPrintUIOptions::SmPrintUIOptions()
String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SMATH ) );
- m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+ m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
// create subgroup for print options
m_aUIProperties[1].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
// create a bool option for title row (matches to SID_PRINTTITLE)
m_aUIProperties[2].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
- aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TitleRow:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_TITLE_ROW ) ),
pConfig->IsPrintTitle() );
// create a bool option for formula text (matches to SID_PRINTTEXT)
- m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
- aLocalizedStrings.GetString( 5 ),
+ m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:FormulaText:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_FORMULA_TEXT ) ),
pConfig->IsPrintFormulaText() );
// create a bool option for border (matches to SID_PRINTFRAME)
- m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
- aLocalizedStrings.GetString( 7 ),
+ m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Border:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_BORDER ) ),
pConfig->IsPrintFrame() );
// create subgroup for print format
- m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 8 ), rtl::OUString() );
+ m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 5 ), rtl::OUString() );
// create a radio button group for print format (matches to SID_PRINTSIZE)
Sequence< rtl::OUString > aChoices( 3 );
- aChoices[0] = aLocalizedStrings.GetString( 9 );
- aChoices[1] = aLocalizedStrings.GetString( 11 );
- aChoices[2] = aLocalizedStrings.GetString( 13 );
- Sequence< rtl::OUString > aHelpTexts( 3 );
- aHelpTexts[0] = aLocalizedStrings.GetString( 10 );
- aHelpTexts[1] = aLocalizedStrings.GetString( 12 );
- aHelpTexts[2] = aLocalizedStrings.GetString( 14 );
+ aChoices[0] = aLocalizedStrings.GetString( 6 );
+ aChoices[1] = aLocalizedStrings.GetString( 7 );
+ aChoices[2] = aLocalizedStrings.GetString( 8 );
+ Sequence< rtl::OUString > aHelpIds( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0" ) );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1" ) );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2" ) );
OUString aPrintFormatProp( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_FORMAT ) );
m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
aPrintFormatProp,
aChoices, static_cast< sal_Int32 >(pConfig->GetPrintSize())
);
@@ -143,7 +143,7 @@ SmPrintUIOptions::SmPrintUIOptions()
// create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM)
vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True );
m_aUIProperties[ 7 ].Value = getRangeControlOpt( rtl::OUString(),
- aLocalizedStrings.GetString( 14 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintScale:NumericField" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_SCALE ) ),
pConfig->GetPrintZoomFactor(), // initial value
10, // min value
@@ -162,7 +162,11 @@ SmPrintUIOptions::SmPrintUIOptions()
//
// class SmModel
//
-#define PROPERTY_NONE 0
+
+// values from com/sun/star/beans/PropertyAttribute
+#define PROPERTY_NONE 0
+#define PROPERTY_READONLY 16
+
enum SmModelPropertyHandles
{
HANDLE_FORMULA,
@@ -224,10 +228,12 @@ enum SmModelPropertyHandles
HANDLE_PRINTER_NAME,
HANDLE_PRINTER_SETUP,
HANDLE_SYMBOLS,
+ HANDLE_USED_SYMBOLS,
HANDLE_BASIC_LIBRARIES,
HANDLE_RUNTIME_UID,
- HANDLE_LOAD_READONLY, // Security Options
- HANDLE_DIALOG_LIBRARIES // #i73329#
+ HANDLE_LOAD_READONLY, // Security Options
+ HANDLE_DIALOG_LIBRARIES, // #i73329#
+ HANDLE_BASELINE
};
PropertySetInfo * lcl_createModelPropertyInfo ()
@@ -295,10 +301,14 @@ PropertySetInfo * lcl_createModelPropertyInfo ()
{ RTL_CONSTASCII_STRINGPARAM( "RightMargin" ), HANDLE_RIGHT_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_RIGHTSPACE },
{ RTL_CONSTASCII_STRINGPARAM( "RuntimeUID" ), HANDLE_RUNTIME_UID , &::getCppuType(static_cast< const rtl::OUString * >(0)), PropertyAttribute::READONLY, 0 },
{ RTL_CONSTASCII_STRINGPARAM( "Symbols" ), HANDLE_SYMBOLS , &::getCppuType((const Sequence < SymbolDescriptor > *)0), PROPERTY_NONE, 0 },
+ { RTL_CONSTASCII_STRINGPARAM( "UserDefinedSymbolsInUse" ), HANDLE_USED_SYMBOLS , &::getCppuType((const Sequence < SymbolDescriptor > *)0), PropertyAttribute::READONLY, 0 },
{ RTL_CONSTASCII_STRINGPARAM( "TopMargin" ), HANDLE_TOP_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_TOPSPACE },
// --> PB 2004-08-25 #i33095# Security Options
{ RTL_CONSTASCII_STRINGPARAM( "LoadReadonly" ), HANDLE_LOAD_READONLY, &::getBooleanCppuType(), PROPERTY_NONE, 0 },
// <--
+ // --> 3.7.2010 #i972#
+ { RTL_CONSTASCII_STRINGPARAM( "BaseLine"), HANDLE_BASELINE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0},
+ // <--
{ NULL, 0, 0, NULL, 0, 0 }
};
PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap );
@@ -534,7 +544,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
// apply base size to fonts
const Size aTmp( aFormat.GetBaseSize() );
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
aFormat.SetFontSize(i, aTmp);
}
break;
@@ -691,7 +701,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
SmSym aSymbol ( pDescriptor->sName, aFont, static_cast < sal_Unicode > (pDescriptor->nCharacter),
pDescriptor->sSymbolSet );
aSymbol.SetExportName ( pDescriptor->sExportName );
- aSymbol.SetDocSymbol( TRUE );
+ aSymbol.SetDocSymbol( sal_True );
rManager.AddOrReplaceSymbol ( aSymbol );
}
}
@@ -704,7 +714,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if ( (*pValues).getValueType() != ::getBooleanCppuType() )
throw IllegalArgumentException();
- sal_Bool bReadonly = FALSE;
+ sal_Bool bReadonly = sal_False;
if ( *pValues >>= bReadonly )
pDocSh->SetLoadReadonly( bReadonly );
break;
@@ -863,7 +873,11 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
}
break;
case HANDLE_SYMBOLS:
+ case HANDLE_USED_SYMBOLS:
{
+ const bool bUsedSymbolsOnly = (*ppEntries)->mnHandle == HANDLE_USED_SYMBOLS;
+ const std::set< rtl::OUString > &rUsedSymbols = pDocSh->GetUsedSymbols();
+
// this is get
SmModule *pp = SM_MOD();
const SmSymbolManager &rManager = pp->GetSymbolManager();
@@ -874,7 +888,9 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
for (size_t i = 0; i < aSymbols.size(); ++i)
{
const SmSym * pSymbol = aSymbols[ i ];
- if (pSymbol && !pSymbol->IsPredefined () )
+ const bool bIsUsedSymbol = rUsedSymbols.find( pSymbol->GetName() ) != rUsedSymbols.end();
+ if (pSymbol && !pSymbol->IsPredefined() &&
+ (!bUsedSymbolsOnly || bIsUsedSymbol))
{
aVector.push_back ( pSymbol );
nCount++;
@@ -918,6 +934,21 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
break;
}
// <--
+ // --> 3.7.2010 #i972#
+ case HANDLE_BASELINE:
+ {
+ if ( !pDocSh->pTree )
+ pDocSh->Parse();
+ if ( pDocSh->pTree )
+ {
+ if ( !pDocSh->IsFormulaArranged() )
+ pDocSh->ArrangeFormula();
+
+ *pValue <<= static_cast<sal_Int32>( pDocSh->pTree->GetFormulaBaseline() );
+ }
+ }
+ break;
+ // <--
}
}
}
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index dd8606e493..833652a2dc 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -46,6 +46,8 @@
#include "smdll.hxx"
+////////////////////////////////////////////////////////////
+
// return pointer to active SmViewShell, if this is not possible
// return 0 instead.
//!! Since this method is based on the current focus it is somewhat
@@ -62,8 +64,8 @@ SmViewShell * SmGetActiveView()
/**************************************************************************/
-SmPickList::SmPickList(USHORT nInitSize, USHORT nMaxSize) :
- SfxPtrArr((BYTE) nInitSize, 1)
+SmPickList::SmPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize) :
+ SfxPtrArr((sal_uInt8) nInitSize, 1)
{
nSize = nMaxSize;
}
@@ -77,7 +79,7 @@ SmPickList::~SmPickList()
SmPickList& SmPickList::operator=(const SmPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
Clear();
nSize = rList.nSize;
@@ -103,7 +105,7 @@ void SmPickList::Insert(const void *pItem)
void SmPickList::Update(const void *pItem, const void *pNewItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -116,7 +118,7 @@ void SmPickList::Update(const void *pItem, const void *pNewItem)
void SmPickList::Remove(const void *pItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -129,7 +131,7 @@ void SmPickList::Remove(const void *pItem)
void SmPickList::Clear()
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
DestroyItem(GetPtr(nPos));
@@ -228,7 +230,7 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const
IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
{
- USHORT nPos;
+ sal_uInt16 nPos;
String aString;
nPos = GetSelectEntryPos();
@@ -247,7 +249,7 @@ IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
}
-SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax) :
+SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax) :
SmFontPickList(nMax, nMax),
ListBox(pParent, rResId)
{
@@ -257,7 +259,7 @@ SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHOR
SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
*(SmFontPickList *)this = rList;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 0c2cd049f3..7fbd432196 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -35,6 +35,9 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/XFramesSupplier.hpp>
+#include <com/sun/star/container/XChild.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
@@ -198,7 +201,7 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
ESelection aSel (aToken.nRow - 1, aToken.nCol - 1);
if (rMEvt.GetClicks() != 1 || aToken.eType == TPLACE)
- aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< USHORT >(aToken.aText.Len());
+ aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< sal_uInt16 >(aToken.aText.Len());
pEdit->SetSelection(aSel);
SetCursor(pNode);
@@ -342,7 +345,7 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect)
ShowCursor(true); // draw new cursor
}
-const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
+const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
// looks for a VISIBLE node in the formula tree with it's token at
// (or around) the position 'nRow', 'nCol' in the edit window
// (row and column numbering starts with 1 there!).
@@ -387,7 +390,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
const SmEditWindow *pEdit = pViewShell->GetEditWindow();
if (pEdit)
{ // get new position for formula-cursor (for possible altered formula)
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(pEdit->GetSelection(), nRow, nCol);
nRow++;
nCol++;
@@ -416,7 +419,7 @@ void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
ScrollableWindow::KeyInput(rKEvt);
return;
}
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
SmCursor& rCursor = pViewShell->GetDoc()->GetCursor();
switch(nCode)
{
@@ -565,7 +568,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
const CommandWheelData* pWData = rCEvt.GetWheelData();
if ( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nTmpZoom = GetZoom();
+ sal_uInt16 nTmpZoom = GetZoom();
if( 0L > pWData->GetDelta() )
nTmpZoom -= 10;
else
@@ -592,9 +595,9 @@ IMPL_LINK_INLINE_START( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
IMPL_LINK_INLINE_END( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
-void SmGraphicWindow::SetZoom(USHORT Factor)
+void SmGraphicWindow::SetZoom(sal_uInt16 Factor)
{
- nZoom = Min(Max((USHORT) Factor, (USHORT) MINZOOM), (USHORT) MAXZOOM);
+ nZoom = Min(Max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM);
Fraction aFraction (nZoom, 100);
SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction) );
SetTotalSize();
@@ -619,7 +622,7 @@ void SmGraphicWindow::ZoomToFitInWindow()
{
long nVal = Min ((85 * aWindowSize.Width()) / aSize.Width(),
(85 * aWindowSize.Height()) / aSize.Height());
- SetZoom ( sal::static_int_cast< USHORT >(nVal) );
+ SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) );
}
}
@@ -637,7 +640,7 @@ uno::Reference< XAccessible > SmGraphicWindow::CreateAccessible()
SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rGraphic(rSmGraphic)
@@ -645,7 +648,7 @@ SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
}
-void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmGraphicController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
rGraphic.SetTotalSize();
rGraphic.Invalidate();
@@ -657,7 +660,7 @@ void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const S
SmEditController::SmEditController(SmEditWindow &rSmEdit,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rEdit(rSmEdit)
@@ -672,7 +675,7 @@ SmEditController::~SmEditController()
#endif
-void SmEditController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmEditController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
const SfxStringItem *pItem = PTR_CAST(SfxStringItem, pState);
@@ -832,7 +835,51 @@ void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange )
IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
{
- aEdit.GrabFocus();
+ // We want to have the focus in the edit window once Math has been opened
+ // to allow for immediate typing.
+ // Problem: There is no proper way to do this
+ // Thus: this timer based soultion has been implemented (see GrabFocus below)
+ //
+ // Follow-up problem (#i114910): grabing the focus may bust the help system since
+ // it relies on getting the current frame which conflicts with grabbing the focus.
+ // Thus aside from the 'GrabFocus' call everything else is to get the
+ // help reliably working despite using 'GrabFocus'.
+
+ try
+ {
+ uno::Reference< frame::XDesktop > xDesktop;
+ uno::Reference< lang::XMultiServiceFactory > xSMGR( comphelper::getProcessServiceFactory() );
+ if (xSMGR.is())
+ {
+ xDesktop = uno::Reference< frame::XDesktop >(
+ xSMGR->createInstance( rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" )), uno::UNO_QUERY_THROW );
+ }
+
+ aEdit.GrabFocus();
+
+ if (xDesktop.is())
+ {
+ bool bInPlace = GetView()->GetViewFrame()->GetFrame().IsInPlace();
+ uno::Reference< frame::XFrame > xFrame( GetBindings().GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface());
+ if ( bInPlace )
+ {
+ uno::Reference< container::XChild > xModel( GetView()->GetDoc()->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XModel > xParent( xModel->getParent(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XController > xParentCtrler( xParent->getCurrentController() );
+ uno::Reference< frame::XFramesSupplier > xParentFrame( xParentCtrler->getFrame(), uno::UNO_QUERY_THROW );
+ xParentFrame->setActiveFrame( xFrame );
+ }
+ else
+ {
+ uno::Reference< frame::XFramesSupplier > xFramesSupplier( xDesktop, uno::UNO_QUERY );
+ xFramesSupplier->setActiveFrame( xFrame );
+ }
+ }
+ }
+ catch (uno::Exception &)
+ {
+ DBG_ASSERT( 0, "failed to properly set initial focus to edit window" );
+ }
return 0;
}
@@ -872,7 +919,7 @@ void SmCmdBoxWindow::GetFocus()
SFX_IMPL_DOCKINGWINDOW(SmCmdBoxWrapper, SID_CMDBOXWINDOW);
-SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, USHORT nId,
+SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, sal_uInt16 nId,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
@@ -992,7 +1039,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetZoomFactor" );
const Fraction &rFrac = rX < rY ? rX : rY;
- GetGraphicWindow().SetZoom( (USHORT) long(rFrac * Fraction( 100, 1 )) );
+ GetGraphicWindow().SetZoom( (sal_uInt16) long(rFrac * Fraction( 100, 1 )) );
//To avoid rounding errors base class regulates crooked values too
//if necessary
@@ -1006,7 +1053,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
String aText;
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
@@ -1014,7 +1061,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
aSize.Width() = 0;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aSize.Width() = ((aSize.Width() / TabPos) + 1) * TabPos;
@@ -1038,9 +1085,9 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M
String aLine;
Size TextSize;
String aText;
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -1098,13 +1145,13 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
String aText;
Point aPoint (rPosition);
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
long TabPos = rDevice.GetTextWidth('n') * 8;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aPoint.X() = ((aPoint.X() / TabPos) + 1) * TabPos;
@@ -1121,17 +1168,17 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
}
-void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, USHORT MaxWidth)
+void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, sal_uInt16 MaxWidth)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::DrawText" );
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
Point aPoint (rPosition);
Size aSize;
String aLine;
String aText;
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -1195,7 +1242,7 @@ void SmViewShell::Impl_Print(
const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True );
const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True );
SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) ));
- const USHORT nZoomFactor = static_cast< USHORT >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
+ const sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
rOutDev.Push();
rOutDev.SetLineColor( Color(COL_BLACK) );
@@ -1233,7 +1280,7 @@ void SmViewShell::Impl_Print(
Point aPoint(aOutRect.Left() + (aOutRect.GetWidth() - aTitleSize.Width()) / 2,
aOutRect.Top());
DrawText(rOutDev, aPoint, GetDoc()->GetTitle(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aTitleSize.Height() + 200;
// output description
@@ -1243,7 +1290,7 @@ void SmViewShell::Impl_Print(
aPoint.X() = aOutRect.Left() + (aOutRect.GetWidth() - aDescSize.Width()) / 2;
aPoint.Y() = aOutRect.Top();
DrawText(rOutDev, aPoint, GetDoc()->GetComment(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aDescSize.Height() + 300;
}
@@ -1268,7 +1315,7 @@ void SmViewShell::Impl_Print(
Point aPoint (aOutRect.Left() + (aOutRect.GetWidth() - aSize.Width()) / 2,
aOutRect.Bottom() + 300);
DrawText(rOutDev, aPoint, GetDoc()->GetText(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Bottom() -= 200;
}
@@ -1298,9 +1345,9 @@ void SmViewShell::Impl_Print(
Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
aOutRect.GetHeight()), MapMode(MAP_100TH_MM)));
Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MAP_100TH_MM)));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
- Fraction aFraction ((USHORT) Max ((USHORT) MINZOOM, Min((USHORT) MAXZOOM, (USHORT) (nZ - 10))), (USHORT) 100);
+ Fraction aFraction ((sal_uInt16) Max ((sal_uInt16) MINZOOM, Min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100);
OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction);
}
@@ -1336,7 +1383,7 @@ void SmViewShell::Impl_Print(
rOutDev.Pop();
}
-USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog * /*pPrintDialog*/)
+sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
OSL_ENSURE( 0, "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
@@ -1344,7 +1391,7 @@ USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDia
}
-SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
+SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetPrinter" );
@@ -1355,7 +1402,7 @@ SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
}
-USHORT SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetPrinter" );
SfxPrinter *pOld = GetDoc()->GetPrinter();
@@ -1599,7 +1646,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
case SID_ZOOMOUT:
- OSL_ENSURE(aGraphic.GetZoom() >= 25, "Sm: incorrect USHORT argument");
+ OSL_ENSURE(aGraphic.GetZoom() >= 25, "Sm: incorrect sal_uInt16 argument");
aGraphic.SetZoom(aGraphic.GetZoom() - 25);
break;
@@ -1730,7 +1777,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
}
- case SID_INSERT_FORMULA:
+ case SID_IMPORT_FORMULA:
{
delete pImpl->pRequest;
pImpl->pRequest = new SfxRequest( rReq );
@@ -1813,7 +1860,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
switch( rZoom.GetType() )
{
case SVX_ZOOM_PERCENT:
- aGraphic.SetZoom((USHORT)rZoom.GetValue ());
+ aGraphic.SetZoom((sal_uInt16)rZoom.GetValue ());
break;
case SVX_ZOOM_OPTIMAL:
@@ -1830,7 +1877,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
OutputRect.GetHeight()), aMap));
Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
aGraphic.SetZoom (nZ);
break;
@@ -1876,7 +1923,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
SmEditWindow *pEditWin = GetEditWindow();
- for (USHORT nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1986,7 +2033,7 @@ SmViewShell::~SmViewShell()
delete pImpl;
}
-void SmViewShell::Deactivate( BOOL bIsMDIActivate )
+void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Deactivate" );
@@ -1998,7 +2045,7 @@ void SmViewShell::Deactivate( BOOL bIsMDIActivate )
}
-void SmViewShell::Activate( BOOL bIsMDIActivate )
+void SmViewShell::Activate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Activate" );
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index d89abb8a79..4a69d85162 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -718,7 +718,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
rDev.SetLineColor( );
aTmpDev.SetFont( pNode->GetFont( ) );
- ULONG nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
+ sal_uLong nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
// get rectangle and remove borderspace
Rectangle aTmp ( pNode->AsRectangle( ) + Position - pNode->GetTopLeft( ) );
@@ -1288,9 +1288,9 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmMatrixNode* pNode )
SmCaretPosGraphEntry *left = pRightMost,
*right = pGraph->Add( SmCaretPos( pNode, 1 ) );
- for ( USHORT i = 0; i < pNode->GetNumRows( ); i++ ) {
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
SmCaretPosGraphEntry* r = left;
- for ( USHORT j = 0; j < pNode->GetNumCols( ); j++ ){
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ){
SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
pRightMost = pGraph->Add( SmCaretPos( pSubNode, 0 ), r );
@@ -1819,12 +1819,12 @@ void SmCloningVisitor::CloneKids( SmStructureNode* pSource, SmStructureNode* pTa
SmNode* pCurrResult = pResult;
//Create array for holding clones
- USHORT nSize = pSource->GetNumSubNodes( );
+ sal_uInt16 nSize = pSource->GetNumSubNodes( );
SmNodeArray aNodes( nSize );
//Clone children
SmNode* pKid;
- for( USHORT i = 0; i < nSize; i++ ){
+ for( sal_uInt16 i = 0; i < nSize; i++ ){
if( NULL != ( pKid = pSource->GetSubNode( i ) ) )
pKid->Accept( this );
else
@@ -2421,8 +2421,8 @@ void SmNodeToTextVisitor::Visit( SmSubSupNode* pNode )
void SmNodeToTextVisitor::Visit( SmMatrixNode* pNode )
{
Append( "matrix{" );
- for ( USHORT i = 0; i < pNode->GetNumRows( ); i++ ) {
- for ( USHORT j = 0; j < pNode->GetNumCols( ); j++ ) {
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ) {
SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
Separate( );
pSubNode->Accept( this );
diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index 5b01e9beda..dcb68e7407 100644..100755
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -83,7 +83,7 @@
<menu:menu menu:id=".uno:ToolsMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:SymbolCatalogue"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:ImportFormula"/>
<menu:menuseparator/>
<menu:menu menu:id=".uno:MacrosMenu">
<menu:menupopup>
diff --git a/starmath/util/hidother.src b/starmath/util/hidother.src
index 5a87a5709e..0b2ff54898 100644
--- a/starmath/util/hidother.src
+++ b/starmath/util/hidother.src
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "../inc/starmath.hrc"
+#include "../inc/helpids.h"
hidspecial HID_SMA_OPTIONSDIALOG { HelpId = HID_SMA_OPTIONSDIALOG; };
hidspecial HID_SMA_FONTDIALOG { HelpId = HID_SMA_FONTDIALOG; };
@@ -70,7 +70,6 @@ hidspecial HID_SMA_CREATORSTR { HelpId = HID_SMA_CREATORSTR; };
hidspecial HID_SMA_FILESMFTYP { HelpId = HID_SMA_FILESMFTYP; };
hidspecial HID_SMA_FILESYMTYP { HelpId = HID_SMA_FILESYMTYP; };
hidspecial HID_SMA_WIN_DOCUMENT { HelpId = HID_SMA_WIN_DOCUMENT; };
-hidspecial HID_SMA_VIEWSHELL_DOCUMENT { HelpId = HID_SMA_VIEWSHELL_DOCUMENT; };
hidspecial HID_SMA_COMMAND_WIN_EDIT { HelpId = HID_SMA_COMMAND_WIN_EDIT; };
hidspecial HID_SMA_DEFAULT_DIST { HelpId = HID_SMA_DEFAULT_DIST; };
diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk
index 1ba52411d7..09fedb57fb 100644
--- a/starmath/util/makefile.mk
+++ b/starmath/util/makefile.mk
@@ -42,8 +42,7 @@ GEN_HID_OTHER=TRUE
RESLIB1NAME=sm
RESLIB1IMAGES=$(PRJ)$/res
RESLIB1SRSFILES=\
- $(SRS)$/smres.srs \
- $(SOLARCOMMONRESDIR)$/sfx.srs
+ $(SRS)$/smres.srs
SHL1TARGET= sm$(DLLPOSTFIX)
SHL1IMPLIB= smimp
@@ -112,3 +111,17 @@ SHL1RES= $(RCTARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/sm.component $(MISC)/smd.component
+
+$(MISC)/sm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ sm.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sm.component
+
+$(MISC)/smd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ smd.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt smd.component
diff --git a/starmath/util/sm.component b/starmath/util/sm.component
new file mode 100644
index 0000000000..8047662e29
--- /dev/null
+++ b/starmath/util/sm.component
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Math.FormulaDocument">
+ <service name="com.sun.star.formula.FormulaProperties"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLContentExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLImporter">
+ <service name="com.sun.star.xml.XMLImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLMetaExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisMetaExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisMetaImporter">
+ <service name="com.sun.star.xml.XMLImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisSettingsExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisSettingsImporter">
+ <service name="com.sun.star.xml.XMLImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLSettingsExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+</component>
diff --git a/starmath/util/smd.component b/starmath/util/smd.component
new file mode 100644
index 0000000000..9f56686448
--- /dev/null
+++ b/starmath/util/smd.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.math.FormatDetector">
+ <service name="com.sun.star.frame.ExtendedTypeDetection"/>
+ </implementation>
+</component>