summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-03-14 16:51:14 +0000
committerMichael Meeks <michael.meeks@novell.com>2011-03-14 16:51:14 +0000
commited40f62e64564d2b22c9285cfdc6778aeac8fd68 (patch)
tree1a29a28c991a80ec1f3c6de1ce0cd28d4996fe21 /sw/qa
parent6cd7d7c69ce62fbf788fc4e971cb14ab24d4c5ed (diff)
parent20529755b301c7af2c5ab461329b2d979b2cdbff (diff)
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/complex/accessibility/AccessibleRelationSet.java173
-rw-r--r--sw/qa/complex/accessibility/makefile.mk57
-rw-r--r--sw/qa/complex/checkColor/CheckChangeColor.java119
-rw-r--r--sw/qa/complex/checkColor/makefile.mk75
-rw-r--r--sw/qa/complex/indeterminateState/CheckIndeterminateState.java133
-rw-r--r--sw/qa/complex/indeterminateState/makefile.mk82
-rw-r--r--sw/qa/complex/writer/CheckBookmarks.java127
-rw-r--r--sw/qa/complex/writer/CheckCrossReferences.java334
-rw-r--r--sw/qa/complex/writer/CheckFlies.java219
-rw-r--r--sw/qa/complex/writer/CheckIndexedPropertyValues.java184
-rw-r--r--sw/qa/complex/writer/CheckNamedPropertyValues.java200
-rw-r--r--sw/qa/complex/writer/LoadSaveTest.java254
-rw-r--r--sw/qa/complex/writer/TestDocument.java39
-rw-r--r--sw/qa/complex/writer/TextPortionEnumerationTest.java645
-rw-r--r--sw/qa/complex/writer/makefile.mk108
-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx86
-rw-r--r--sw/qa/core/bigpointerarray-new.cxx14
-rw-r--r--sw/qa/core/bigpointerarray-new.hxx20
-rw-r--r--sw/qa/core/filters-test.cxx2
-rw-r--r--sw/qa/core/makefile.mk217
-rw-r--r--sw/qa/core/swdoc-test.cxx2
-rw-r--r--sw/qa/unoapi/Test.java5
-rw-r--r--sw/qa/unoapi/knownissues.xcl14
-rw-r--r--sw/qa/unoapi/lastCheck.txt1
-rw-r--r--sw/qa/unoapi/makefile.mk48
-rw-r--r--sw/qa/unoapi/sw.sce6
26 files changed, 1253 insertions, 1911 deletions
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java b/sw/qa/complex/accessibility/AccessibleRelationSet.java
index b7f45d25db2b..a6da2f29115a 100644
--- a/sw/qa/complex/accessibility/AccessibleRelationSet.java
+++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java
@@ -27,7 +27,6 @@
package complex.accessibility;
-import com.sun.star.accessibility.AccessibleRelation;
import com.sun.star.accessibility.AccessibleRole;
import com.sun.star.accessibility.XAccessible;
import com.sun.star.accessibility.XAccessibleText;
@@ -42,68 +41,61 @@ import com.sun.star.text.XText;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import complexlib.ComplexTestCase;
-import java.io.PrintWriter;
-import lib.StatusException;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
import util.AccessibilityTools;
import util.WriterTools;
-import util.utils;
+import static org.junit.Assert.*;
-public class AccessibleRelationSet extends ComplexTestCase {
-
- private static XAccessible para1 = null;
- private static XAccessible para2 = null;
- private static XAccessible para3 = null;
- private static XTextDocument xTextDoc = null;
+public class AccessibleRelationSet {
+ private XAccessible para1 = null;
+ private XAccessible para2 = null;
+ private XAccessible para3 = null;
+ private XTextDocument xTextDoc = null;
private final static String[] types = {"INVALID","CONTENT_FLOWS_FROM","CONTENT_FLOWS_TO","CONTROLLED_BY","CONTROLLER_FOR","LABEL_FOR","LABELED_BY","MEMBER_OF","SUB_WINDOW_OF"};
- public String[] getTestMethodNames() {
- return new String[]{"contents_flows_to","contents_flows_from"};
- }
-
- public void contents_flows_to() {
+ @Test public void contents_flows_to() {
XAccessibleRelationSet set = getAccessibleRelation(para1);
- boolean res = true;
short firstrelation=-1;
XAccessibleText atarget=null;
if (set != null) {
- log.println("Count of relations "+set.getRelationCount());
- assure("didn't gain correct count of relations",
- set.getRelationCount() == 1);
+ assertEquals(
+ "didn't gain correct count of relations", 1,
+ set.getRelationCount());
try {
firstrelation = set.getRelation(0).RelationType;
Object oTmp = set.getRelation(0).TargetSet[0];
atarget = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
} catch (IndexOutOfBoundsException e) {
- log.println("Exception when getting relations "+e);
- res = false;
+ fail("Exception when getting relations "+e);
}
}
- log.println("Expected for paragraph 0 "+types[2]);
- log.println("gained for paragraph 0 "+types[firstrelation]);
- res = types[2].equals(types[firstrelation]);
- assure("didn't gain correct relation type",res);
+ assertEquals(
+ "didn't gain correct relation type for paragraph 0", types[2],
+ types[firstrelation]);
- log.println("Text of target paragraph "+atarget.getText());
XAccessibleText paraTxt2 =
(XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para2);
- assure("didn't gain correct target paragraph",
- atarget.getText().equals(paraTxt2.getText()) );
+ assertEquals(
+ "didn't gain correct target paragraph", atarget.getText(),
+ paraTxt2.getText());
}
- public void contents_flows_from() {
+ @Test public void contents_flows_from() {
XAccessibleRelationSet set = getAccessibleRelation(para2);
- boolean res = true;
short[] relationtypes = new short[2];
XAccessibleText[] atargets = new XAccessibleText[2];
if (set != null) {
- log.println("Count of relations "+set.getRelationCount());
- assure("didn't gain correct count of relations",
- set.getRelationCount() == 2);
+ assertEquals(
+ "didn't gain correct count of relations", 2,
+ set.getRelationCount());
try {
short tmprelation = set.getRelation(0).RelationType;
if ( tmprelation == 1 )
@@ -120,7 +112,7 @@ public class AccessibleRelationSet extends ComplexTestCase {
}
else
{
- assure("didn't gain correct relation type", false);
+ fail("didn't gain correct relation type");
}
tmprelation = set.getRelation(1).RelationType;
if ( tmprelation == 1 )
@@ -137,79 +129,51 @@ public class AccessibleRelationSet extends ComplexTestCase {
}
else
{
- assure("didn't gain correct relation type", false);
+ fail("didn't gain correct relation type");
}
} catch (IndexOutOfBoundsException e) {
- log.println("Exception when getting relations "+e);
- res = false;
+ fail("Exception when getting relations "+e);
}
}
- log.println("### Checking "+types[1]+" for paragraph 1");
- log.println("Expected for paragraph 1 "+types[1]);
- log.println("gained for paragraph 1 "+types[relationtypes[0]]);
- res = types[1].equals(types[relationtypes[0]]);
- assure("didn't gain correct relation type",res);
+ assertEquals(
+ "didn't gain correct relation type for paragraph 1", types[1],
+ types[relationtypes[0]]);
- log.println("Text of target paragraph "+atargets[0].getText());
XAccessibleText paraTxt1 =
(XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para1);
- assure("didn't gain correct target paragraph",
- atargets[0].getText().equals(paraTxt1.getText()) );
+ assertEquals(
+ "didn't gain correct target paragraph", atargets[0].getText(),
+ paraTxt1.getText());
- log.println("### Checking "+types[2]+" for paragraph 1");
- log.println("Expected for paragraph 1 "+types[2]);
- log.println("gained for paragraph 1 "+types[relationtypes[1]]);
- res = types[2].equals(types[relationtypes[1]]);
- assure("didn't gain correct relation type",res);
+ assertEquals(
+ "didn't gain correct relation type for paragraph 3", types[2],
+ types[relationtypes[1]]);
- log.println("Text of target paragraph "+atargets[1].getText());
XAccessibleText paraTxt3 =
(XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para3);
- assure("didn't gain correct target paragraph",
- atargets[1].getText().equals(paraTxt3.getText()) );
+ assertEquals(
+ "didn't gain correct target paragraph", atargets[1].getText(),
+ paraTxt3.getText());
}
- private boolean getResult(XAccessible aPara, short index, int nr) {
- XAccessibleRelationSet set = getAccessibleRelation(aPara);
-
- boolean res = true;
- short firstrelation=-1;
- if (set != null) {
- log.println("Count of relations "+set.getRelationCount());
- try {
- firstrelation = set.getRelation(0).RelationType;
- } catch (IndexOutOfBoundsException e) {
- log.println("Exception when getting relations "+e);
- res = false;
- }
- }
+ @Before public void before()
+ throws com.sun.star.lang.IllegalArgumentException,
+ IndexOutOfBoundsException
+ {
+ XMultiServiceFactory factory = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
-
- log.println("Expected for paragraph "+nr+" "+types[index]);
- log.println("gained for paragraph "+nr+" "+types[firstrelation]);
- res = types[index].equals(types[firstrelation]);
- return res;
- }
-
-
- public void before() {
- log.println( "creating a text document" );
- xTextDoc = WriterTools.createTextDoc( (XMultiServiceFactory) param.getMSF());
+ xTextDoc = WriterTools.createTextDoc(factory);
XText oText = xTextDoc.getText();
XTextCursor oCursor = oText.createTextCursor();
- log.println( "inserting some lines" );
- try {
- for (int i=0; i<5; i++){
- oText.insertString( oCursor,"Paragraph Number: " + i, false);
- oText.insertControlCharacter(
- oCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- }
- } catch ( com.sun.star.lang.IllegalArgumentException e ){
- e.printStackTrace((PrintWriter)log);
- throw new StatusException( "Couldn't insert lines", e );
+ for (int i=0; i<5; i++){
+ oText.insertString( oCursor,"Paragraph Number: " + i, false);
+ oText.insertControlCharacter(
+ oCursor, ControlCharacter.PARAGRAPH_BREAK, false );
}
XModel aModel = (XModel)
@@ -217,26 +181,17 @@ public class AccessibleRelationSet extends ComplexTestCase {
AccessibilityTools at = new AccessibilityTools();
- XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) param.getMSF(), aModel);
+ XWindow xWindow = at.getCurrentWindow(factory, aModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
- try {
- para1 = at.SearchedContext.getAccessibleChild(0);
- para2 = at.SearchedContext.getAccessibleChild(1);
- para3 = at.SearchedContext.getAccessibleChild(2);
- } catch(IndexOutOfBoundsException e) {
- e.printStackTrace((PrintWriter)log);
- throw new StatusException( "Couldn't insert lines", e );
- }
-
- log.println("ImplementationName (para1)" + utils.getImplName(para1));
- log.println("ImplementationName (para2)" + utils.getImplName(para2));
+ para1 = at.SearchedContext.getAccessibleChild(0);
+ para2 = at.SearchedContext.getAccessibleChild(1);
+ para3 = at.SearchedContext.getAccessibleChild(2);
}
- public void after() {
- log.println("close text document");
+ @After public void after() {
util.DesktopTools.closeDoc(xTextDoc);
}
@@ -248,5 +203,15 @@ public class AccessibleRelationSet extends ComplexTestCase {
return set;
}
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/accessibility/makefile.mk b/sw/qa/complex/accessibility/makefile.mk
deleted file mode 100644
index 937f023ed04d..000000000000
--- a/sw/qa/complex/accessibility/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = AccessibleRelationSet
-PRJNAME = sw
-PACKAGE = complex$/accessibility
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE: settings.mk
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = AccessibleRelationSet.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-run:
- +java -cp $(CLASSPATH) org.openoffice.Runner -TimeOut 0 -tb java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
diff --git a/sw/qa/complex/checkColor/CheckChangeColor.java b/sw/qa/complex/checkColor/CheckChangeColor.java
index 8a8c563c7eea..a072072e18c8 100644
--- a/sw/qa/complex/checkColor/CheckChangeColor.java
+++ b/sw/qa/complex/checkColor/CheckChangeColor.java
@@ -1,90 +1,89 @@
package complex.checkColor;
-import com.sun.star.awt.Rectangle;
import com.sun.star.awt.Size;
-import com.sun.star.awt.WindowDescriptor;
-import com.sun.star.awt.XControlModel;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
-import com.sun.star.drawing.XControlShape;
-import com.sun.star.drawing.XShape;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XController;
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.style.XStyleFamiliesSupplier;
import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.Any;
+import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.view.XControlAccess;
-import complexlib.ComplexTestCase;
-import java.io.PrintWriter;
-import util.FormTools;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import util.DesktopTools;
import util.SOfficeFactory;
-import util.WriterTools;
+import static org.junit.Assert.*;
/**
* Created because of complaint on dev@openoffice.org: check the changing of
* BackColor and IsLandscape properties on the PageStyle service.
*/
-public class CheckChangeColor extends ComplexTestCase {
-
- private XToolkit xToolkit = null;
- private XWindowPeer xWinPeer = null;
-
- /**
- * Get all test method names.
- * @return The test methods.
- */
- public String[] getTestMethodNames() {
- return new String[] {"checkChangeColor"};
- }
-
-
+public class CheckChangeColor {
/**
* Check BackColor and IsLandscape properties, wait for an exception: test
* is ok if no exception happened.
*/
- public void checkChangeColor() {
- try {
- XMultiServiceFactory m_xMSF_ = (XMultiServiceFactory)param.getMSF();
- XComponentLoader aLoader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class,m_xMSF_.createInstance( "com.sun.star.frame.Desktop" ));
- XComponent xDocument = (XComponent)UnoRuntime.queryInterface(XComponent.class, aLoader.loadComponentFromURL( "private:factory/swriter", "_blank", 0, new PropertyValue[ 0 ] ) );
- // xDocument.addEventListener( this );
+ @Test public void checkChangeColor() throws Exception {
+ // create a supplier to get the Style family collection
+ XStyleFamiliesSupplier xSupplier = ( XStyleFamiliesSupplier ) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, document);
- XTextDocument oDoc = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xDocument);
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc );
+ // get the NameAccess interface from the Style family collection
+ XNameAccess xNameAccess = xSupplier.getStyleFamilies();
- // XInterface xInterface = (XInterface) oDocMSF.createInstance( "com.sun.star.style.PageStyle" );
+ XNameContainer xPageStyleCollection = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xNameAccess.getByName( "PageStyles" ));
- // create a supplier to get the Style family collection
- XStyleFamiliesSupplier xSupplier = ( XStyleFamiliesSupplier ) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, oDoc );
+ // create a PropertySet to set the properties for the new Pagestyle
+ XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageStyleCollection.getByName("Standard") );
- // get the NameAccess interface from the Style family collection
- XNameAccess xNameAccess = xSupplier.getStyleFamilies();
+ assertEquals(
+ "BackColor", new Any(Type.LONG, 0xFFFFFFFF),
+ Any.complete(xPropertySet.getPropertyValue("BackColor")));
+ assertEquals(
+ "IsLandscape", new Any(Type.BOOLEAN, false),
+ Any.complete(xPropertySet.getPropertyValue("IsLandscape")));
+ assertEquals(
+ "Size", new Type(Size.class),
+ Any.complete(xPropertySet.getPropertyValue("Size")).getType());
- XNameContainer xPageStyleCollection = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xNameAccess.getByName( "PageStyles" ));
+ xPropertySet.setPropertyValue("BackColor", 0xFF000000);
+ xPropertySet.setPropertyValue("IsLandscape", true);
+ assertEquals(
+ "BackColor", new Any(Type.LONG, 0xFF000000),
+ Any.complete(xPropertySet.getPropertyValue("BackColor")));
+ assertEquals(
+ "IsLandscape", new Any(Type.BOOLEAN, true),
+ Any.complete(xPropertySet.getPropertyValue("IsLandscape")));
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = SOfficeFactory.getFactory(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager())).
+ createTextDoc(null);
+ }
- // create a PropertySet to set the properties for the new Pagestyle
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageStyleCollection.getByName("Standard") );
+ @After public void tearDownDocument() {
+ DesktopTools.closeDoc(document);
+ }
- log.println("BackColor @ "+xPropertySet.getPropertyValue("BackColor").toString());
- log.println("IsLandscape @ "+xPropertySet.getPropertyValue("IsLandscape").toString());
- log.println("Size @ H:"+((Size)xPropertySet.getPropertyValue("Size")).Height+" W:"+((Size)xPropertySet.getPropertyValue("Size")).Width);
+ private XTextDocument document = null;
- log.println("Set Landscape");
- xPropertySet.setPropertyValue("IsLandscape",new Boolean(true) );
- log.println("Set BackColor");
- xPropertySet.setPropertyValue("BackColor",new Integer((int)255000000) );
- }
- catch(Exception e) {
- e.printStackTrace();
- failed("Exception.");
- }
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
}
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/checkColor/makefile.mk b/sw/qa/complex/checkColor/makefile.mk
deleted file mode 100644
index 3048fb8fff95..000000000000
--- a/sw/qa/complex/checkColor/makefile.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = CheckChangeColor
-PRJNAME = $(TARGET)
-PACKAGE = complex$/checkColor
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
-JAVAFILES = CheckChangeColor.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL : ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-RUN: run
-
-run:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_NOOFFICE) $(CT_TEST)
diff --git a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
index 7c3bf14f2e01..23a6d89ccf51 100644
--- a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
+++ b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
@@ -27,110 +27,99 @@
package complex.indeterminateState;
-import complexlib.ComplexTestCase;
-import helper.OfficeProvider;
-import util.SOfficeFactory;
-import util.AccessibilityTools;
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.AccessibleStateType;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.awt.FontWeight;
import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XExtendedToolkit;
-import com.sun.star.frame.XDispatch;
+import com.sun.star.beans.XPropertySet;
import com.sun.star.frame.XController;
-import com.sun.star.frame.XDesktop;
import com.sun.star.frame.XModel;
-import com.sun.star.text.XTextDocument;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XText;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.text.XTextRange;
+import com.sun.star.text.XTextViewCursorSupplier;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
-import com.sun.star.accessibility.AccessibleRole;
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleValue;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.accessibility.XAccessibleStateSet;
-import com.sun.star.accessibility.AccessibleStateType;
-import com.sun.star.accessibility.XAccessibleAction;
-import com.sun.star.awt.XTopWindow;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.util.URL;
-import com.sun.star.util.XURLTransformer;
-
-import java.io.PrintWriter;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import util.AccessibilityTools;
+import util.DesktopTools;
+import util.SOfficeFactory;
+import static org.junit.Assert.*;
/**
*/
-public class CheckIndeterminateState extends ComplexTestCase {
-
- /**
- * Return all test methods.
- * @return The test methods.
- */
- public String[] getTestMethodNames() {
- return new String[]{"checkToolBoxItem"};
- }
-
+public class CheckIndeterminateState {
/*
* Test the indeterminate state of AccessibleToolBarItem
* The used tools are in project qadevOOo/runner
*/
- public void checkToolBoxItem() {
- log.println( "creating a test environment" );
- XTextDocument xTextDoc = null;
- // get a soffice factory object
- SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory) param.getMSF());
-
- try {
- log.println( "creating a text document" );
- xTextDoc = SOF.createTextDoc(null);
- } catch ( com.sun.star.uno.Exception e ) {
- // Some exception occures.FAILED
- e.printStackTrace( (java.io.PrintWriter)log );
- failed (e.getMessage());
- }
-
+ @Test public void checkToolBoxItem() throws Exception {
XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ UnoRuntime.queryInterface(XModel.class, document);
XController xController = aModel.getCurrentController();
- XInterface oObj = null;
+ XText text = document.getText();
+ text.setString("normal");
+ XTextRange end = text.getEnd();
+ end.setString("bold");
+ UnoRuntime.queryInterface(XPropertySet.class, end).setPropertyValue(
+ "CharWeight", FontWeight.BOLD);
+ UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController).
+ getViewCursor().gotoRange(text, false);
- System.out.println("Press any key after making 'Bold' indeterminate.");
- try{
- byte[]b = new byte[16];
- System.in.read(b);
- } catch (Exception e) {
- e.printStackTrace();
- }
+ XInterface oObj = null;
AccessibilityTools at = new AccessibilityTools();
- XWindow xWindow = at.getCurrentContainerWindow((XMultiServiceFactory)param.getMSF(), aModel);
+ XWindow xWindow = at.getCurrentContainerWindow(getFactory(), aModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
- // uncomment to print the whole accessible tree.
-// at.printAccessibleTree((java.io.PrintWriter)log,xRoot);
-
- oObj = at.getAccessibleObjectForRole(xRoot,
- AccessibleRole.PUSH_BUTTON, "Bold");
- System.out.println("Found a PUSH_BUTTON: " + (oObj != null));
-
oObj = at.getAccessibleObjectForRole(xRoot,
AccessibleRole.TOGGLE_BUTTON, "Bold");
- System.out.println("Found a TOGGLE_BUTTON: " + (oObj != null));
-
- log.println("ImplementationName: "+ util.utils.getImplName(oObj));
+ assertNotNull("Found a TOGGLE_BUTTON", oObj);
XAccessibleContext oContext = (XAccessibleContext)
UnoRuntime.queryInterface(XAccessibleContext.class, oObj);
XAccessibleStateSet oSet = oContext.getAccessibleStateSet();
- short[]states = oSet.getStates();
- for(int i=0; i<states.length; i++)
- System.out.println("State "+i+": "+states[i]);
+ assertTrue("The 'INDETERMINATE' state is not set.",oSet.contains(AccessibleStateType.INDETERMINATE));
+ }
- assure("The 'INDETERMINATE' state is not set.",oSet.contains(AccessibleStateType.INDETERMINATE));
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = SOfficeFactory.getFactory(getFactory()).createTextDoc(null);
}
-}
+ @After public void tearDownDocument() {
+ DesktopTools.closeDoc(document);
+ }
+ private XTextDocument document = null;
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+ private static final XMultiServiceFactory getFactory() {
+ return UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ }
+}
diff --git a/sw/qa/complex/indeterminateState/makefile.mk b/sw/qa/complex/indeterminateState/makefile.mk
deleted file mode 100644
index 8850da116f5b..000000000000
--- a/sw/qa/complex/indeterminateState/makefile.mk
+++ /dev/null
@@ -1,82 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = CheckIndexedPropertyValue
-PRJNAME = $(TARGET)
-PACKAGE = complex$/indeterminateState
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckIndeterminateState.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL: ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-RUN:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_TEST)
-
-run: RUN
diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java
index 0915db42e6ac..84bfe15ba045 100644
--- a/sw/qa/complex/writer/CheckBookmarks.java
+++ b/sw/qa/complex/writer/CheckBookmarks.java
@@ -43,9 +43,15 @@ import com.sun.star.text.XTextRange;
import com.sun.star.uno.UnoRuntime;
import complexlib.ComplexTestCase;
import java.math.BigInteger;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
class BookmarkHashes {
- public String m_sName;
public BigInteger m_nSetupHash;
public BigInteger m_nInsertRandomHash;
public BigInteger m_nDeleteRandomHash;
@@ -53,40 +59,13 @@ class BookmarkHashes {
public BigInteger m_nOdfReloadHash;
public BigInteger m_nMsWordReloadHash;
- public BookmarkHashes(String sName) {
- m_sName = sName;
- }
-
- public String checkExpectationString(BookmarkHashes aExpectation) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("Comparing " + m_sName + " to expectations from " + aExpectation.m_sName + "\n");
- buffer.append(compareHashString("after setup", m_nSetupHash, aExpectation.m_nSetupHash));
- buffer.append(compareHashString("after insert random", m_nInsertRandomHash, aExpectation.m_nInsertRandomHash));
- buffer.append(compareHashString("after delete random", m_nDeleteRandomHash, aExpectation.m_nDeleteRandomHash));
- buffer.append(compareHashString("after line breaks", m_nLinebreakHash, aExpectation.m_nLinebreakHash));
- buffer.append(compareHashString("after ODF roundtrip", m_nOdfReloadHash, aExpectation.m_nOdfReloadHash));
- buffer.append(compareHashString("after MsWord roundtrip", m_nMsWordReloadHash, aExpectation.m_nMsWordReloadHash));
- return buffer.toString();
- };
-
- public boolean meetsExpectation(BookmarkHashes aExpectation) {
- return m_nSetupHash.equals(aExpectation.m_nSetupHash)
- && m_nInsertRandomHash.equals(aExpectation.m_nInsertRandomHash)
- && m_nDeleteRandomHash.equals(aExpectation.m_nDeleteRandomHash)
- && m_nLinebreakHash.equals(aExpectation.m_nLinebreakHash)
- && m_nOdfReloadHash.equals(aExpectation.m_nOdfReloadHash)
- && m_nMsWordReloadHash.equals(aExpectation.m_nMsWordReloadHash);
- }
-
- private String compareHashString(String sCheckName, BigInteger nActual, BigInteger nExpectation) {
- StringBuffer buffer = new StringBuffer(sCheckName);
- buffer.append(": ");
- if(nActual.equals(nExpectation))
- buffer.append("good (" + nActual.toString(16) + ")");
- else
- buffer.append("bad (actual:" + nActual.toString(16) + ", expected: " + nExpectation.toString(16) + ")");
- buffer.append("\n");
- return buffer.toString();
+ public void assertExpectation(BookmarkHashes aExpectation) {
+ assertEquals(aExpectation.m_nSetupHash, m_nSetupHash);
+ assertEquals(aExpectation.m_nInsertRandomHash, m_nInsertRandomHash);
+ assertEquals(aExpectation.m_nDeleteRandomHash, m_nDeleteRandomHash);
+ assertEquals(aExpectation.m_nLinebreakHash, m_nLinebreakHash);
+ assertEquals(aExpectation.m_nOdfReloadHash, m_nOdfReloadHash);
+ assertEquals(aExpectation.m_nMsWordReloadHash, m_nMsWordReloadHash);
}
static public java.math.BigInteger getBookmarksHash(XTextDocument xDoc)
@@ -114,18 +93,15 @@ class BookmarkHashes {
}
}
-public class CheckBookmarks extends ComplexTestCase {
+public class CheckBookmarks {
private XMultiServiceFactory m_xMsf = null;
private XTextDocument m_xDoc = null;
private XTextDocument m_xOdfReloadedDoc = null;
private XTextDocument m_xMsWordReloadedDoc = null;
-
- public String[] getTestMethodNames() {
- return new String[]{"checkBookmarks"};
- }
+ private final BookmarkHashes actualHashes = new BookmarkHashes();
private BookmarkHashes getDEV300m41Expectations() {
- BookmarkHashes result = new BookmarkHashes("DEV300m41");
+ BookmarkHashes result = new BookmarkHashes();
result.m_nSetupHash = new BigInteger("-4b0706744e8452fe1ae9d5e1c28cf70fb6194795",16);
result.m_nInsertRandomHash = new BigInteger("25aa0fad3f4881832dcdfe658ec2efa8a1a02bc5",16);
result.m_nDeleteRandomHash = new BigInteger("-3ec87e810b46d734677c351ad893bbbf9ea10f55",16);
@@ -135,42 +111,51 @@ public class CheckBookmarks extends ComplexTestCase {
return result;
}
- public void checkBookmarks()
+ @Test public void checkBookmarks()
throws com.sun.star.uno.Exception,
com.sun.star.io.IOException,
java.security.NoSuchAlgorithmException
{
- try {
- m_xMsf = (XMultiServiceFactory)param.getMSF();
- m_xDoc = util.WriterTools.createTextDoc(m_xMsf);
- BookmarkHashes actualHashes = new BookmarkHashes("actual");
- BookmarkHashes expectedHashes = getDEV300m41Expectations();
- setupBookmarks();
- actualHashes.m_nSetupHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- insertRandomParts(200177);
- actualHashes.m_nInsertRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- deleteRandomParts(4711);
- actualHashes.m_nDeleteRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- insertLinebreaks(007);
- actualHashes.m_nLinebreakHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- m_xOdfReloadedDoc = reloadFrom("StarOffice XML (Writer)", "odf");
- actualHashes.m_nOdfReloadHash = BookmarkHashes.getBookmarksHash(m_xOdfReloadedDoc);
- m_xMsWordReloadedDoc = reloadFrom("MS Word 97", "doc");
- actualHashes.m_nMsWordReloadHash = BookmarkHashes.getBookmarksHash(m_xMsWordReloadedDoc);
- log.println(actualHashes.checkExpectationString(expectedHashes));
- if(!actualHashes.meetsExpectation(expectedHashes))
- failed("CheckBookmark did not meet expectations (" + expectedHashes.m_sName + ").");
- } finally {
- // closing test document
- if(m_xDoc != null)
- util.DesktopTools.closeDoc(m_xDoc);
- if(m_xOdfReloadedDoc!= null)
- util.DesktopTools.closeDoc(m_xOdfReloadedDoc);
- if(m_xMsWordReloadedDoc!= null)
- util.DesktopTools.closeDoc(m_xMsWordReloadedDoc);
- }
+ actualHashes.assertExpectation(getDEV300m41Expectations());
}
+ @Before public void setUpDocuments() throws Exception {
+ m_xMsf = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ m_xDoc = util.WriterTools.createTextDoc(m_xMsf);
+ setupBookmarks();
+ actualHashes.m_nSetupHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ insertRandomParts(200177);
+ actualHashes.m_nInsertRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ deleteRandomParts(4711);
+ actualHashes.m_nDeleteRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ insertLinebreaks(007);
+ actualHashes.m_nLinebreakHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ m_xOdfReloadedDoc = reloadFrom("StarOffice XML (Writer)", "odf");
+ actualHashes.m_nOdfReloadHash = BookmarkHashes.getBookmarksHash(m_xOdfReloadedDoc);
+ m_xMsWordReloadedDoc = reloadFrom("MS Word 97", "doc");
+ actualHashes.m_nMsWordReloadHash = BookmarkHashes.getBookmarksHash(m_xMsWordReloadedDoc);
+ }
+
+ @After public void tearDownDocuments() {
+ util.DesktopTools.closeDoc(m_xDoc);
+ util.DesktopTools.closeDoc(m_xOdfReloadedDoc);
+ util.DesktopTools.closeDoc(m_xMsWordReloadedDoc);
+ }
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
private void setupBookmarks()
throws com.sun.star.uno.Exception
{
diff --git a/sw/qa/complex/writer/CheckCrossReferences.java b/sw/qa/complex/writer/CheckCrossReferences.java
index 7b469c0a4afc..cc7fcb1c7e53 100644
--- a/sw/qa/complex/writer/CheckCrossReferences.java
+++ b/sw/qa/complex/writer/CheckCrossReferences.java
@@ -1,123 +1,96 @@
-/*
- * CheckCrossReferences.java
- *
- * Created on November 1, 2007, 1:49 PM
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
package complex.writer;
-import complexlib.ComplexTestCase;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XTextDocument;
import com.sun.star.uno.UnoRuntime;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
*
* @author od138299
*/
-public class CheckCrossReferences extends ComplexTestCase {
+public class CheckCrossReferences {
- private com.sun.star.text.XTextDocument xDoc;
private com.sun.star.container.XEnumeration xParaEnum;
private com.sun.star.container.XEnumeration xPortionEnum;
private com.sun.star.util.XRefreshable xFldsRefresh;
- public String[] getTestMethodNames() {
- return new String[]{"checkCrossReferences"};
- }
-
- public com.sun.star.text.XTextField getNextField() {
-
- com.sun.star.text.XTextField xField = null;
+ public com.sun.star.text.XTextField getNextField()
+ throws com.sun.star.uno.Exception
+ {
if ( xPortionEnum != null ) {
- try {
- while ( xPortionEnum.hasMoreElements() ) {
- com.sun.star.beans.XPropertySet xPortionProps =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
- final String sPortionType =
- xPortionProps.getPropertyValue( "TextPortionType" ).toString();
- if ( sPortionType.equals( "TextField") ) {
- xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
- com.sun.star.text.XTextField.class,
- xPortionProps.getPropertyValue( "TextField" ) );
- if ( xField == null ) {
- System.out.println("Cannot retrieve next field.");
- failed("Cannot retrieve next field.");
- return null;
- }
- return xField;
- }
+ while ( xPortionEnum.hasMoreElements() ) {
+ com.sun.star.beans.XPropertySet xPortionProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
+ final String sPortionType =
+ xPortionProps.getPropertyValue( "TextPortionType" ).toString();
+ if ( sPortionType.equals( "TextField") ) {
+ com.sun.star.text.XTextField xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ assertNotNull("Cannot retrieve next field.", xField);
+ return xField;
}
- } catch (com.sun.star.container.NoSuchElementException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
}
}
while ( xParaEnum.hasMoreElements() ) {
- try {
- com.sun.star.container.XEnumerationAccess aPara =
- (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xParaEnum.nextElement());
- xPortionEnum = aPara.createEnumeration();
- while ( xPortionEnum.hasMoreElements() ) {
- com.sun.star.beans.XPropertySet xPortionProps =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
- final String sPortionType =
- xPortionProps.getPropertyValue( "TextPortionType" ).toString();
- if ( sPortionType.equals( "TextField") ) {
- xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
- com.sun.star.text.XTextField.class,
- xPortionProps.getPropertyValue( "TextField" ) );
- if ( xField == null ) {
- System.out.println("Cannot retrieve next field.");
- failed("Cannot retrieve next field.");
- return null;
- }
- return xField;
- }
+ com.sun.star.container.XEnumerationAccess aPara =
+ (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XEnumerationAccess.class, xParaEnum.nextElement());
+ xPortionEnum = aPara.createEnumeration();
+ while ( xPortionEnum.hasMoreElements() ) {
+ com.sun.star.beans.XPropertySet xPortionProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
+ final String sPortionType =
+ xPortionProps.getPropertyValue( "TextPortionType" ).toString();
+ if ( sPortionType.equals( "TextField") ) {
+ com.sun.star.text.XTextField xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ assertNotNull("Cannot retrieve next field.", xField);
+ return xField;
}
- } catch (com.sun.star.container.NoSuchElementException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
}
}
- if ( xField == null ) {
- System.out.println("Cannot retrieve next field.");
- failed("Cannot retrieve next field.");
- return null;
- }
-
- return xField;
+ fail("Cannot retrieve next field.");
+ return null; // unreachable
}
public com.sun.star.beans.XPropertySet getFieldProps(
@@ -126,11 +99,7 @@ public class CheckCrossReferences extends ComplexTestCase {
(com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
com.sun.star.beans.XPropertySet.class, xField );
- if ( xProps == null ) {
- System.out.println("Cannot retrieve field properties.");
- failed("Cannot retrieve field properties.");
- return null;
- }
+ assertNotNull("Cannot retrieve field properties.", xProps);
return xProps;
}
@@ -138,56 +107,26 @@ public class CheckCrossReferences extends ComplexTestCase {
public void checkField( com.sun.star.text.XTextField xField,
com.sun.star.beans.XPropertySet xProps,
short nFormat,
- String aExpectedFldResult ) {
+ String aExpectedFldResult )
+ throws com.sun.star.uno.Exception
+ {
// set requested format
- try {
- xProps.setPropertyValue("ReferenceFieldPart", new Short(nFormat));
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.beans.PropertyVetoException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
+ xProps.setPropertyValue("ReferenceFieldPart", new Short(nFormat));
+
// refresh fields in order to get new format applied
xFldsRefresh.refresh();
String aFldResult = xField.getPresentation( false );
- assure( "set reference field format doesn't result in correct field result",
- aFldResult.equals(aExpectedFldResult), true );
+ assertEquals( "set reference field format doesn't result in correct field result",
+ aExpectedFldResult, aFldResult);
}
- public void checkCrossReferences() throws com.sun.star.uno.Exception {
- // load test document
- try {
- XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
- xDoc = util.WriterTools.loadTextDoc( xMSF, util.utils.getFullTestURL("CheckCrossReferences.odt"));
- } catch(com.sun.star.uno.RuntimeException e) {
- System.out.println("Cannot load test document.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
-
+ @Test public void checkCrossReferences() throws com.sun.star.uno.Exception {
// setup paragraph enumeration
{
com.sun.star.container.XEnumerationAccess xParaEnumAccess =
(com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xDoc.getText());
+ com.sun.star.container.XEnumerationAccess.class, document.getText());
xParaEnum = xParaEnumAccess.createEnumeration();
}
@@ -195,7 +134,7 @@ public class CheckCrossReferences extends ComplexTestCase {
{
com.sun.star.text.XTextFieldsSupplier xFieldSupp =
(com.sun.star.text.XTextFieldsSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextFieldsSupplier.class, xDoc);
+ com.sun.star.text.XTextFieldsSupplier.class, document);
xFldsRefresh = (com.sun.star.util.XRefreshable)UnoRuntime.queryInterface(
com.sun.star.util.XRefreshable.class, xFieldSupp.getTextFields());
}
@@ -214,7 +153,6 @@ public class CheckCrossReferences extends ComplexTestCase {
com.sun.star.text.XTextField xField = null;
com.sun.star.beans.XPropertySet xProps = null;
- log.println( "Checking field reference formats NUMBER, NUMBER_NO_CONTEXT and NUMBER_FULL_CONTEXT for existing fields" );
xField = getNextField();
xProps = getFieldProps( xField );
checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult2 );
@@ -254,63 +192,36 @@ public class CheckCrossReferences extends ComplexTestCase {
// insert a certain cross-reference bookmark and a reference field to this bookmark
{
- log.println("Checking insert of cross-reference bookmark and corresponding reference field");
// restart paragraph enumeration
com.sun.star.container.XEnumerationAccess xParaEnumAccess =
(com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xDoc.getText());
+ com.sun.star.container.XEnumerationAccess.class, document.getText());
xParaEnum = xParaEnumAccess.createEnumeration();
// iterate on the paragraphs to find certain paragraph to insert the bookmark
com.sun.star.text.XTextRange xParaTextRange = null;
while ( xParaEnum.hasMoreElements() ) {
- try {
- xParaTextRange = (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
- com.sun.star.text.XTextRange.class, xParaEnum.nextElement());
- if ( xParaTextRange.getString().equals( "J" ) ) {
- break;
- }
- else {
- xParaTextRange = null;
- }
- } catch (com.sun.star.container.NoSuchElementException e) {
- System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
+ xParaTextRange = (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextRange.class, xParaEnum.nextElement());
+ if ( xParaTextRange.getString().equals( "J" ) ) {
+ break;
+ }
+ else {
+ xParaTextRange = null;
}
}
- if ( xParaTextRange == null ) {
- System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
- failed("Cannot find paragraph to insert cross-reference bookmark.");
- return;
- }
+ assertNotNull(
+ "Cannot find paragraph to insert cross-reference bookmark.",
+ xParaTextRange);
// insert bookmark
XMultiServiceFactory xFac = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, xDoc);
+ XMultiServiceFactory.class, document);
final String cBookmarkName = "__RefNumPara__47114711";
- com.sun.star.text.XTextContent xBookmark = null;
- try {
- xBookmark = (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class,
- xFac.createInstance( "com.sun.star.text.Bookmark" ) );
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- System.out.println("Cannot create bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.uno.Exception e) {
- System.out.println("Cannot create bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
+ com.sun.star.text.XTextContent xBookmark =
+ (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.Bookmark" ) );
if ( xBookmark != null ) {
com.sun.star.container.XNamed xName =
(com.sun.star.container.XNamed)UnoRuntime.queryInterface(
@@ -320,22 +231,10 @@ public class CheckCrossReferences extends ComplexTestCase {
}
// insert reference field, which references the inserted bookmark
- com.sun.star.text.XTextContent xNewField = null;
- try {
- xNewField = (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class,
- xFac.createInstance( "com.sun.star.text.TextField.GetReference" ) );
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- System.out.println("Cannot create new field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.uno.Exception e) {
- System.out.println("Cannot create new field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
+ com.sun.star.text.XTextContent xNewField =
+ (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.TextField.GetReference" ) );
if ( xNewField != null ) {
com.sun.star.beans.XPropertySet xFieldProps =
(com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
@@ -354,16 +253,39 @@ public class CheckCrossReferences extends ComplexTestCase {
com.sun.star.text.XTextField xField =
(com.sun.star.text.XTextField)UnoRuntime.queryInterface(
com.sun.star.text.XTextField.class, xNewField );
- assure( "inserted reference field doesn't has correct field result",
- xField.getPresentation( false ).equals("J"), true );
+ assertEquals( "inserted reference field doesn't has correct field result",
+ "J", xField.getPresentation( false ) );
xParaTextRange.getStart().setString( "Hallo new bookmark: " );
xFldsRefresh.refresh();
- assure( "inserted reference field doesn't has correct field result. Instead it's: "+xField.getPresentation( false ),
- xField.getPresentation( false ).equals("Hallo new bookmark: J"), true );
+ assertEquals( "inserted reference field doesn't has correct field result",
+ "Hallo new bookmark: J", xField.getPresentation( false ) );
}
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = util.WriterTools.loadTextDoc(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
+ TestDocument.getUrl("CheckCrossReferences.odt"));
+ }
- // closing test document
- util.DesktopTools.closeDoc( xDoc );
+ @After public void tearDownDocument() {
+ util.DesktopTools.closeDoc(document);
}
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/CheckFlies.java b/sw/qa/complex/writer/CheckFlies.java
index 50e94290c5b2..a65c01ec147d 100644
--- a/sw/qa/complex/writer/CheckFlies.java
+++ b/sw/qa/complex/writer/CheckFlies.java
@@ -38,43 +38,34 @@ import complexlib.ComplexTestCase;
import java.math.BigInteger;
import java.util.Collection;
import java.util.ArrayList;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
-public class CheckFlies extends ComplexTestCase {
- private XMultiServiceFactory m_xMsf = null;
- private XTextDocument m_xDoc = null;
-
- public String[] getTestMethodNames() {
- return new String[]{"checkFlies"};
- }
-
- public void checkFlies()
- throws com.sun.star.uno.Exception,
- com.sun.star.io.IOException
+public class CheckFlies {
+ @Test public void checkFlies()
+ throws com.sun.star.uno.Exception
{
- try {
- m_xMsf = (XMultiServiceFactory)param.getMSF();
- m_xDoc = util.WriterTools.loadTextDoc(m_xMsf, util.utils.getFullTestURL("CheckFlies.odt"));
- com.sun.star.text.XTextFramesSupplier xTFS = (com.sun.star.text.XTextFramesSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextFramesSupplier.class,
- m_xDoc);
- checkTextFrames(xTFS);
- com.sun.star.text.XTextGraphicObjectsSupplier xTGOS = (com.sun.star.text.XTextGraphicObjectsSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextGraphicObjectsSupplier.class,
- m_xDoc);
- checkGraphicFrames(xTGOS);
- com.sun.star.text.XTextEmbeddedObjectsSupplier xTEOS = (com.sun.star.text.XTextEmbeddedObjectsSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextEmbeddedObjectsSupplier.class,
- m_xDoc);
- checkEmbeddedFrames(xTEOS);
- } finally {
- // closing test document
- if(m_xDoc != null)
- util.DesktopTools.closeDoc(m_xDoc);
- }
+ com.sun.star.text.XTextFramesSupplier xTFS = (com.sun.star.text.XTextFramesSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextFramesSupplier.class,
+ document);
+ checkTextFrames(xTFS);
+ com.sun.star.text.XTextGraphicObjectsSupplier xTGOS = (com.sun.star.text.XTextGraphicObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextGraphicObjectsSupplier.class,
+ document);
+ checkGraphicFrames(xTGOS);
+ com.sun.star.text.XTextEmbeddedObjectsSupplier xTEOS = (com.sun.star.text.XTextEmbeddedObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextEmbeddedObjectsSupplier.class,
+ document);
+ checkEmbeddedFrames(xTEOS);
}
private void checkEmbeddedFrames(com.sun.star.text.XTextEmbeddedObjectsSupplier xTGOS)
- throws com.sun.star.lang.WrappedTargetException
+ throws com.sun.star.uno.Exception
{
Collection<String> vExpectedEmbeddedFrames = new ArrayList<String>();
vExpectedEmbeddedFrames.add("Object1");
@@ -82,51 +73,42 @@ public class CheckFlies extends ComplexTestCase {
com.sun.star.container.XNameAccess xEmbeddedFrames = xTGOS.getEmbeddedObjects();
for(String sFrameName : xEmbeddedFrames.getElementNames())
{
- if(!vExpectedEmbeddedFrames.remove(sFrameName))
- failed("Unexpected frame name");
- try
- {
- xEmbeddedFrames.getByName(sFrameName);
- }
- catch(com.sun.star.container.NoSuchElementException e)
- {
- failed("Could not get embedded frame by name.");
- }
- if(!xEmbeddedFrames.hasByName(sFrameName))
- failed("Could not find embedded frame by name.");
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedEmbeddedFrames.remove(sFrameName));
+ xEmbeddedFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find embedded frame by name.",
+ xEmbeddedFrames.hasByName(sFrameName));
}
- if(!vExpectedEmbeddedFrames.isEmpty())
- failed("Missing expected embedded frames.");
+ assertTrue(
+ "Missing expected embedded frames.",
+ vExpectedEmbeddedFrames.isEmpty());
try
{
xEmbeddedFrames.getByName("Nonexisting embedded frame");
- failed("Got nonexisting embedded frame");
+ fail("Got nonexisting embedded frame");
}
catch(com.sun.star.container.NoSuchElementException e)
{}
- if(xEmbeddedFrames.hasByName("Nonexisting embedded frame"))
- failed("Has nonexisting embedded frame");
+ assertFalse(
+ "Has nonexisting embedded frame",
+ xEmbeddedFrames.hasByName("Nonexisting embedded frame"));
com.sun.star.container.XIndexAccess xEmbeddedFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
com.sun.star.container.XIndexAccess.class,
xEmbeddedFrames);
- if(xEmbeddedFramesIdx.getCount() != nEmbeddedFrames)
- failed("Unexpected number of embedded frames reported.");
+ assertEquals(
+ "Unexpected number of embedded frames reported.", nEmbeddedFrames,
+ xEmbeddedFramesIdx.getCount());
for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xEmbeddedFramesIdx.getCount(); nCurrentFrameIdx++)
{
- try
- {
- xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e)
- {
- failed("Could not get embedded frame by index.");
- }
+ xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx);
}
}
private void checkGraphicFrames(com.sun.star.text.XTextGraphicObjectsSupplier xTGOS)
- throws com.sun.star.lang.WrappedTargetException
+ throws com.sun.star.uno.Exception
{
Collection<String> vExpectedGraphicFrames = new ArrayList<String>();
vExpectedGraphicFrames.add("graphics1");
@@ -134,51 +116,42 @@ public class CheckFlies extends ComplexTestCase {
com.sun.star.container.XNameAccess xGraphicFrames = xTGOS.getGraphicObjects();
for(String sFrameName : xGraphicFrames.getElementNames())
{
- if(!vExpectedGraphicFrames.remove(sFrameName))
- failed("Unexpected frame name");
- try
- {
- xGraphicFrames.getByName(sFrameName);
- }
- catch(com.sun.star.container.NoSuchElementException e)
- {
- failed("Could not get graphics frame by name.");
- }
- if(!xGraphicFrames.hasByName(sFrameName))
- failed("Could not find graphics frame by name.");
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedGraphicFrames.remove(sFrameName));
+ xGraphicFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find graphics frame by name.",
+ xGraphicFrames.hasByName(sFrameName));
}
- if(!vExpectedGraphicFrames.isEmpty())
- failed("Missing expected graphics frames.");
+ assertTrue(
+ "Missing expected graphics frames.",
+ vExpectedGraphicFrames.isEmpty());
try
{
xGraphicFrames.getByName("Nonexisting graphics frame");
- failed("Got nonexisting graphics frame");
+ fail("Got nonexisting graphics frame");
}
catch(com.sun.star.container.NoSuchElementException e)
{}
- if(xGraphicFrames.hasByName("Nonexisting graphics frame"))
- failed("Has nonexisting graphics frame");
+ assertFalse(
+ "Has nonexisting graphics frame",
+ xGraphicFrames.hasByName("Nonexisting graphics frame"));
com.sun.star.container.XIndexAccess xGraphicFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
com.sun.star.container.XIndexAccess.class,
xGraphicFrames);
- if(xGraphicFramesIdx.getCount() != nGraphicFrames)
- failed("Unexpected number of graphics frames reported.");
+ assertEquals(
+ "Unexpected number of graphics frames reported.", nGraphicFrames,
+ xGraphicFramesIdx.getCount());
for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xGraphicFramesIdx.getCount(); nCurrentFrameIdx++)
{
- try
- {
- xGraphicFramesIdx.getByIndex(nCurrentFrameIdx);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e)
- {
- failed("Could not get graphics frame by index.");
- }
+ xGraphicFramesIdx.getByIndex(nCurrentFrameIdx);
}
}
private void checkTextFrames(com.sun.star.text.XTextFramesSupplier xTFS)
- throws com.sun.star.lang.WrappedTargetException
+ throws com.sun.star.uno.Exception
{
Collection<String> vExpectedTextFrames = new ArrayList<String>();
vExpectedTextFrames.add("Frame1");
@@ -188,46 +161,62 @@ public class CheckFlies extends ComplexTestCase {
com.sun.star.container.XNameAccess xTextFrames = xTFS.getTextFrames();
for(String sFrameName : xTextFrames.getElementNames())
{
- if(!vExpectedTextFrames.remove(sFrameName))
- failed("Unexpected frame name");
- try
- {
- xTextFrames.getByName(sFrameName);
- }
- catch(com.sun.star.container.NoSuchElementException e)
- {
- failed("Could not get text frame by name.");
- }
- if(!xTextFrames.hasByName(sFrameName))
- failed("Could not find text frame by name.");
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedTextFrames.remove(sFrameName));
+ xTextFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find text frame by name.",
+ xTextFrames.hasByName(sFrameName));
}
- if(!vExpectedTextFrames.isEmpty())
- failed("Missing expected text frames.");
+ assertTrue(
+ "Missing expected text frames.", vExpectedTextFrames.isEmpty());
try
{
xTextFrames.getByName("Nonexisting Textframe");
- failed("Got nonexisting text frame.");
+ fail("Got nonexisting text frame.");
}
catch(com.sun.star.container.NoSuchElementException e)
{}
- if(xTextFrames.hasByName("Nonexisting text frame"))
- failed("Has nonexisting text frame.");
+ assertFalse(
+ "Has nonexisting text frame.",
+ xTextFrames.hasByName("Nonexisting text frame"));
com.sun.star.container.XIndexAccess xTextFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
com.sun.star.container.XIndexAccess.class,
xTextFrames);
- if(xTextFramesIdx.getCount() != nTextFrames)
- failed("Unexpected number of text frames reported.");
+ assertEquals(
+ "Unexpected number of text frames reported.", nTextFrames,
+ xTextFramesIdx.getCount());
for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xTextFramesIdx.getCount(); nCurrentFrameIdx++)
{
- try
- {
- xTextFramesIdx.getByIndex(nCurrentFrameIdx);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e)
- {
- failed("Could not get text frame by index.");
- }
+ xTextFramesIdx.getByIndex(nCurrentFrameIdx);
}
}
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = util.WriterTools.loadTextDoc(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
+ TestDocument.getUrl("CheckFlies.odt"));
+ }
+
+ @After public void tearDownDocument() {
+ util.DesktopTools.closeDoc(document);
+ }
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
index aca4f68c7ec2..c381cd5825c4 100644
--- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
@@ -27,53 +27,31 @@
package complex.writer;
-import complexlib.ComplexTestCase;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.XInterface;
import com.sun.star.beans.PropertyValue;
import com.sun.star.container.XIndexContainer;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.Type;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
* Test the com.sun.star.document.IndexedPropertyValues service
*/
-public class CheckIndexedPropertyValues extends ComplexTestCase {
+public class CheckIndexedPropertyValues {
+ @Test public void checkIndexedPropertyValues()
+ throws com.sun.star.uno.Exception
+ {
+ XIndexContainer xCont = UnoRuntime.queryInterface(
+ XIndexContainer.class,
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.IndexedPropertyValues",
+ connection.getComponentContext())));
- private final String testedServiceName =
- "com.sun.star.document.IndexedPropertyValues";
- public String[] getTestMethodNames() {
- return new String[]{"checkIndexedPropertyValues"};
- }
-
-/* public String getTestObjectName() {
- return testedServiceName;
- }
-*/
- public void checkIndexedPropertyValues() {
- Object oObj = null;
- try {
- // print information about the service
- XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
- oObj = xMSF.createInstance(testedServiceName);
- System.out.println("****************");
- System.out.println("Service Name:");
- util.dbg.getSuppServices(oObj);
- System.out.println("****************");
- System.out.println("Interfaces:");
- util.dbg.printInterfaces((XInterface)oObj, true);
- }
- catch(com.sun.star.uno.Exception e) {
- System.out.println("Cannot create object.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
- XIndexContainer xCont = (XIndexContainer)UnoRuntime.queryInterface(
- XIndexContainer.class, oObj);
-
- assure("XIndexContainer was queried but returned null.",
- (xCont != null));
+ assertNotNull("XIndexContainer was queried but returned null.", xCont);
PropertyValue[] prop1 = new PropertyValue[1];
prop1[0] = new PropertyValue();
prop1[0].Name = "Jupp";
@@ -84,99 +62,55 @@ public class CheckIndexedPropertyValues extends ComplexTestCase {
prop2[0].Name = "Horst";
prop2[0].Value = "BadGuy";
- try {
- Type t = xCont.getElementType();
- log.println("Insertable Type: " + t.getTypeName());
- assure("Initial container is not empty: " + xCont.getCount(), xCont.getCount()==0);
- log.println("Inserting a PropertyValue.");
- xCont.insertByIndex(0, prop1);
- PropertyValue[]ret = (PropertyValue[])xCont.getByIndex(0);
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop1[0].Name) &&
- ret[0].Value.equals(prop1[0].Value));
- log.println("Replace the PropertyValue.");
- xCont.replaceByIndex(0, prop2);
- ret = (PropertyValue[])xCont.getByIndex(0);
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop2[0].Name) &&
- ret[0].Value.equals(prop2[0].Value));
- log.println("Remove the PropertyValue.");
- xCont.removeByIndex(0);
- assure("Could not remove PropertyValue.",
- !xCont.hasElements() && xCont.getCount()==0);
- log.println("Insert again.");
- xCont.insertByIndex(0, prop1);
- xCont.insertByIndex(1, prop2);
- assure("Did not insert PropertyValue.",
- xCont.hasElements() && xCont.getCount()==2);
-
- try {
- log.println("Insert with wrong index.");
- xCont.insertByIndex(25, prop2);
- failed("IllegalArgumentException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
-
- try {
- log.println("Remove non-existing index.");
- xCont.removeByIndex(25);
- failed("IndexOutOfBoundsException was not thrown.");
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
-
- try {
- log.println("Insert wrong argument.");
- xCont.insertByIndex(2, "Example String");
- failed("IllegalArgumentException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Expected exception thrown: " + e);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
+ Type t = xCont.getElementType();
+ assertEquals("Initial container is not empty", 0, xCont.getCount());
+ xCont.insertByIndex(0, prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByIndex(0);
+ assertEquals(prop1[0].Name, ret[0].Name);
+ assertEquals(prop1[0].Value, ret[0].Value);
+ xCont.replaceByIndex(0, prop2);
+ ret = (PropertyValue[])xCont.getByIndex(0);
+ assertEquals(prop2[0].Name, ret[0].Name);
+ assertEquals(prop2[0].Value, ret[0].Value);
+ xCont.removeByIndex(0);
+ assertTrue("Could not remove PropertyValue.",
+ !xCont.hasElements() && xCont.getCount()==0);
+ xCont.insertByIndex(0, prop1);
+ xCont.insertByIndex(1, prop2);
+ assertTrue("Did not insert PropertyValue.",
+ xCont.hasElements() && xCont.getCount()==2);
+ try {
+ xCont.insertByIndex(25, prop2);
+ fail("IllegalArgumentException was not thrown.");
}
- catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
- e.printStackTrace();
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ }
+
+ try {
+ xCont.removeByIndex(25);
+ fail("IndexOutOfBoundsException was not thrown.");
}
catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- failed(e.getMessage());
- e.printStackTrace();
}
- catch(com.sun.star.lang.WrappedTargetException e) {
- failed(e.getMessage());
- e.printStackTrace();
+
+ try {
+ xCont.insertByIndex(2, "Example String");
+ fail("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
}
}
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java
index 851381cf3c24..b2541954ce9f 100644
--- a/sw/qa/complex/writer/CheckNamedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java
@@ -27,53 +27,31 @@
package complex.writer;
-
-import complexlib.ComplexTestCase;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.XInterface;
import com.sun.star.container.XNameContainer;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.Type;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
*
*/
-public class CheckNamedPropertyValues extends ComplexTestCase {
-
- private final String testedServiceName =
- "com.sun.star.document.NamedPropertyValues";
-
- public String[] getTestMethodNames() {
- return new String[]{"checkNamedPropertyValues"};
- }
-
-/* public String getTestObjectName() {
- return "complex.writer.CheckNamedPropertyValues";
- } */
-
- public void checkNamedPropertyValues() {
- Object oObj = null;
- try {
- XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
- oObj = xMSF.createInstance(testedServiceName);
- System.out.println("****************");
- System.out.println("Service Name:");
- util.dbg.getSuppServices(oObj);
- System.out.println("****************");
- System.out.println("Interfaces:");
- util.dbg.printInterfaces((XInterface)oObj, true);
- }
- catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
- XNameContainer xCont = (XNameContainer)UnoRuntime.queryInterface(
- XNameContainer.class, oObj);
-
- assure("XNameContainer was queried but returned null.",
- (xCont != null));
+public class CheckNamedPropertyValues {
+ @Test public void checkNamedPropertyValues()
+ throws com.sun.star.uno.Exception
+ {
+ XNameContainer xCont = UnoRuntime.queryInterface(
+ XNameContainer.class,
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.NamedPropertyValues",
+ connection.getComponentContext())));
+
+ assertNotNull("XNameContainer was queried but returned null.", xCont);
PropertyValue[] prop1 = new PropertyValue[1];
prop1[0] = new PropertyValue();
prop1[0].Name = "Jupp";
@@ -84,113 +62,61 @@ public class CheckNamedPropertyValues extends ComplexTestCase {
prop2[0].Name = "Horst";
prop2[0].Value = "BadGuy";
- try {
- Type t = xCont.getElementType();
- log.println("Insertable Type: " + t.getTypeName());
- assure("Initial container is not empty.", !xCont.hasElements());
-
- log.println("Insert a PropertyValue.");
- xCont.insertByName("prop1", prop1);
- PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop1[0].Name) &&
- ret[0].Value.equals(prop1[0].Value));
- log.println("Replace the PropertyValue.");
- xCont.replaceByName("prop1", prop2);
- ret = (PropertyValue[])xCont.getByName("prop1");
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop2[0].Name) &&
- ret[0].Value.equals(prop2[0].Value));
- log.println("Remove the PropertyValue.");
- xCont.removeByName("prop1");
- assure("Could not remove PropertyValue.", !xCont.hasElements());
- log.println("Insert again.");
- xCont.insertByName("prop1", prop1);
- xCont.insertByName("prop2", prop2);
- assure("Did not insert PropertyValue.", xCont.hasElements());
- String[] names = xCont.getElementNames();
- int count = 0;
- for (int i=0; i<names.length; i++) {
- if (names[i].equals("prop1") || names[i].equals("prop2"))
- count++;
- else
- failed("Got a wrong element name: "+names[i]);
- }
- if (count != 2)
- failed("Not all element names were returned.");
-
- try {
- log.println("Insert PropertyValue with an existing name.");
- xCont.insertByName("prop2", prop1);
- failed("ElementExistException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.container.ElementExistException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
-
- try {
- log.println("Inserting a wrong argument.");
- xCont.insertByName("prop3", "Example String");
- failed("IllegalArgumentException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.container.ElementExistException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
+ Type t = xCont.getElementType();
+ assertFalse("Initial container is not empty.", xCont.hasElements());
+
+ xCont.insertByName("prop1", prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
+ assertEquals(prop1[0].Name, ret[0].Name);
+ assertEquals(prop1[0].Value, ret[0].Value);
+ xCont.replaceByName("prop1", prop2);
+ ret = (PropertyValue[])xCont.getByName("prop1");
+ assertEquals(prop2[0].Name, ret[0].Name);
+ assertEquals(prop2[0].Value, ret[0].Value);
+ xCont.removeByName("prop1");
+ assertFalse("Could not remove PropertyValue.", xCont.hasElements());
+ xCont.insertByName("prop1", prop1);
+ xCont.insertByName("prop2", prop2);
+ assertTrue("Did not insert PropertyValue.", xCont.hasElements());
+ String[] names = xCont.getElementNames();
+ assertEquals("Not all element names were returned.", 2, names.length);
+ for (int i=0; i<names.length; i++) {
+ assertTrue(
+ "Got a wrong element name",
+ names[i].equals("prop1") || names[i].equals("prop2"));
+ }
- try {
- log.println("Remove a non-existing element.");
- xCont.removeByName("prop3");
- failed("NoSuchElementException was not thrown.");
- }
- catch(com.sun.star.container.NoSuchElementException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
+ try {
+ xCont.insertByName("prop2", prop1);
+ fail("ElementExistException was not thrown.");
+ }
+ catch(com.sun.star.container.ElementExistException e) {
+ }
+ try {
+ xCont.insertByName("prop3", "Example String");
+ fail("IllegalArgumentException was not thrown.");
}
catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
- e.printStackTrace();
}
- catch(com.sun.star.container.ElementExistException e) {
- failed(e.getMessage());
- e.printStackTrace();
+
+ try {
+ xCont.removeByName("prop3");
+ fail("NoSuchElementException was not thrown.");
}
catch(com.sun.star.container.NoSuchElementException e) {
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- failed(e.getMessage());
- e.printStackTrace();
}
}
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java
new file mode 100644
index 000000000000..a1600488c7bc
--- /dev/null
+++ b/sw/qa/complex/writer/LoadSaveTest.java
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import complexlib.ComplexTestCase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.lang.WrappedTargetRuntimeException;
+import com.sun.star.lang.EventObject;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.Pair;
+import com.sun.star.util.XCloseable;
+import com.sun.star.frame.XStorable;
+import com.sun.star.document.DocumentEvent;
+import com.sun.star.document.XDocumentEventBroadcaster;
+import com.sun.star.document.XDocumentEventListener;
+import com.sun.star.text.XTextDocument;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * a small program to load documents from one directory (recursively)
+ * and store them in another, implemented as a complex test.
+ */
+public class LoadSaveTest extends ComplexTestCase
+{
+ private XMultiServiceFactory m_xMSF = null;
+ private XComponentContext m_xContext = null;
+ private XDocumentEventBroadcaster m_xGEB = null;
+ private String m_TmpDir = null;
+
+ private String m_fileURL = "file://";
+ // these should be parameters or something?
+ private String m_SourceDir = "FIXME";
+ private String m_TargetDir = "/tmp/out";
+
+ public String[] getTestMethodNames() {
+ return new String[] { "testLoadStore" };
+ }
+
+ public void before() throws Exception
+ {
+ m_xMSF = (XMultiServiceFactory) param.getMSF();
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
+ Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
+ m_xContext = (XComponentContext)
+ UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assure("could not get component context.", m_xContext != null);
+ Object oGEB = m_xMSF.createInstance(
+ "com.sun.star.frame.GlobalEventBroadcaster");
+ m_xGEB = (XDocumentEventBroadcaster)
+ UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, oGEB);
+ assure("could not get global event broadcaster.", m_xGEB != null);
+ m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ log.println("tempdir: " + m_TmpDir);
+ log.println("sourcedir: " + m_SourceDir);
+ log.println("targetdir: " + m_TargetDir);
+ }
+
+ /*
+ public void after()
+ {
+ }
+ */
+
+ public void testLoadStore() throws Exception
+ {
+ Pair<List<String>, List<String>> dirsFiles =
+ getDirAndFileNames(m_SourceDir);
+ makeDirs(m_TargetDir, dirsFiles.First);
+ for (String fileName : dirsFiles.Second)
+ {
+ try {
+ testDoc(fileName);
+ } catch (Exception e) {
+ report(e);
+ }
+ }
+ }
+
+ public void testDoc(String fileName) throws Exception
+ {
+ XComponent xDoc = null;
+ EventListener xListener = new EventListener();
+ try {
+ m_xGEB.addDocumentEventListener(xListener);
+
+ log.println("Loading document: " + fileName + " ...");
+
+ PropertyValue[] loadProps = new PropertyValue[1];
+ loadProps[0] = new PropertyValue();
+ loadProps[0].Name = "ReadOnly";
+ loadProps[0].Value = new Boolean(true);
+
+ String sourceFile = m_fileURL + m_SourceDir + fileName;
+
+ xDoc = util.DesktopTools.loadDoc(m_xMSF, sourceFile, loadProps);
+
+ log.println("... done");
+
+ {
+ // apparently OnLayoutFinished is not sent for every doc???
+ // 10 seconds is evidently not enough for large documents
+ int time = 0;
+ while (!xListener.IsLayoutFinished() && (time < 30000)) {
+ Thread.sleep(100);
+ time += 100;
+ }
+ if (time >= 30000) {
+ log.println("timeout: no OnLayoutFinished received!");
+ }
+ }
+
+ log.println("Storing document: " + fileName + " ...");
+
+ XStorable xStor = (XStorable) UnoRuntime.queryInterface(
+ XStorable.class, xDoc);
+
+ String targetFile = m_fileURL + m_TargetDir + fileName;
+
+ xStor.storeToURL(targetFile, new PropertyValue[0]);
+
+ log.println("... done");
+
+ } finally {
+ if (xDoc != null) {
+ util.DesktopTools.closeDoc(xDoc);
+ }
+ if (xListener != null) {
+ m_xGEB.removeDocumentEventListener(xListener);
+ }
+ }
+ }
+
+ class EventListener implements XDocumentEventListener
+ {
+ boolean m_isLayoutFinished = false;
+ boolean IsLayoutFinished() { return m_isLayoutFinished; }
+ public void documentEventOccured(DocumentEvent Event)
+ {
+// log.println("event: " + Event.EventName);
+ if ("OnLayoutFinished".equals(Event.EventName))
+ {
+ // we only have one doc at any time, so no need to check
+ m_isLayoutFinished = true;
+// log.println("received OnLayoutFinished");
+ }
+ }
+ public void disposing(EventObject Event) { }
+ }
+
+ void report2(Exception e)
+ {
+ if (e instanceof WrappedTargetException)
+ {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ } else if (e instanceof WrappedTargetRuntimeException) {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetRuntimeException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ }
+ }
+
+ void report(Exception e) {
+ log.println("Exception occurred:");
+ log.println(e.toString());
+ e.printStackTrace((java.io.PrintWriter) log);
+ report2(e);
+// failed();
+ }
+
+ Pair<List<String>, List<String>> getDirAndFileNames(String dir)
+ {
+ List<String> dirs = new ArrayList<String>();
+ List<String> files = new ArrayList<String>();
+ File root = new File(dir);
+ getDirAndFileNames(root, "", dirs, files);
+ return new Pair<List<String>, List<String>>(dirs, files);
+ }
+
+ void getDirAndFileNames(File file, String relPath,
+ List<String> dirs, List<String> files)
+ {
+ assure("does not exist: " + relPath, file.exists());
+ if (file.isDirectory()) {
+ dirs.add(relPath);
+ File[] subfiles = file.listFiles();
+ for (File subfile : subfiles)
+ {
+ String subfileName =
+ relPath + File.separator + subfile.getName();
+ getDirAndFileNames(subfile, subfileName, dirs, files);
+ }
+ }
+ else if (file.isFile()) {
+ if (file.getName().endsWith(".odt")) {
+ files.add(relPath);
+ }
+ }
+ }
+
+ void makeDirs(String target, List<String> dirs) throws Exception
+ {
+ for (String dir : dirs) {
+ File f = new File(target + dir);
+ if (!f.exists()) {
+ if (!f.mkdir()) {
+ throw new Exception("cannot mkdir: " + target + dir);
+ }
+ }
+ }
+ }
+}
+
diff --git a/sw/qa/complex/writer/TestDocument.java b/sw/qa/complex/writer/TestDocument.java
new file mode 100644
index 000000000000..25a11338ae5c
--- /dev/null
+++ b/sw/qa/complex/writer/TestDocument.java
@@ -0,0 +1,39 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.writer;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+
+final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File("testdocuments", name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
index 2eda02bfa518..114359bc3581 100644
--- a/sw/qa/complex/writer/TextPortionEnumerationTest.java
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
@@ -27,7 +27,6 @@
package complex.writer;
-import complexlib.ComplexTestCase;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.XComponentContext;
@@ -70,6 +69,13 @@ import com.sun.star.rdf.XMetadatable;
import com.sun.star.rdf.Statement;
import com.sun.star.rdf.XDocumentRepository;
import com.sun.star.rdf.XRepositorySupplier;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
import java.util.Map;
import java.util.HashMap;
@@ -432,10 +438,8 @@ class FuzzyTester
private Stack<Pair<TreeNode, TreeNodeEnum>> m_StackActual;
private List<TreeNode> m_BufferExpected;
private List<TreeNode> m_BufferActual;
- private share.LogWriter m_Log;
- FuzzyTester(share.LogWriter log) {
- m_Log = log;
+ FuzzyTester() {
m_BufferExpected = new ArrayList<TreeNode>();
m_BufferActual = new ArrayList<TreeNode>();
m_StackExpected = new Stack<Pair<TreeNode, TreeNodeEnum>>();
@@ -444,12 +448,10 @@ class FuzzyTester
/** idea: traverse both trees, enumerate nodes, stopping at content nodes.
then compare buffers. */
- boolean doTest(TreeNode expected, TreeNode actual)
+ void doTest(TreeNode expected, TreeNode actual)
{
- if (!expected.getType().equals("__ROOT__"))
- throw new RuntimeException("doTest: expected: root");
- if (!actual.getType().equals("__ROOT__"))
- throw new RuntimeException("doTest: actual: root");
+ assertEquals("__ROOT__", expected.getType());
+ assertEquals("__ROOT__", actual.getType());
m_StackExpected.push(new Pair(expected, expected.createEnumeration()));
m_StackActual.push(new Pair(actual, actual.createEnumeration()));
do {
@@ -459,18 +461,19 @@ class FuzzyTester
testBuffer();
} while (!m_StackExpected.empty() || !m_StackActual.empty());
if (m_DiffSequence != 0) {
- m_Log.println("warning: " + m_DiffSequence
+ System.out.println("warning: " + m_DiffSequence
+ " differences in sequence");
}
if (m_DiffSpuriousEmptyText != 0) {
- m_Log.println("warning: " + m_DiffSpuriousEmptyText
+ System.out.println("warning: " + m_DiffSpuriousEmptyText
+ " spurious empty text nodes");
}
if (m_DiffNesting != 0) {
- m_Log.println("WARNING: " + m_DiffNesting
+ System.out.println("WARNING: " + m_DiffNesting
+ " differences in nesting");
}
- return (m_DiffContent == 0) && (m_DiffMissing == 0);
+ assertEquals(0, m_DiffContent);
+ assertEquals(0, m_DiffMissing);
}
private void traverse(Stack<Pair<TreeNode, TreeNodeEnum>> stack,
@@ -563,7 +566,7 @@ class FuzzyTester
}
m_BufferActual.set(j, null);
} else {
-//m_Log.println("testBuffer:");
+//System.out.println("testBuffer:");
printMissing(node);
m_DiffMissing++;
}
@@ -573,7 +576,7 @@ class FuzzyTester
TreeNode node = m_BufferActual.get(j);
if (node != null)
{
-//m_Log.println("testBuffer:");
+//System.out.println("testBuffer:");
printUnexpected(node);
if ((node instanceof TextNode) &&
((TextNode) node).getContent().length() == 0) {
@@ -590,25 +593,25 @@ class FuzzyTester
void printDiff(String prefix, String expected, String actual)
{
- m_Log.println(prefix +
+ System.out.println(prefix +
":\texpected: " + expected + "\tactual: " + actual);
}
void printNesting(TreeNode node, TreeNode nesting)
{
- m_Log.println("node: " + node.toString()
+ System.out.println("node: " + node.toString()
+ " possibly moved across nesting " + nesting.toString());
}
void printMissing(TreeNode node)
{
- m_Log.println(" missing node: " + node.toString());
+ System.out.println(" missing node: " + node.toString());
}
void printUnexpected(TreeNode node)
{
- m_Log.println("unexpected node: " + node.toString());
+ System.out.println("unexpected node: " + node.toString());
}
}
@@ -619,10 +622,9 @@ class FuzzyTester
class EnumConverter
{
private Stack<TreeNode> m_Stack;
- TextPortionEnumerationTest m_T;
- EnumConverter(TextPortionEnumerationTest err) {
- m_Stack = new Stack<TreeNode>(); m_T = err;
+ EnumConverter() {
+ m_Stack = new Stack<TreeNode>();
}
TreeNode convert(XEnumeration xEnum) throws Exception
@@ -630,7 +632,7 @@ class EnumConverter
TreeNode root = new TreeNode();
m_Stack.push(root);
TreeNode ret = convertChildren(xEnum);
- m_T.assure("EnumConverter.convert: stack", m_Stack.empty());
+ assertTrue("EnumConverter.convert: stack", m_Stack.empty());
return ret;
}
@@ -670,7 +672,7 @@ class EnumConverter
xMeta);
XEnumeration xEnumChildren = xEA.createEnumeration();
TreeNode node2 = convertChildren(xEnumChildren);
- m_T.assure("stack error: meta-field", node == node2);
+ assertSame("stack error: meta-field", node2, node);
} else {
XPropertySet xFieldPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xField);
@@ -678,7 +680,7 @@ class EnumConverter
xFieldPropSet.getPropertyValue("Content");
boolean isFixed = (Boolean)
xFieldPropSet.getPropertyValue("IsFixed");
- m_T.assure("field not fixed?", isFixed);
+ assertTrue("field not fixed?", isFixed);
node = new TextFieldNode(content);
}
} else if (type.equals("Footnote")) {
@@ -781,10 +783,8 @@ class EnumConverter
continue;
} else {
node = m_Stack.pop();
- m_T.assure("stack error: Ruby expected; is: " +
- node.toString(), node instanceof RubyNode);
-// m_T.assure("stack error: ruby",
-// ruby.equals(((RubyNode)node).getRubyText()));
+ assertTrue("stack error: Ruby expected; is: " +
+ node.toString(), node instanceof RubyNode);
}
} else if (type.equals("InContentMetadata")) {
Object xMeta = xPropSet.getPropertyValue("InContentMetadata");
@@ -797,9 +797,7 @@ class EnumConverter
UnoRuntime.queryInterface(XEnumerationAccess.class, xMeta);
XEnumeration xEnumChildren = xEA.createEnumeration();
TreeNode node2 = convertChildren(xEnumChildren);
- m_T.assure("stack error: meta", node == node2);
-// } else if (type.equals("MetadataField")) {
-// Object xMeta = xPropSet.getPropertyValue("MetadataField");
+ assertSame("stack error: meta", node2, node);
} else {
throw new RuntimeException("unexpected type: " + type);
}
@@ -1240,7 +1238,7 @@ class RangeInserter extends Inserter
//----------------------------------------------------------------------
-public class TextPortionEnumerationTest extends ComplexTestCase
+public class TextPortionEnumerationTest
{
private XMultiServiceFactory m_xMSF = null;
private XComponentContext m_xContext = null;
@@ -1249,115 +1247,28 @@ public class TextPortionEnumerationTest extends ComplexTestCase
private int m_Count = 1;
-// public String[] getTestMethodNames() { return new String[] { "testLoadStore" }; }
- public String[] getTestMethodNames() {
- return new String[] {
- "testText",
- "testTextField",
-// "testControlChar",
-// "testSoftPageBreak",
- "testFootnote",
- "testFrameAs",
- "testFrameAt",
- "testBookmarkPoint",
- "testBookmark",
- "testBookmarkPointXmlId",
- "testBookmarkXmlId",
- "testRefmarkPoint",
- "testRefmark",
- "testToxmarkPoint",
- "testToxmark",
- "testHyperlink",
- "testHyperlinkEmpty",
- "testRuby",
- "testRubyEmpty",
- "testMeta",
- "testMetaEmpty",
- "testMetaField",
- "testMetaFieldEmpty",
- "testBookmark1",
- "testBookmark2",
- "testRefMark2",
- "testRefMark3",
- "testToxMark2",
- "testToxMark3",
- "testMarks1",
- "testMarks2",
- "testMarks3",
- "testFrameMark1",
- "testFrameMark2",
- "testFrameMark3",
- "testFrameMark4",
- "testFrames1",
- "testFrames2",
- "testFrames3",
- "testFrames4",
- "testFrames5",
- "testRubyHyperlink1",
- "testRubyHyperlink2",
- "testEnd1",
- "testEnd2",
- "testEnd3",
- "testEnd4",
- "testEnd5",
- "testEmpty1",
- "testEmpty2",
- "testEmpty3",
- "test1",
- "testRange1",
- "testRangeHyperlinkHyperlink",
- "testRangeHyperlinkRuby",
- "testRangeRubyHyperlink",
- "testRangeRubyRuby",
- "testRangeHyperlinkMeta",
- "testRangeRubyMeta",
- "testRangeMetaHyperlink",
- "testRangeMetaRuby",
- "testRangeMetaMeta",
- "testRange2",
- "testRange3",
- "testRange4",
- "testRange5",
- "testRange6",
- "testRange7",
- "testMetaXChild",
- "testMetaXText",
- "testMetaXTextCursor",
- "testMetaXTextAttachToxMark",
- "testMetaXTextAttachRefMark",
- "testMetaXTextAttachTextField",
- "testMetaXTextAttachFootnote",
- "testMetaXTextAttachMeta",
- "testMetaFieldXTextField",
- "testMetaFieldXPropertySet",
- "testLoadStore",
- "testLoadStoreXmlid",
- };
- }
-
- public void before() throws Exception
+ @Before public void before() throws Exception
{
- m_xMSF = (XMultiServiceFactory) param.getMSF();
+ m_xMSF = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
XPropertySet xPropertySet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
m_xContext = (XComponentContext)
UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
- assure("could not get component context.", m_xContext != null);
+ assertNotNull("could not get component context.", m_xContext);
m_xDoc = util.WriterTools.createTextDoc(m_xMSF);
m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
- log.println("tempdir: " + m_TmpDir);
+ System.out.println("tempdir: " + m_TmpDir);
}
- public void after()
+ @After public void after()
{
- if (m_xDoc != null) {
- util.DesktopTools.closeDoc(m_xDoc);
- m_xDoc = null;
- }
+ util.DesktopTools.closeDoc(m_xDoc);
}
- public void testText() throws Exception
+ @Test public void testText() throws Exception
{
TreeNode root = new TreeNode();
TreeNode text = new TextNode("abc");
@@ -1365,7 +1276,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testTextField() throws Exception
+ @Test public void testTextField() throws Exception
{
String name = mkName("ruby");
TreeNode root = new TreeNode();
@@ -1374,7 +1285,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testControlChar() throws Exception
+ /*@Test*/ public void testControlChar() throws Exception
{
//FIXME this is converted to a text portion: ControlCharacter is obsolete
TreeNode root = new TreeNode();
@@ -1383,7 +1294,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testSoftPageBreak() throws Exception
+ /*@Test*/ public void testSoftPageBreak() throws Exception
{
//FIXME: insert a soft page break: not done
TreeNode root = new TreeNode();
@@ -1394,7 +1305,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFootnote() throws Exception
+ @Test public void testFootnote() throws Exception
{
String name = mkName("ftn");
TreeNode root = new TreeNode();
@@ -1403,7 +1314,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameAs() throws Exception
+ @Test public void testFrameAs() throws Exception
{
String name = mkName("frame");
TreeNode root = new TreeNode();
@@ -1412,7 +1323,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameAt() throws Exception
+ @Test public void testFrameAt() throws Exception
{
String name = mkName("frame");
TreeNode root = new TreeNode();
@@ -1423,7 +1334,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmarkPoint() throws Exception
+ @Test public void testBookmarkPoint() throws Exception
{
String name = mkName("mark");
TreeNode root = new TreeNode();
@@ -1434,7 +1345,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmark() throws Exception
+ @Test public void testBookmark() throws Exception
{
String name = mkName("mark");
TreeNode root = new TreeNode();
@@ -1447,7 +1358,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmarkPointXmlId() throws Exception
+ @Test public void testBookmarkPointXmlId() throws Exception
{
String name = mkName("mark");
StringPair id = mkId("id");
@@ -1459,7 +1370,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmarkXmlId() throws Exception
+ @Test public void testBookmarkXmlId() throws Exception
{
String name = mkName("mark");
StringPair id = mkId("id");
@@ -1473,7 +1384,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefmarkPoint() throws Exception
+ @Test public void testRefmarkPoint() throws Exception
{
String name = mkName("refmark");
TreeNode root = new TreeNode();
@@ -1484,7 +1395,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefmark() throws Exception
+ @Test public void testRefmark() throws Exception
{
String name = mkName("refmark");
TreeNode root = new TreeNode();
@@ -1497,7 +1408,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxmarkPoint() throws Exception
+ @Test public void testToxmarkPoint() throws Exception
{
String name = mkName("toxmark");
TreeNode root = new TreeNode();
@@ -1508,7 +1419,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxmark() throws Exception
+ @Test public void testToxmark() throws Exception
{
String name = mkName("toxmark");
TreeNode root = new TreeNode();
@@ -1521,7 +1432,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testHyperlink() throws Exception
+ @Test public void testHyperlink() throws Exception
{
String name = mkName("url");
TreeNode root = new TreeNode();
@@ -1532,7 +1443,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testHyperlinkEmpty() throws Exception
+ @Test public void testHyperlinkEmpty() throws Exception
{
String name = mkName("url");
TreeNode root = new TreeNode();
@@ -1543,7 +1454,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRuby() throws Exception
+ @Test public void testRuby() throws Exception
{
String name = mkName("ruby");
TreeNode root = new TreeNode();
@@ -1554,7 +1465,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRubyEmpty() throws Exception
+ @Test public void testRubyEmpty() throws Exception
{
// BUG: #i91534#
String name = mkName("ruby");
@@ -1564,7 +1475,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMeta() throws Exception
+ @Test public void testMeta() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1576,7 +1487,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMetaEmpty() throws Exception
+ @Test public void testMetaEmpty() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1587,7 +1498,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMetaField() throws Exception
+ @Test public void testMetaField() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1599,7 +1510,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMetaFieldEmpty() throws Exception
+ @Test public void testMetaFieldEmpty() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1610,7 +1521,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmark1() throws Exception
+ @Test public void testBookmark1() throws Exception
{
String name1 = mkName("mark");
String name2 = mkName("mark");
@@ -1626,7 +1537,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmark2() throws Exception
+ @Test public void testBookmark2() throws Exception
{
String name1 = mkName("mark");
String name2 = mkName("mark");
@@ -1642,7 +1553,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefMark2() throws Exception
+ @Test public void testRefMark2() throws Exception
{
String name1 = mkName("refmark");
TreeNode root = new TreeNode();
@@ -1654,7 +1565,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefMark3() throws Exception
+ @Test public void testRefMark3() throws Exception
{
// BUG: #i107672# (non-deterministic; depends on pointer ordering)
String name1 = mkName("refmark");
@@ -1684,7 +1595,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxMark2() throws Exception
+ @Test public void testToxMark2() throws Exception
{
String name1 = mkName("toxmark");
TreeNode root = new TreeNode();
@@ -1695,7 +1606,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxMark3() throws Exception
+ @Test public void testToxMark3() throws Exception
{
// BUG: #i107672# (non-deterministic; depends on pointer ordering)
String name1 = mkName("toxmark");
@@ -1725,7 +1636,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMarks1() throws Exception
+ @Test public void testMarks1() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("toxmark");
@@ -1744,7 +1655,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMarks2() throws Exception
+ @Test public void testMarks2() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("refmark");
@@ -1767,7 +1678,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMarks3() throws Exception
+ @Test public void testMarks3() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("refmark");
@@ -1789,7 +1700,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark1() throws Exception
+ @Test public void testFrameMark1() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("frame");
@@ -1801,7 +1712,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark2() throws Exception
+ @Test public void testFrameMark2() throws Exception
{
// BUG: #i98530#
String name1 = mkName("bookmark");
@@ -1814,7 +1725,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark3() throws Exception
+ @Test public void testFrameMark3() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("bookmark");
@@ -1826,7 +1737,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark4() throws Exception
+ @Test public void testFrameMark4() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("bookmark");
@@ -1838,7 +1749,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames1() throws Exception
+ @Test public void testFrames1() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1850,7 +1761,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames2() throws Exception
+ @Test public void testFrames2() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1862,7 +1773,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames3() throws Exception
+ @Test public void testFrames3() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1874,7 +1785,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames4() throws Exception
+ @Test public void testFrames4() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1886,7 +1797,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames5() throws Exception
+ @Test public void testFrames5() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1898,7 +1809,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRubyHyperlink1() throws Exception
+ @Test public void testRubyHyperlink1() throws Exception
{
String name1 = mkName("ruby");
String name2 = mkName("url");
@@ -1911,7 +1822,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRubyHyperlink2() throws Exception
+ @Test public void testRubyHyperlink2() throws Exception
{
String name1 = mkName("url");
String name2 = mkName("ruby");
@@ -1924,7 +1835,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd1() throws Exception
+ @Test public void testEnd1() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("toxmark");
@@ -1937,7 +1848,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd2() throws Exception
+ @Test public void testEnd2() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("frame");
@@ -1954,7 +1865,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd3() throws Exception
+ @Test public void testEnd3() throws Exception
{
String name1 = mkName("ftn");
String name2 = mkName("toxmark");
@@ -1965,7 +1876,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd4() throws Exception
+ @Test public void testEnd4() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("frame");
@@ -1977,7 +1888,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd5() throws Exception
+ @Test public void testEnd5() throws Exception
{
String name1 = mkName("refmark");
String name2 = mkName("ruby");
@@ -1991,7 +1902,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEmpty1() throws Exception
+ @Test public void testEmpty1() throws Exception
{
String name1 = mkName("refmark");
String name2 = mkName("toxmark");
@@ -2013,7 +1924,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEmpty2() throws Exception
+ @Test public void testEmpty2() throws Exception
{
String name3 = mkName("bookmark");
String name4 = mkName("frame");
@@ -2027,7 +1938,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEmpty3() throws Exception
+ @Test public void testEmpty3() throws Exception
{
String name1 = mkName("refmark");
String name2 = mkName("toxmark");
@@ -2058,7 +1969,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void test1() throws Exception
+ @Test public void test1() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("bookmark");
@@ -2085,7 +1996,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
attributes; if these ever become entities, they should not be split!
*/
- public void testRange1() throws Exception
+ @Test public void testRange1() throws Exception
{
String name1 = mkName("url");
RangeInserter inserter = new RangeInserter(m_xDoc);
@@ -2100,7 +2011,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeHyperlinkHyperlink() throws Exception
+ @Test public void testRangeHyperlinkHyperlink() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2159,7 +2070,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeHyperlinkRuby() throws Exception
+ @Test public void testRangeHyperlinkRuby() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2225,7 +2136,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeRubyHyperlink() throws Exception
+ @Test public void testRangeRubyHyperlink() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2282,7 +2193,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeRubyRuby() throws Exception
+ @Test public void testRangeRubyRuby() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2328,7 +2239,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeHyperlinkMeta() throws Exception
+ @Test public void testRangeHyperlinkMeta() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2394,7 +2305,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeRubyMeta() throws Exception
+ @Test public void testRangeRubyMeta() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2461,7 +2372,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeMetaHyperlink() throws Exception
+ @Test public void testRangeMetaHyperlink() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2518,7 +2429,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeMetaRuby() throws Exception
+ @Test public void testRangeMetaRuby() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2607,7 +2518,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeMetaMeta() throws Exception
+ @Test public void testRangeMetaMeta() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2618,7 +2529,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
TreeNode met2 = new MetaNode( mkId("id") );
try {
inserter.insertRange( new Range(0, 4, met2) );
- assure("testRangeMetaMeta: overlap left allowed", false);
+ fail("testRangeMetaMeta: overlap left allowed");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
TreeNode root = new TreeNode()
.appendChild( new TextNode("123") )
@@ -2629,7 +2540,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
TreeNode met3 = new MetaNode( mkId("id") );
try {
inserter.insertRange( new Range(5/*-1*/, 8/*-1*/, met3) );
- assure("testRangeMetaMeta: overlap right allowed", false);
+ fail("testRangeMetaMeta: overlap right allowed");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
root = new TreeNode()
.appendChild( new TextNode("123") )
@@ -2659,7 +2570,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange2() throws Exception
+ @Test public void testRange2() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2729,7 +2640,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange3() throws Exception
+ @Test public void testRange3() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2763,7 +2674,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange4() throws Exception
+ @Test public void testRange4() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2817,7 +2728,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange5() throws Exception
+ @Test public void testRange5() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2866,7 +2777,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange6() throws Exception
+ @Test public void testRange6() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2906,7 +2817,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange7() throws Exception
+ @Test public void testRange7() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2947,7 +2858,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
/* TODO: test partial selection, test UNDO/REDO */
// #i109601# NestedTextContent and XChild
- public void testMetaXChild() throws Exception
+ @Test public void testMetaXChild() throws Exception
{
StringPair id1 = new StringPair("content.xml", mkName("id"));
StringPair id2 = new StringPair("content.xml", mkName("id"));
@@ -3022,12 +2933,12 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XTextContent xNTC = (XTextContent)
UnoRuntime.queryInterface(XTextContent.class, oNTC);
if (null == nestedTextContent[i]) {
- assure("unexpected NestedTextContent at: " + i, null == xNTC);
+ assertNull("unexpected NestedTextContent at: " + i, xNTC);
} else {
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xNTC);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("wrong NestedTextContent at: " + i,
+ assertTrue("wrong NestedTextContent at: " + i,
MetaNode.eq(nestedTextContent[i], xmlid));
}
xDocTextCursor.goRight((short)1, false);
@@ -3047,37 +2958,37 @@ public class TextPortionEnumerationTest extends ComplexTestCase
UnoRuntime.queryInterface(XChild.class, xMeta6);
try {
xChild1.setParent(xChild4);
- assure("setParent(): allowed?", false);
+ fail("setParent(): allowed?");
} catch (NoSupportException e) { /* expected */ }
- assure("getParent(): not null", xChild1.getParent() == null);
- assure("getParent(): not null", xChild2.getParent() == null);
- assure("getParent(): not null", xChild6.getParent() == null);
+ assertNull("getParent(): not null", xChild1.getParent());
+ assertNull("getParent(): not null", xChild2.getParent());
+ assertNull("getParent(): not null", xChild6.getParent());
{
Object xParent3 = xChild3.getParent();
- assure("getParent(): null", null != xParent3);
+ assertNotNull("getParent(): null", xParent3);
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xParent3);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("getParent(): wrong", MetaNode.eq(xmlid, id2));
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id2));
}{
Object xParent4 = xChild4.getParent();
- assure("getParent(): null", null != xParent4);
+ assertNotNull("getParent(): null", xParent4);
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xParent4);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id3));
}{
Object xParent5 = xChild5.getParent();
- assure("getParent(): null", null != xParent5);
+ assertNotNull("getParent(): null", xParent5);
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xParent5);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id3));
}
}
/** test SwXMeta XText interface */
- public void testMetaXText() throws Exception
+ @Test public void testMetaXText() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("12AB6789");
@@ -3099,113 +3010,106 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
XText xParentText = xText.getText();
- assure("getText(): no parent", xParentText != null);
+ assertNotNull("getText(): no parent", xParentText);
XTextRange xStart = xText.getStart();
- assure("getStart(): no start", xStart != null);
+ assertNotNull("getStart(): no start", xStart);
XTextRange xEnd = xText.getEnd();
- assure("getEnd(): no end", xEnd != null);
-
- /*
- String string = xText.getString();
- assure("getString(): invalid string returned",
- string != null && "AB".equals(string) );
- */
+ assertNotNull("getEnd(): no end", xEnd);
xText.setString("45");
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && "45".equals(string) );
+ assertEquals("getString(): invalid string returned",
+ "45", string);
}
XTextCursor xTextCursor = xText.createTextCursor();
- assure("createTextCursor(): failed", xTextCursor != null);
+ assertNotNull("createTextCursor(): failed", xTextCursor);
try {
xText.createTextCursorByRange(null);
- assure("createTextCursorByRange(): null allowed?", false);
+ fail("createTextCursorByRange(): null allowed?");
} catch (RuntimeException e) { /* expected */ }
XTextCursor xTextCursorStart = xText.createTextCursorByRange(xStart);
- assure("createTextCursorByRange(): failed for start",
- xTextCursorStart != null);
+ assertNotNull("createTextCursorByRange(): failed for start",
+ xTextCursorStart);
XTextCursor xTextCursorEnd = xText.createTextCursorByRange(xEnd);
- assure("createTextCursorByRange(): failed for end",
- xTextCursorEnd != null);
+ assertNotNull("createTextCursorByRange(): failed for end",
+ xTextCursorEnd);
// move outside meta
xDocTextCursor.gotoStart(false);
try {
xText.insertString(null, "foo", false);
- assure("insertString(): null allowed?", false);
+ fail("insertString(): null allowed?");
} catch (RuntimeException e) { /* expected */ }
try {
xText.insertString(xDocTextCursor, "foo", false);
- assure("insertString(): cursor outside allowed?", false);
+ fail("insertString(): cursor outside allowed?");
} catch (RuntimeException e) { /* expected */ }
xStart = xText.getStart();
xText.insertString(xStart, "A", false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && "A45".equals(string) );
+ assertEquals("getString(): invalid string returned",
+ "A45", string);
}
xText.insertString(xEnd, "B", false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && "A45B".equals(string) );
+ assertEquals("getString(): invalid string returned",
+ "A45B", string);
}
try {
xText.insertControlCharacter(null, HARD_HYPHEN, false);
- assure("insertControlCharacter(): null allowed?", false);
+ fail("insertControlCharacter(): null allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
xStart = xText.getStart();
try {
xText.insertControlCharacter(xDocTextCursor, HARD_HYPHEN, false);
- assure("insertControlCharacter(): cursor outside allowed?", false);
+ fail("insertControlCharacter(): cursor outside allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
xText.insertControlCharacter(xStart, HARD_HYPHEN, false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && ('\u2011' + "A45B").equals(string) );
+ assertEquals("getString(): invalid string returned",
+ '\u2011' + "A45B", string);
}
xText.insertControlCharacter(xEnd, HARD_HYPHEN, false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null &&
- ('\u2011' + "A45B" + '\u2011').equals(string) );
+ assertEquals("getString(): invalid string returned",
+ '\u2011' + "A45B" + '\u2011', string);
}
xText.setString("45");
try {
xText.insertTextContent(null, xMeta, false);
- assure("insertTextContent(): null range allowed?", false);
+ fail("insertTextContent(): null range allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
try {
xText.insertTextContent(xStart, null, false);
- assure("insertTextContent(): null content allowed?", false);
+ fail("insertTextContent(): null content allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
try {
xText.insertTextContent(xDocTextCursor, xMeta, false);
- assure("insertTextContent(): cursor outside allowed?", false);
+ fail("insertTextContent(): cursor outside allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
TextFieldNode field1 = new TextFieldNode( "f1" );
@@ -3237,13 +3141,13 @@ public class TextPortionEnumerationTest extends ComplexTestCase
try {
xText.removeTextContent(null);
- assure("removeTextContent(): null content allowed?", false);
+ fail("removeTextContent(): null content allowed?");
} catch (RuntimeException e) { /* expected */ }
xText.removeTextContent(xField1);
XTextRange xAnchor = xMeta.getAnchor();
- assure("getAnchor(): null", xAnchor != null);
+ assertNotNull("getAnchor(): null", xAnchor);
// evil test case: insert ruby around meta
RubyNode ruby = new RubyNode( mkName("ruby") );
@@ -3263,31 +3167,31 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XEnumerationAccess xEA = (XEnumerationAccess)
UnoRuntime.queryInterface(XEnumerationAccess.class, xMeta);
XEnumeration xEnum = xEA.createEnumeration();
- assure("createEnumeration(): returns null", xEnum != null);
+ assertNotNull("createEnumeration(): returns null", xEnum);
{
- assure("hasNext(): first missing", xEnum.hasMoreElements());
+ assertTrue("hasNext(): first missing", xEnum.hasMoreElements());
Object xElement = xEnum.nextElement();
XTextRange xPortion = (XTextRange)
UnoRuntime.queryInterface(XTextRange.class, xElement);
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xPortion);
String type = (String) xPropSet.getPropertyValue("TextPortionType");
- assure("first: not text: " + type, type.equals("Text"));
+ assertEquals("first: not text", "Text", type);
String txt = xPortion.getString();
- assure("first: text differs: " + txt, "45".equals(txt));
+ assertEquals("first: text differs", "45", txt);
}
{
- assure("hasNext(): second missing", xEnum.hasMoreElements());
+ assertTrue("hasNext(): second missing", xEnum.hasMoreElements());
Object xElement = xEnum.nextElement();
XTextRange xPortion = (XTextRange)
UnoRuntime.queryInterface(XTextRange.class, xElement);
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xPortion);
String type = (String) xPropSet.getPropertyValue("TextPortionType");
- assure("second: not text", type.equals("TextField"));
+ assertEquals("second: not text", "TextField", type);
}
// no ruby end here!!!
- assure("hasNext(): more elements?", !xEnum.hasMoreElements());
+ assertFalse("hasNext(): more elements?", xEnum.hasMoreElements());
XComponent xComponent = (XComponent)
UnoRuntime.queryInterface(XComponent.class, xMeta);
@@ -3295,14 +3199,14 @@ public class TextPortionEnumerationTest extends ComplexTestCase
try {
XTextCursor xCursor = xText.createTextCursor();
- assure("createTextCursor(): succeeds on disposed object?",
- xCursor == null);
+ assertNull("createTextCursor(): succeeds on disposed object?",
+ xCursor);
} catch (RuntimeException e) { /* expected */ }
}
/** check that cursor move methods move to positions in the meta,
but do not move to positions outside the meta. */
- public void testMetaXTextCursor() throws Exception
+ @Test public void testMetaXTextCursor() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("Text. 12 More text here.");
@@ -3323,30 +3227,30 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
XTextRange xStart = xText.getStart();
- assure("getStart(): no start", xStart != null);
+ assertNotNull("getStart(): no start", xStart);
XTextRange xEnd = xText.getEnd();
- assure("getEnd(): no end", xEnd != null);
+ assertNotNull("getEnd(): no end", xEnd);
XTextCursor xTextCursor = xText.createTextCursor();
- assure("createTextCursor(): no cursor", xTextCursor != null);
+ assertNotNull("createTextCursor(): no cursor", xTextCursor);
// XTextCursor
boolean bSuccess = false;
xTextCursor.gotoStart(false);
xTextCursor.gotoEnd(false);
bSuccess = xTextCursor.goLeft((short)1, false);
- assure("goLeft(): failed", bSuccess);
+ assertTrue("goLeft(): failed", bSuccess);
bSuccess = xTextCursor.goLeft((short)1000, false);
- assure("goLeft(): succeeded", !bSuccess);
+ assertFalse("goLeft(): succeeded", bSuccess);
bSuccess = xTextCursor.goRight((short)1, false);
- assure("goRight(): failed", bSuccess);
+ assertTrue("goRight(): failed", bSuccess);
bSuccess = xTextCursor.goRight((short)1000, false);
- assure("goRight(): succeeded", !bSuccess);
+ assertFalse("goRight(): succeeded", bSuccess);
xTextCursor.gotoRange(xStart, false);
xTextCursor.gotoRange(xEnd, false);
try {
xTextCursor.gotoRange(xDocTextCursor, false);
- assure("gotoRange(): succeeded", false);
+ fail("gotoRange(): succeeded");
} catch (RuntimeException e) { /* expected */ }
// XWordCursor
@@ -3356,44 +3260,44 @@ public class TextPortionEnumerationTest extends ComplexTestCase
UnoRuntime.queryInterface(XWordCursor.class, xTextCursor);
bSuccess = xWordCursor.gotoNextWord(true);
- assure("gotoNextWord(): failed", bSuccess);
+ assertTrue("gotoNextWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoNextWord(): wrong string: " + string,
- "Two ".equals(string));
+ assertEquals("gotoNextWord(): wrong string",
+ "Two ", string);
}
bSuccess = xWordCursor.gotoNextWord(false);
- assure("gotoNextWord(): succeeded", !bSuccess);
+ assertFalse("gotoNextWord(): succeeded", bSuccess);
xTextCursor.collapseToEnd();
bSuccess = xWordCursor.gotoPreviousWord(true);
- assure("gotoPreviousWord(): failed", bSuccess);
+ assertTrue("gotoPreviousWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoPreviousWord(): wrong string: " + string,
- "words".equals(string));
+ assertEquals("gotoPreviousWord(): wrong string",
+ "words", string);
}
bSuccess = xWordCursor.gotoPreviousWord(false);
- assure("gotoPreviousWord(): succeeded", !bSuccess);
+ assertFalse("gotoPreviousWord(): succeeded", bSuccess);
bSuccess = xWordCursor.gotoEndOfWord(true);
- assure("gotoEndOfWord(): failed", bSuccess);
+ assertTrue("gotoEndOfWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoEndOfWord(): wrong string: " + string,
- "Two".equals(string));
+ assertEquals("gotoEndOfWord(): wrong string",
+ "Two", string);
}
xTextCursor.gotoEnd(false);
bSuccess = xWordCursor.gotoStartOfWord(true);
- assure("gotoStartOfWord(): failed", bSuccess);
+ assertTrue("gotoStartOfWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoStartOfWord(): wrong string: " + string,
- "words".equals(string));
+ assertEquals("gotoStartOfWord(): wrong string",
+ "words", string);
}
xText.setString("");
bSuccess = xWordCursor.gotoEndOfWord(false);
- assure("gotoEndOfWord(): succeeded", !bSuccess);
+ assertFalse("gotoEndOfWord(): succeeded", bSuccess);
bSuccess = xWordCursor.gotoStartOfWord(false);
- assure("gotoStartOfWord(): succeeded", !bSuccess);
+ assertFalse("gotoStartOfWord(): succeeded", bSuccess);
// XSentenceCursor
xText.setString("This is a sentence. Another sentence.");
@@ -3402,60 +3306,60 @@ public class TextPortionEnumerationTest extends ComplexTestCase
UnoRuntime.queryInterface(XSentenceCursor.class, xTextCursor);
bSuccess = xSentenceCursor.gotoNextSentence(true);
- assure("gotoNextSentence(): failed", bSuccess);
+ assertTrue("gotoNextSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoNextSentence(): wrong string: " + string,
- "This is a sentence. ".equals(string));
+ assertEquals("gotoNextSentence(): wrong string",
+ "This is a sentence. ", string);
}
bSuccess = xSentenceCursor.gotoNextSentence(false);
- assure("gotoNextSentence(): succeeded", !bSuccess);
+ assertFalse("gotoNextSentence(): succeeded", bSuccess);
// FIXME:
// the sentence cursor seems to work differently than the word cursor
xText.setString("This is a sentence. Another sentence. Sentence 3.");
xTextCursor.gotoEnd(false);
bSuccess = xSentenceCursor.gotoPreviousSentence(true);
- assure("gotoPreviousSentence(): failed", bSuccess);
+ assertTrue("gotoPreviousSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoPreviousSentence(): wrong string: " + string,
- "Another sentence. Sentence 3.".equals(string));
+ assertEquals("gotoPreviousSentence(): wrong string",
+ "Another sentence. Sentence 3.", string);
}
bSuccess = xSentenceCursor.gotoPreviousSentence(false);
- assure("gotoPreviousSentence(): succeeded", !bSuccess);
+ assertFalse("gotoPreviousSentence(): succeeded", bSuccess);
bSuccess = xSentenceCursor.gotoEndOfSentence(true);
- assure("gotoEndOfSentence(): failed", bSuccess);
+ assertTrue("gotoEndOfSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoEndOfSentence(): wrong string: " + string,
- "This is a sentence.".equals(string));
+ assertEquals("gotoEndOfSentence(): wrong string",
+ "This is a sentence.", string);
}
xTextCursor.gotoEnd(false);
bSuccess = xSentenceCursor.gotoStartOfSentence(true);
- assure("gotoStartOfSentence(): failed", bSuccess);
+ assertTrue("gotoStartOfSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoStartOfSentence(): wrong string: " + string,
- "Sentence 3.".equals(string));
+ assertEquals("gotoStartOfSentence(): wrong string",
+ "Sentence 3.", string);
}
xText.setString("");
bSuccess = xSentenceCursor.gotoEndOfSentence(false);
- assure("gotoEndOfSentence(): succeeded", !bSuccess);
+ assertFalse("gotoEndOfSentence(): succeeded", bSuccess);
bSuccess = xSentenceCursor.gotoStartOfSentence(false);
- assure("gotoStartOfSentence(): succeeded", !bSuccess);
+ assertFalse("gotoStartOfSentence(): succeeded", bSuccess);
XParagraphCursor xParagraphCursor = (XParagraphCursor)
UnoRuntime.queryInterface(XParagraphCursor.class, xTextCursor);
// XParagraphCursor (does not make sense)
bSuccess = xParagraphCursor.gotoNextParagraph(false);
- assure("gotoNextParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoNextParagraph(): succeeded", bSuccess);
bSuccess = xParagraphCursor.gotoPreviousParagraph(false);
- assure("gotoPreviousParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoPreviousParagraph(): succeeded", bSuccess);
bSuccess = xParagraphCursor.gotoStartOfParagraph(false);
- assure("gotoStartOfParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoStartOfParagraph(): succeeded", bSuccess);
bSuccess = xParagraphCursor.gotoEndOfParagraph(false);
- assure("gotoEndOfParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoEndOfParagraph(): succeeded", bSuccess);
}
@@ -3469,7 +3373,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
throws Exception { }
}
- public void testMetaXTextAttachToxMark() throws Exception
+ @Test public void testMetaXTextAttachToxMark() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3485,7 +3389,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachRefMark() throws Exception
+ @Test public void testMetaXTextAttachRefMark() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3501,7 +3405,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachTextField() throws Exception
+ @Test public void testMetaXTextAttachTextField() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3517,7 +3421,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachFootnote() throws Exception
+ @Test public void testMetaXTextAttachFootnote() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3533,7 +3437,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachMeta() throws Exception
+ @Test public void testMetaXTextAttachMeta() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3783,7 +3687,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
}
}
- public void testMetaFieldXTextField() throws Exception
+ @Test public void testMetaFieldXTextField() throws Exception
{
com.sun.star.rdf.XRepositorySupplier xModel =
(com.sun.star.rdf.XRepositorySupplier) UnoRuntime.queryInterface(
@@ -3821,12 +3725,12 @@ public class TextPortionEnumerationTest extends ComplexTestCase
xGraph.addStatement(xMetadatable, xOdfPrefix, xPrefix);
xGraph.addStatement(xMetadatable, xOdfSuffix, xSuffix);
- assure("getPresentation(): wrong",
- "fooabcbar".equals(xMetaField.getPresentation(false)));
+ assertEquals("getPresentation(): wrong",
+ "fooabcbar", xMetaField.getPresentation(false));
inserter.insertRange( new Range(0, 0, text) );
}
- public void testMetaFieldXPropertySet() throws Exception
+ @Test public void testMetaFieldXPropertySet() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123");
@@ -3842,32 +3746,32 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XPropertySet xPropertySet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xMetaField);
- assure("PropertySet: not supported?", xPropertySet != null);
+ assertNotNull("PropertySet: not supported?", xPropertySet);
XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo();
- assure("hasPropertyByName(\"NumberFormat\"):",
- xPropertySetInfo.hasPropertyByName("NumberFormat"));
- assure("hasPropertyByName(\"IsFixedLanguage\"):",
- xPropertySetInfo.hasPropertyByName("IsFixedLanguage"));
+ assertTrue("hasPropertyByName(\"NumberFormat\"):",
+ xPropertySetInfo.hasPropertyByName("NumberFormat"));
+ assertTrue("hasPropertyByName(\"IsFixedLanguage\"):",
+ xPropertySetInfo.hasPropertyByName("IsFixedLanguage"));
int def = (Integer) xPropertySet.getPropertyValue("NumberFormat");
- log.println("NumberFormat: default is " + def);
+ System.out.println("NumberFormat: default is " + def);
short INT = com.sun.star.i18n.NumberFormatIndex.NUMBER_INT;
xPropertySet.setPropertyValue("NumberFormat", INT);
xPropertySet.setPropertyValue("IsFixedLanguage", true);
int format = (Integer) xPropertySet.getPropertyValue("NumberFormat");
- assure("NumberFormat: failed", format == INT);
+ assertEquals("NumberFormat: failed", INT, format);
boolean isFixed = (Boolean)
xPropertySet.getPropertyValue("IsFixedLanguage");
- assure("IsFixedLanguage: failed", isFixed);
+ assertTrue("IsFixedLanguage: failed", isFixed);
}
- public void testLoadStore() throws Exception
+ @Test public void testLoadStore() throws Exception
{
XTextDocument xComp = null;
String filename = "TESTMETA.odt";
String file;
try {
- file = util.utils.getFullTestURL(filename);
+ file = TestDocument.getUrl(filename);
xComp = doLoad(file);
if (xComp != null)
{
@@ -3885,21 +3789,21 @@ public class TextPortionEnumerationTest extends ComplexTestCase
private void doStore(XComponent xComp, String file) throws Exception
{
- log.println("Storing test document...");
+ System.out.println("Storing test document...");
XStorable xStor = (XStorable) UnoRuntime.queryInterface(
XStorable.class, xComp);
xStor.storeToURL(file, new PropertyValue[0]);
- log.println("...done");
+ System.out.println("...done");
}
public XTextDocument doLoad(String file) throws Exception
{
XComponent xComp = null;
- log.println("Loading test document...");
+ System.out.println("Loading test document...");
PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
@@ -3912,9 +3816,9 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XTextDocument xTextDoc = (XTextDocument)
UnoRuntime.queryInterface(XTextDocument.class, xComp);
- assure("cannot load: " + file, xTextDoc != null);
+ assertNotNull("cannot load: " + file, xTextDoc);
- log.println("...done");
+ System.out.println("...done");
return xTextDoc;
}
@@ -3923,7 +3827,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
{
XText xText = xTextDoc.getText();
- log.println("Checking meta(-field)s in loaded test document...");
+ System.out.println("Checking meta(-field)s in loaded test document...");
TreeNode root = new TreeNode()
.appendChild( new RubyNode("ruby1")
@@ -3968,16 +3872,16 @@ public class TextPortionEnumerationTest extends ComplexTestCase
.appendChild( new TextNode(" X X ") );
doTest(xTextDoc, root, false);
- log.println("...done");
+ System.out.println("...done");
}
- public void testLoadStoreXmlid() throws Exception
+ @Test public void testLoadStoreXmlid() throws Exception
{
XTextDocument xComp = null;
String filename = "TESTXMLID.odt";
String file;
try {
- file = util.utils.getFullTestURL(filename);
+ file = TestDocument.getUrl(filename);
xComp = doLoad(file);
if (xComp != null)
{
@@ -3997,7 +3901,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
{
XText xText = xTextDoc.getText();
- log.println("Checking bookmarks in loaded test document...");
+ System.out.println("Checking bookmarks in loaded test document...");
XRepositorySupplier xRS = (XRepositorySupplier)
UnoRuntime.queryInterface(XRepositorySupplier.class, xTextDoc);
@@ -4009,14 +3913,14 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XNameAccess xBookmarks = xBMS.getBookmarks();
XMetadatable xMark1 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xBookmarks.getByName("mk1"));
- assure("mark1",
+ assertTrue("mark1",
eq(xMark1.getMetadataReference(),
new StringPair("content.xml", "id90")));
XMetadatable xMark2 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xBookmarks.getByName("mk2"));
Pair<Statement[], Boolean> result = xRepo.getStatementRDFa(xMark2);
- assure("mark2", (result.First.length == 1)
+ assertTrue("mark2", (result.First.length == 1)
&& result.First[0].Subject.getStringValue().equals("uri:foo")
&& result.First[0].Predicate.getStringValue().equals("uri:bar")
&& result.First[0].Object.getStringValue().contains("a fooish bar")
@@ -4024,13 +3928,13 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XMetadatable xMark3 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xBookmarks.getByName("mk3"));
- assure("mark3",
+ assertTrue("mark3",
eq(xMark3.getMetadataReference(),
new StringPair("content.xml", "id91")));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking sections in loaded test document...");
+ System.out.println("Checking sections in loaded test document...");
XTextSectionsSupplier xTSS = (XTextSectionsSupplier)
UnoRuntime.queryInterface(XTextSectionsSupplier.class, xTextDoc);
@@ -4039,58 +3943,58 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XMetadatable xSection1 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Section 1"));
- assure("idsection1", eq(xSection1.getMetadataReference(),
+ assertTrue("idsection1", eq(xSection1.getMetadataReference(),
new StringPair("content.xml", "idSection1")));
XMetadatable xSection2 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Section 2"));
- assure("idSection2", eq(xSection2.getMetadataReference(),
+ assertTrue("idSection2", eq(xSection2.getMetadataReference(),
new StringPair("content.xml", "idSection2")));
XMetadatable xSection3 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Table of Contents1_Head"));
- assure("idTOCTitle", eq(xSection3.getMetadataReference(),
+ assertTrue("idTOCTitle", eq(xSection3.getMetadataReference(),
new StringPair("content.xml", "idTOCTitle")));
XMetadatable xSection4 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Alphabetical Index1_Head"));
- assure("idAITitle", eq(xSection4.getMetadataReference(),
+ assertTrue("idAITitle", eq(xSection4.getMetadataReference(),
new StringPair("content.xml", "idAITitle")));
XMetadatable xSection5 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Illustration Index1_Head"));
- assure("idIITitle", eq(xSection5.getMetadataReference(),
+ assertTrue("idIITitle", eq(xSection5.getMetadataReference(),
new StringPair("content.xml", "idIITitle")));
XMetadatable xSection6 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Index of Tables1_Head"));
- assure("idIOTTitle", eq(xSection6.getMetadataReference(),
+ assertTrue("idIOTTitle", eq(xSection6.getMetadataReference(),
new StringPair("content.xml", "idIOTTitle")));
XMetadatable xSection7 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("User-Defined1_Head"));
- assure("idUDTitle", eq(xSection7.getMetadataReference(),
+ assertTrue("idUDTitle", eq(xSection7.getMetadataReference(),
new StringPair("content.xml", "idUDTitle")));
XMetadatable xSection8 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Table of Objects1_Head"));
- assure("idTOOTitle", eq(xSection8.getMetadataReference(),
+ assertTrue("idTOOTitle", eq(xSection8.getMetadataReference(),
new StringPair("content.xml", "idTOOTitle")));
XMetadatable xSection9 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Bibliography1_Head"));
- assure("idBibTitle", eq(xSection9.getMetadataReference(),
+ assertTrue("idBibTitle", eq(xSection9.getMetadataReference(),
new StringPair("content.xml", "idBibTitle")));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking indexes in loaded test document...");
+ System.out.println("Checking indexes in loaded test document...");
XDocumentIndexesSupplier xDIS = (XDocumentIndexesSupplier)
UnoRuntime.queryInterface(XDocumentIndexesSupplier.class, xTextDoc);
@@ -4100,68 +4004,68 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XMetadatable xIndex1 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Table of Contents1"));
- assure("idTOC", eq(xIndex1.getMetadataReference(),
+ assertTrue("idTOC", eq(xIndex1.getMetadataReference(),
new StringPair("content.xml", "idTOC")));
XMetadatable xIndex1s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Table of Contents1"));
- assure("idTOC", eq(xIndex1s.getMetadataReference(),
+ assertTrue("idTOC", eq(xIndex1s.getMetadataReference(),
new StringPair("content.xml", "idTOC")));
XMetadatable xIndex2 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Alphabetical Index1"));
- assure("idAI", eq(xIndex2.getMetadataReference(),
+ assertTrue("idAI", eq(xIndex2.getMetadataReference(),
new StringPair("content.xml", "idAI")));
XMetadatable xIndex2s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Alphabetical Index1"));
- assure("idAI", eq(xIndex2s.getMetadataReference(),
+ assertTrue("idAI", eq(xIndex2s.getMetadataReference(),
new StringPair("content.xml", "idAI")));
XMetadatable xIndex3 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Illustration Index1"));
- assure("idII", eq(xIndex3.getMetadataReference(),
+ assertTrue("idII", eq(xIndex3.getMetadataReference(),
new StringPair("content.xml", "idII")));
XMetadatable xIndex3s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Illustration Index1"));
- assure("idII", eq(xIndex3s.getMetadataReference(),
+ assertTrue("idII", eq(xIndex3s.getMetadataReference(),
new StringPair("content.xml", "idII")));
XMetadatable xIndex4 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Index of Tables1"));
- assure("idIOT", eq(xIndex4.getMetadataReference(),
+ assertTrue("idIOT", eq(xIndex4.getMetadataReference(),
new StringPair("content.xml", "idIOT")));
XMetadatable xIndex4s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Index of Tables1"));
- assure("idIOT", eq(xIndex4s.getMetadataReference(),
+ assertTrue("idIOT", eq(xIndex4s.getMetadataReference(),
new StringPair("content.xml", "idIOT")));
XMetadatable xIndex5 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("User-Defined1"));
- assure("idUD", eq(xIndex5.getMetadataReference(),
+ assertTrue("idUD", eq(xIndex5.getMetadataReference(),
new StringPair("content.xml", "idUD")));
XMetadatable xIndex5s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("User-Defined1"));
- assure("idUD", eq(xIndex5s.getMetadataReference(),
+ assertTrue("idUD", eq(xIndex5s.getMetadataReference(),
new StringPair("content.xml", "idUD")));
XMetadatable xIndex6 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Table of Objects1"));
- assure("idTOO", eq(xIndex6.getMetadataReference(),
+ assertTrue("idTOO", eq(xIndex6.getMetadataReference(),
new StringPair("content.xml", "idTOO")));
XMetadatable xIndex6s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Table of Objects1"));
- assure("idTOO", eq(xIndex6s.getMetadataReference(),
+ assertTrue("idTOO", eq(xIndex6s.getMetadataReference(),
new StringPair("content.xml", "idTOO")));
XMetadatable xIndex7 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Bibliography1"));
- assure("idBib", eq(xIndex7.getMetadataReference(),
+ assertTrue("idBib", eq(xIndex7.getMetadataReference(),
new StringPair("content.xml", "idBib")));
XMetadatable xIndex7s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Bibliography1"));
- assure("idBib", eq(xIndex7s.getMetadataReference(),
+ assertTrue("idBib", eq(xIndex7s.getMetadataReference(),
new StringPair("content.xml", "idBib")));
- log.println("...done");
+ System.out.println("...done");
}
static void close(XComponent i_comp)
@@ -4205,19 +4109,18 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XEnumerationAccess xEA = (XEnumerationAccess)
UnoRuntime.queryInterface(XEnumerationAccess.class, xElement);
XEnumeration xEnum = xEA.createEnumeration();
- TreeNode outtree = new EnumConverter(this).convert(xEnum);
+ TreeNode outtree = new EnumConverter().convert(xEnum);
dumpTree(outtree, "O: ");
- boolean success = new FuzzyTester(log).doTest(intree, outtree);
- assure("test failed", success);
+ new FuzzyTester().doTest(intree, outtree);
}
private void dumpTree(TreeNode tree) { dumpTree(tree, "> "); }
private void dumpTree(TreeNode tree, String prefix)
{
- log.println(prefix + tree.toString());
+ System.out.println(prefix + tree.toString());
TreeNodeEnum children = tree.createEnumeration();
while (children.hasNext()) {
TreeNode node = children.next();
@@ -4246,6 +4149,16 @@ public class TextPortionEnumerationTest extends ComplexTestCase
((i_Left.Second).equals(i_Right.Second));
}
- public void assure(String str, boolean cond) { super.assure(str, cond); }
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/makefile.mk b/sw/qa/complex/writer/makefile.mk
deleted file mode 100644
index ae2a15f821dd..000000000000
--- a/sw/qa/complex/writer/makefile.mk
+++ /dev/null
@@ -1,108 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = PropertyValues
-PRJNAME = $(TARGET)
-PACKAGE = complex$/writer
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckIndexedPropertyValues.java CheckNamedPropertyValues.java CheckCrossReferences.java CheckBookmarks.java CheckFlies.java TextPortionEnumerationTest.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# build package name with "." instead of $/
-CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL: ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-run: \
- CheckBookmarks \
- CheckCrossReferences \
- CheckIndexedPropertyValues \
- CheckNamedPropertyValues \
- CheckFlies \
- TextPortionEnumerationTest \
-
-
-RUN: run
-
-CheckIndexedPropertyValues:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckIndexedPropertyValues
-
-
-CheckNamedPropertyValues:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckNamedPropertyValues
-
-CheckCrossReferences:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckCrossReferences
-
-CheckBookmarks:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckBookmarks
-
-CheckFlies:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckFlies
-
-TextPortionEnumerationTest:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).TextPortionEnumerationTest
-
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index b93ce8cbe9a9..a5699f0a386f 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -52,12 +52,12 @@ using namespace std;
namespace /* private */
{
- const ULONG NUM_ENTRIES = 10;
+ const sal_uLong NUM_ENTRIES = 10;
class BigPtrEntryMock : public BigPtrEntry
{
public:
- BigPtrEntryMock(ULONG count) : count_(count)
+ BigPtrEntryMock(sal_uLong count) : count_(count)
{
}
@@ -65,26 +65,26 @@ namespace /* private */
{
}
- ULONG getCount() const
+ sal_uLong getCount() const
{
return count_;
}
- void setCount(ULONG newCount)
+ void setCount(sal_uLong newCount)
{
count_ = newCount;
}
- ULONG Position() const
+ sal_uLong Position() const
{
return GetPos();
}
private:
- ULONG count_;
+ sal_uLong count_;
};
- BOOL AddToCount(const ElementPtr& rElem, void* pArgs)
+ sal_Bool AddToCount(const ElementPtr& rElem, void* pArgs)
{
BigPtrEntryMock* const pbem = static_cast<BigPtrEntryMock* const>(rElem);
pbem->setCount(pbem->getCount() + *((int*)pArgs));
@@ -96,9 +96,9 @@ namespace /* private */
(void)bparr;
}
- void fillBigPtrArray(BigPtrArray& bparr, ULONG numEntries)
+ void fillBigPtrArray(BigPtrArray& bparr, sal_uLong numEntries)
{
- for (ULONG i = 0; i < numEntries; i++)
+ for (sal_uLong i = 0; i < numEntries; i++)
bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
}
@@ -109,7 +109,7 @@ namespace /* private */
bool checkElementPositions(const BigPtrArray& bparr)
{
- for (ULONG i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
{
if (static_cast<BigPtrEntryMock*>(bparr[i])->Position() != i)
return false;
@@ -119,7 +119,7 @@ namespace /* private */
void releaseBigPtrArrayContent(BigPtrArray& bparr)
{
- for (ULONG i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
delete bparr[i];
}
@@ -160,9 +160,9 @@ public:
BigPtrArray bparr;
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(i), 0);
CPPUNIT_ASSERT_MESSAGE
(
@@ -173,7 +173,7 @@ public:
RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_entries_at_front");
- for (ULONG i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -203,7 +203,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count() / 2);
@@ -236,9 +236,9 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
- for (ULONG i = 0, j = -5; i < 5; i++, j++)
+ for (sal_uLong i = 0, j = -5; i < 5; i++, j++)
bparr.Insert(new BigPtrEntryMock(j), i);
RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_at_already_used_index");
@@ -249,7 +249,7 @@ public:
(oldCount + 5 == bparr.Count())
);
- for (ULONG i = 0, j = -5; i < bparr.Count(); i++, j++)
+ for (sal_uLong i = 0, j = -5; i < bparr.Count(); i++, j++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -277,7 +277,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count());
CPPUNIT_ASSERT_MESSAGE
@@ -307,9 +307,9 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
delete bparr[0]; // release content
bparr.Remove(0); // remove item from container
@@ -320,7 +320,7 @@ public:
(oldCount - 1 == bparr.Count())
);
- for (ULONG j = 0, k = i + 1; j < bparr.Count(); j++, k++)
+ for (sal_uLong j = 0, k = i + 1; j < bparr.Count(); j++, k++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -352,7 +352,7 @@ public:
for (int i = NUM_ENTRIES - 1; i >= 0; i--)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
delete bparr[i];
bparr.Remove(i);
@@ -362,7 +362,7 @@ public:
(oldCount - 1 == bparr.Count())
);
- for (ULONG j = 0; j < bparr.Count(); j++)
+ for (sal_uLong j = 0; j < bparr.Count(); j++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -394,8 +394,8 @@ public:
while (bparr.Count())
{
- ULONG oldCount = bparr.Count();
- ULONG oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
+ sal_uLong oldCount = bparr.Count();
+ sal_uLong oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
delete bparr[bparr.Count() / 2];
bparr.Remove(bparr.Count() / 2);
@@ -406,7 +406,7 @@ public:
(oldCount - 1 == bparr.Count())
);
- for (ULONG i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -437,10 +437,10 @@ public:
while(bparr.Count())
{
- ULONG nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
- ULONG oldCount = bparr.Count();
+ sal_uLong nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
+ sal_uLong oldCount = bparr.Count();
- for (ULONG i = 0; i < nRemove; i++)
+ for (sal_uLong i = 0; i < nRemove; i++)
delete bparr[i];
bparr.Remove(0, nRemove);
@@ -491,13 +491,13 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES - 1; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES - 1; i++)
{
bparr.Move(i, i + 2);
dumpBigPtrArray(bparr);
}
- for (ULONG i = 0; i < (NUM_ENTRIES - 1); i++)
+ for (sal_uLong i = 0; i < (NUM_ENTRIES - 1); i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -542,7 +542,7 @@ public:
static_cast<BigPtrEntryMock*>(bparr[0])->getCount() == (NUM_ENTRIES - 1)
);
- for (ULONG i = 1; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 1; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -569,14 +569,14 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
bparr.Move(i, i);
}
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -604,14 +604,14 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
delete bparr[i];
bparr.Replace(i, new BigPtrEntryMock(j));
dumpBigPtrArray(bparr);
}
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -641,7 +641,7 @@ public:
int addCount = 1;
bparr.ForEach(AddToCount, &addCount);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -663,10 +663,10 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(0, NUM_ENTRIES / 2, AddToCount, &addCount);
- ULONG i = 0;
+ sal_uLong i = 0;
for (/* */; i < NUM_ENTRIES / 2; i++)
{
CPPUNIT_ASSERT_MESSAGE
@@ -701,7 +701,7 @@ public:
int addCount = 1;
bparr.ForEach(NUM_ENTRIES / 2, NUM_ENTRIES, AddToCount, &addCount);
- ULONG i = 0;
+ sal_uLong i = 0;
for (/* */; i < NUM_ENTRIES / 2; i++)
{
CPPUNIT_ASSERT_MESSAGE
@@ -733,10 +733,10 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(0, 0, AddToCount, &addCount);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
diff --git a/sw/qa/core/bigpointerarray-new.cxx b/sw/qa/core/bigpointerarray-new.cxx
index e376fb53003f..aee3e2e4807e 100644
--- a/sw/qa/core/bigpointerarray-new.cxx
+++ b/sw/qa/core/bigpointerarray-new.cxx
@@ -37,19 +37,19 @@ BigPtrArray::BigPtrArray()
//container_.reserve(1000);
}
-ULONG BigPtrArray::Count() const
+sal_uLong BigPtrArray::Count() const
{
return container_.size();
}
-void BigPtrArray::Move(ULONG fromPos, ULONG toPos)
+void BigPtrArray::Move(sal_uLong fromPos, sal_uLong toPos)
{
DBG_ASSERT(fromPos < container_.size() && toPos < container_.size(), "BigPtrArray.Move precondition violation");
Insert(container_[fromPos], toPos);
Remove(toPos < fromPos ? fromPos + 1 : fromPos, 1);
}
-void BigPtrArray::ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs)
+void BigPtrArray::ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs)
{
DBG_ASSERT(fromPos < toPos && fromPos < container_.size() && toPos < container_.size(), "BigPtrArray::ForEach precondition violation");
Container_t::const_iterator iter = container_.begin() + fromPos;
@@ -66,13 +66,13 @@ void BigPtrArray::ForEach(FnForEach fn, void* pArgs)
fn(*iter, pArgs);
}
-ElementPtr BigPtrArray::operator[](ULONG pos) const
+ElementPtr BigPtrArray::operator[](sal_uLong pos) const
{
DBG_ASSERT(pos < container_.size(), "BigPtrArray::operator[] precondition violation");
return container_[pos];
}
-void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos)
+void BigPtrArray::Insert(const ElementPtr& rElem, sal_uLong pos)
{
DBG_ASSERT(pos <= container_.size(), "BigPtrArray::Insert precondition violation");
@@ -88,14 +88,14 @@ void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos)
}
}
-void BigPtrArray::Remove( ULONG pos, ULONG n )
+void BigPtrArray::Remove( sal_uLong pos, sal_uLong n )
{
DBG_ASSERT((pos < container_.size()) && ((container_.begin() + pos + n) < container_.end()), "BigPtrArray.Remove precondition violation")
container_.erase(container_.begin() + pos, container_.begin() + pos + n);
FixElementIndizes(container_.begin(), container_.end());
}
-void BigPtrArray::Replace(ULONG pos, const ElementPtr& rElem)
+void BigPtrArray::Replace(sal_uLong pos, const ElementPtr& rElem)
{
DBG_ASSERT(pos < container_.size(), "BigPtrArray::Replace precondition violation");
rElem->pBigPtrArray_ = this;
diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx
index 13b6e3c3c3f9..2f2792d40b92 100644
--- a/sw/qa/core/bigpointerarray-new.hxx
+++ b/sw/qa/core/bigpointerarray-new.hxx
@@ -42,7 +42,7 @@ class BigPtrEntry
{
friend class BigPtrArray;
BigPtrArray* pBigPtrArray_;
- ULONG pos_;
+ sal_uLong pos_;
protected:
BigPtrEntry() : pBigPtrArray_(0), pos_(0)
@@ -51,7 +51,7 @@ protected:
virtual ~BigPtrEntry()
{}
- ULONG GetPos() const
+ sal_uLong GetPos() const
{
return pos_;
}
@@ -63,7 +63,7 @@ protected:
};
typedef BigPtrEntry* ElementPtr;
-typedef BOOL (*FnForEach)(const ElementPtr&, void* pArgs);
+typedef sal_Bool (*FnForEach)(const ElementPtr&, void* pArgs);
/** A container abstraction
*/
@@ -80,7 +80,7 @@ public:
/** Return the number of entries inserted
into the array
*/
- ULONG Count() const;
+ sal_uLong Count() const;
/** Insert an Element into the array at a certain
position
@@ -94,7 +94,7 @@ public:
@pre (pos >= 0 && pos <= BigPtrArray.Count())
@post (((oldCount + 1) == BigPtrArray.Count()) && BigPtrArray[pos] == rElem)
*/
- void Insert(const ElementPtr& rElem, ULONG pos);
+ void Insert(const ElementPtr& rElem, sal_uLong pos);
/** Remove a specified number of elements starting at a certain position.
@@ -107,7 +107,7 @@ public:
@pre (pos < BigPtrArray.Count() && n <= BigPtrArray.Count())
@post ((oldCount - n) == BigPtrArray.Count())
*/
- void Remove(ULONG pos, ULONG n = 1);
+ void Remove(sal_uLong pos, sal_uLong n = 1);
/** Move an entry from a certain position to another on.
@@ -117,7 +117,7 @@ public:
@param to
[in]
*/
- void Move(ULONG fromPos, ULONG toPos);
+ void Move(sal_uLong fromPos, sal_uLong toPos);
/** Replace an entry at a certain position
@@ -130,7 +130,7 @@ public:
@pre pos < BigPtrArray.Count()
@post (oldCount == BigPtrArray.Count() && BigPtrArray[pos] == rElem)
*/
- void Replace(ULONG pos, const ElementPtr& rElem);
+ void Replace(sal_uLong pos, const ElementPtr& rElem);
/** Get the entry at a certain index
@@ -139,7 +139,7 @@ public:
@pre pos < BigPtrArray.Count()
*/
- ElementPtr operator[](ULONG pos) const;
+ ElementPtr operator[](sal_uLong pos) const;
/**
*/
@@ -147,7 +147,7 @@ public:
/**
*/
- void ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs = NULL);
+ void ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs = NULL);
private:
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index 1b6877cac8ef..737c7bd3a1a5 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -68,7 +68,7 @@ SO2_IMPL_REF(SwDocShell)
using namespace ::com::sun::star;
-static USHORT aWndFunc(Window *, USHORT, const String &, const String &)
+static sal_uInt16 aWndFunc(Window *, sal_uInt16, const String &, const String &)
{
return ERRCODE_BUTTON_OK;
}
diff --git a/sw/qa/core/makefile.mk b/sw/qa/core/makefile.mk
deleted file mode 100644
index c831e8722e2b..000000000000
--- a/sw/qa/core/makefile.mk
+++ /dev/null
@@ -1,217 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=sw
-TARGET=qa_unit
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-SHL1OBJS=\
- $(SLO)$/Test-BigPtrArray.obj \
- $(SLO)$/bparr.obj
-
-SHL1TARGET=$(TARGET)
-SHL1STDLIBS=$(SALLIB) $(TOOLSLIB) $(CPPUNITLIB)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-
-DEF1NAME =$(SHL1TARGET)
-
-SHL1VERSIONMAP = export.map
-
-# 2nd test ------------------------------------------------------------------
-
-SHL2OBJS=$(SLO)$/swdoc-test.obj
-SHL2TARGET=swdoctest
-SHL2STDLIBS+= \
- $(LNGLIB) \
- $(BASICLIB) \
- $(SFXLIB) \
- $(SVTOOLLIB) \
- $(SVLLIB) \
- $(SVXCORELIB) \
- $(EDITENGLIB) \
- $(SVXLIB) \
- $(BASEGFXLIB) \
- $(DRAWINGLAYERLIB) \
- $(VCLLIB) \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(TKLIB) \
- $(VOSLIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(UNOTOOLSLIB) \
- $(SOTLIB) \
- $(XMLOFFLIB) \
- $(ICUUCLIB) \
- $(I18NUTILLIB) \
- $(AVMEDIALIB) \
- $(CPPUNITLIB)
-
-.IF "$(DBG_LEVEL)">="2"
-SHL2STDLIBS += $(LIBXML2LIB)
-.ENDIF
-
-SHL2IMPLIB= i$(SHL2TARGET)
-DEF2NAME =$(SHL2TARGET)
-SHL2VERSIONMAP = export.map
-
-# linking statically against sw parts
-SHL2LIBS=\
- $(SLB)$/swall.lib \
- $(SLB)$/core1.lib \
- $(SLB)$/core2.lib \
- $(SLB)$/core3.lib \
- $(SLB)$/core4.lib \
- $(SLB)$/filter.lib \
- $(SLB)$/ui1.lib \
- $(SLB)$/ui2.lib
-
-SHL3OBJS=$(SLO)$/filters-test.obj
-SHL3TARGET=swfilterstest
-SHL3STDLIBS+= \
- $(ISWLIB) \
- $(LNGLIB) \
- $(BASICLIB) \
- $(SFXLIB) \
- $(SVTOOLLIB) \
- $(SVLLIB) \
- $(SVXCORELIB) \
- $(EDITENGLIB) \
- $(SVXLIB) \
- $(BASEGFXLIB) \
- $(DRAWINGLAYERLIB) \
- $(VCLLIB) \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(TKLIB) \
- $(VOSLIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(UNOTOOLSLIB) \
- $(SOTLIB) \
- $(XMLOFFLIB) \
- $(ICUUCLIB) \
- $(I18NUTILLIB) \
- $(AVMEDIALIB) \
- $(CPPUNITLIB)
-
-.IF "$(DBG_LEVEL)">="2"
-SHL3STDLIBS += $(LIBXML2LIB)
-.ENDIF
-
-SHL3IMPLIB= i$(SHL3TARGET)
-DEF3NAME =$(SHL3TARGET)
-SHL3VERSIONMAP = export.map
-
-# END ------------------------------------------------------------------
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(OS)" == "WNT"
-my_file = file:///
-.ELSE
-my_file = file://
-.END
-
-ALLTAR: test
-
-$(MISC)$/$(TARGET)$/types.rdb .ERRREMOVE : $(SOLARBINDIR)$/types.rdb
- $(MKDIRHIER) $(@:d)
- $(GNUCOPY) $? $@
-
-$(MISC)/$(TARGET)/udkapi.rdb .ERRREMOVE : $(SOLARBINDIR)$/udkapi.rdb
- $(MKDIRHIER) $(@:d)
- $(GNUCOPY) $? $@
-
-#Make a services.rdb with the services we know we need to get up and running
-$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : $(MISC)/$(TARGET)/udkapi.rdb makefile.mk
- $(MKDIRHIER) $(@:d)
- $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
- -c $(DLLPRE)sw$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)fileacc$(DLLPOST) \
- -c $(DLLPRE)fwk$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)sfx$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)ucb1$(DLLPOST) \
- -c $(DLLPRE)ucpfile1$(DLLPOST) \
- -c $(DLLPRE)unoxml$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)comphelp$(COMPHLP_MAJOR)$(COMID)$(DLLPOST) \
- -c $(DLLPRE)xstor$(DLLPOST) \
- -c $(DLLPRE)package2$(DLLPOST) \
- -c $(DLLPRE)xof$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)utl$(DLLPOSTFIX)$(DLLPOST) \
- -c stocservices.uno$(DLLPOST) \
- -c reflection.uno$(DLLPOST) \
- -c i18npool.uno$(DLLPOST) \
- -c sax.uno$(DLLPOST)
-
-#Tweak things so that we use the .res files in the solver
-STAR_RESOURCEPATH:=$(PWD)/$(BIN)$(PATH_SEPERATOR)$(SOLARBINDIR)
-.EXPORT : STAR_RESOURCEPATH
-
-test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(MISC)/$(TARGET)/services.rdb $(MISC)$/$(TARGET)$/types.rdb $(MISC)/$(TARGET)/udkapi.rdb
- echo "$(STAR_RESOURCEPATH)"
- @echo ----------------------------------------------------------
- @echo - start unit test \#1 on library $(SHL1TARGETN)
- @echo ----------------------------------------------------------
- $(CPPUNITTESTER) $(SHL1TARGETN)
- @echo ----------------------------------------------------------
- @echo - start unit test \#2 on library $(SHL2TARGETN)
- @echo ----------------------------------------------------------
- $(CPPUNITTESTER) $(SHL2TARGETN) -headless -invisible \
- -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
- -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
- -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
- @echo ----------------------------------------------------------
- @echo - start unit test \#3 on library $(SHL3TARGETN)
- @echo ----------------------------------------------------------
- $(CPPUNITTESTER) $(SHL3TARGETN) -headless -invisible \
- -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
- -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
- -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index 8c1b43e752de..ae399b80b3d7 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -69,7 +69,7 @@ SO2_IMPL_REF(SwDocShell)
using namespace ::com::sun::star;
-static USHORT aWndFunc(Window *, USHORT, const String &, const String &)
+static sal_uInt16 aWndFunc(Window *, sal_uInt16, const String &, const String &)
{
return ERRCODE_BUTTON_OK;
}
diff --git a/sw/qa/unoapi/Test.java b/sw/qa/unoapi/Test.java
index e0311cc069bb..8a5b9b58fb95 100644
--- a/sw/qa/unoapi/Test.java
+++ b/sw/qa/unoapi/Test.java
@@ -27,6 +27,7 @@ package org.openoffice.sw.qa.unoapi;
import org.openoffice.Runner;
import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.Argument;
import static org.junit.Assert.*;
public final class Test {
@@ -43,8 +44,8 @@ public final class Test {
@org.junit.Test public void test() {
assertTrue(
Runner.run(
- "-sce", "sw.sce", "-xcl", "knownissues.xcl", "-tdoc",
- "testdocuments", "-cs", connection.getDescription()));
+ "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
+ Argument.get("tdoc"), "-cs", connection.getDescription()));
}
private final OfficeConnection connection = new OfficeConnection();
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
index 4f8e3953dfcf..99d7c7f12881 100644
--- a/sw/qa/unoapi/knownissues.xcl
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -170,3 +170,17 @@ sw.SwXTextEmbeddedObject::com::sun::star::document::XEmbeddedObjectSupplier
### i111332 ###
sw.XMLStylesExporter::com::sun::star::document::XFilter
+
+### i113020 ###
+sw.SwXTextEmbeddedObject::com::sun::star::beans::XPropertySet
+sw.SwXTextGraphicObject::com::sun::star::beans::XPropertySet
+sw.SwXTextFrame::com::sun::star::beans::XPropertySet
+
+### i113136 ###
+sw.SwAccessibleParagraphView::com::sun::star::accessibility::XAccessibleEditableText
+
+### i114205 ###
+sw.SwAccessibleParagraphView::com::sun::star::accessibility::XAccessibleText
+
+### i114889 ###
+sw.SwXTextViewCursor::com::sun::star::view::XScreenCursor
diff --git a/sw/qa/unoapi/lastCheck.txt b/sw/qa/unoapi/lastCheck.txt
deleted file mode 100644
index b222cd4719d7..000000000000
--- a/sw/qa/unoapi/lastCheck.txt
+++ /dev/null
@@ -1 +0,0 @@
-sw: checked with cws_tleamisc that is based on src680_m47
diff --git a/sw/qa/unoapi/makefile.mk b/sw/qa/unoapi/makefile.mk
deleted file mode 100644
index f5102c2c9c84..000000000000
--- a/sw/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = sw
-TARGET = qa_unoapi
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/sw/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
index 0f1092af8a51..f6ae766af2d7 100644
--- a/sw/qa/unoapi/sw.sce
+++ b/sw/qa/unoapi/sw.sce
@@ -5,9 +5,9 @@
#i111197 -o sw.SwAccessibleDocumentPageView
#i86751 -o sw.SwAccessibleDocumentView
-o sw.SwAccessibleEndnoteView
--o sw.SwAccessibleFooterView
--o sw.SwAccessibleFootnoteView
--o sw.SwAccessibleHeaderView
+#i113142 -o sw.SwAccessibleFooterView
+#i114637 -o sw.SwAccessibleFootnoteView
+#i113142 -o sw.SwAccessibleHeaderView
#i89022 -o sw.SwAccessiblePageView
-o sw.SwAccessibleParagraphView
-o sw.SwAccessibleTableCellView