diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-03-14 16:51:14 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-03-14 16:51:14 +0000 |
commit | ed40f62e64564d2b22c9285cfdc6778aeac8fd68 (patch) | |
tree | 1a29a28c991a80ec1f3c6de1ce0cd28d4996fe21 /sw/source/ui/uno | |
parent | 6cd7d7c69ce62fbf788fc4e971cb14ab24d4c5ed (diff) | |
parent | 20529755b301c7af2c5ab461329b2d979b2cdbff (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Conflicts:
starmath/inc/applicat.hxx
starmath/inc/dialog.hxx
starmath/inc/document.hxx
starmath/inc/edit.hxx
starmath/inc/format.hxx
starmath/inc/node.hxx
starmath/inc/parse.hxx
starmath/inc/rect.hxx
starmath/inc/smdll.hxx
starmath/inc/smmod.hxx
starmath/inc/starmath.hrc
starmath/inc/symbol.hxx
starmath/inc/toolbox.hxx
starmath/inc/utility.hxx
starmath/inc/view.hxx
starmath/prj/build.lst
starmath/qa/cppunit/version.map
starmath/sdi/smslots.sdi
starmath/source/accessibility.cxx
starmath/source/cfgitem.cxx
starmath/source/cfgitem.hxx
starmath/source/config.cxx
starmath/source/dialog.cxx
starmath/source/document.cxx
starmath/source/edit.cxx
starmath/source/format.cxx
starmath/source/makefile.mk
starmath/source/math_pch.cxx
starmath/source/mathmlexport.cxx
starmath/source/mathmlimport.cxx
starmath/source/mathtype.cxx
starmath/source/node.cxx
starmath/source/parse.cxx
starmath/source/rect.cxx
starmath/source/register.cxx
starmath/source/smdetect.cxx
starmath/source/smdll.cxx
starmath/source/smmod.cxx
starmath/source/smres.src
starmath/source/symbol.cxx
starmath/source/toolbox.cxx
starmath/source/unomodel.cxx
starmath/source/utility.cxx
starmath/source/view.cxx
sw/JunitTest_sw_unoapi.mk
sw/Library_swd.mk
sw/Makefile
sw/inc/IDocumentFieldsAccess.hxx
sw/inc/IDocumentSettingAccess.hxx
sw/inc/IDocumentUndoRedo.hxx
sw/inc/IShellCursorSupplier.hxx
sw/inc/SwUndoField.hxx
sw/inc/acmplwrd.hxx
sw/inc/authfld.hxx
sw/inc/bparr.hxx
sw/inc/calbck.hxx
sw/inc/calc.hxx
sw/inc/ccoll.hxx
sw/inc/cellatr.hxx
sw/inc/cellfml.hxx
sw/inc/chpfld.hxx
sw/inc/cmdid.h
sw/inc/crsrsh.hxx
sw/inc/crstate.hxx
sw/inc/dbfld.hxx
sw/inc/dbmgr.hxx
sw/inc/dcontact.hxx
sw/inc/ddefld.hxx
sw/inc/doc.hxx
sw/inc/docary.hxx
sw/inc/docsh.hxx
sw/inc/docstat.hxx
sw/inc/docstyle.hxx
sw/inc/docufld.hxx
sw/inc/editsh.hxx
sw/inc/errhdl.hxx
sw/inc/expfld.hxx
sw/inc/fchrfmt.hxx
sw/inc/fesh.hxx
sw/inc/fldbas.hxx
sw/inc/flddat.hxx
sw/inc/flddropdown.hxx
sw/inc/flypos.hxx
sw/inc/fmtanchr.hxx
sw/inc/fmtautofmt.hxx
sw/inc/fmtclds.hxx
sw/inc/fmtcnct.hxx
sw/inc/fmtcol.hxx
sw/inc/fmtfsize.hxx
sw/inc/fmtftn.hxx
sw/inc/fmtftntx.hxx
sw/inc/fmthdft.hxx
sw/inc/fmtinfmt.hxx
sw/inc/fmtline.hxx
sw/inc/fmtornt.hxx
sw/inc/fmtpdsc.hxx
sw/inc/fmtruby.hxx
sw/inc/fmtsrnd.hxx
sw/inc/fmturl.hxx
sw/inc/fmtwrapinfluenceonobjpos.hxx
sw/inc/format.hxx
sw/inc/frmatr.hxx
sw/inc/frmfmt.hxx
sw/inc/grfatr.hxx
sw/inc/helpid.h
sw/inc/hintids.hxx
sw/inc/hints.hxx
sw/inc/htmltbl.hxx
sw/inc/inetfld.hxx
sw/inc/io.hxx
sw/inc/iodetect.hxx
sw/inc/itabenum.hxx
sw/inc/ndarr.hxx
sw/inc/ndgrf.hxx
sw/inc/ndindex.hxx
sw/inc/ndnotxt.hxx
sw/inc/ndole.hxx
sw/inc/ndtxt.hxx
sw/inc/ndtyp.hxx
sw/inc/node.hxx
sw/inc/numrule.hxx
sw/inc/pagedesc.hxx
sw/inc/pagepreviewlayout.hxx
sw/inc/pam.hxx
sw/inc/paratr.hxx
sw/inc/poolfmt.awk
sw/inc/poolfmt.hxx
sw/inc/printdata.hxx
sw/inc/reffld.hxx
sw/inc/shellio.hxx
sw/inc/shellres.hxx
sw/inc/swabstdlg.hxx
sw/inc/swatrset.hxx
sw/inc/swerror.h
sw/inc/swprtopt.hxx
sw/inc/swtable.hxx
sw/inc/swtypes.hxx
sw/inc/tblafmt.hxx
sw/inc/tgrditem.hxx
sw/inc/tox.hxx
sw/inc/undobj.hxx
sw/inc/unocoll.hxx
sw/inc/unoframe.hxx
sw/inc/unoprnms.hxx
sw/inc/usrfld.hxx
sw/inc/viewopt.hxx
sw/inc/viewsh.hxx
sw/inc/viscrs.hxx
sw/prj/build.lst
sw/qa/complex/accessibility/makefile.mk
sw/qa/core/Test-BigPtrArray.cxx
sw/qa/core/makefile.mk
sw/sdi/makefile.mk
sw/source/core/access/makefile.mk
sw/source/core/access/textmarkuphelper.cxx
sw/source/core/attr/calbck.cxx
sw/source/core/attr/cellatr.cxx
sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
sw/source/core/attr/format.cxx
sw/source/core/attr/hints.cxx
sw/source/core/bastyp/calc.cxx
sw/source/core/bastyp/init.cxx
sw/source/core/bastyp/makefile.mk
sw/source/core/bastyp/swcache.cxx
sw/source/core/crsr/bookmrk.cxx
sw/source/core/crsr/callnk.cxx
sw/source/core/crsr/crsrsh.cxx
sw/source/core/crsr/crstrvl.cxx
sw/source/core/crsr/findattr.cxx
sw/source/core/crsr/findcoll.cxx
sw/source/core/crsr/makefile.mk
sw/source/core/crsr/pam.cxx
sw/source/core/crsr/swcrsr.cxx
sw/source/core/crsr/trvltbl.cxx
sw/source/core/crsr/unocrsr.cxx
sw/source/core/crsr/viscrs.cxx
sw/source/core/doc/acmplwrd.cxx
sw/source/core/doc/doc.cxx
sw/source/core/doc/docbm.cxx
sw/source/core/doc/doccomp.cxx
sw/source/core/doc/docdesc.cxx
sw/source/core/doc/docdraw.cxx
sw/source/core/doc/docedt.cxx
sw/source/core/doc/docfld.cxx
sw/source/core/doc/docfly.cxx
sw/source/core/doc/docfmt.cxx
sw/source/core/doc/docftn.cxx
sw/source/core/doc/docglbl.cxx
sw/source/core/doc/docglos.cxx
sw/source/core/doc/doclay.cxx
sw/source/core/doc/docnew.cxx
sw/source/core/doc/docnum.cxx
sw/source/core/doc/docredln.cxx
sw/source/core/doc/docruby.cxx
sw/source/core/doc/docsort.cxx
sw/source/core/doc/docstat.cxx
sw/source/core/doc/doctxm.cxx
sw/source/core/doc/fmtcol.cxx
sw/source/core/doc/gctable.cxx
sw/source/core/doc/htmltbl.cxx
sw/source/core/doc/makefile.mk
sw/source/core/doc/number.cxx
sw/source/core/doc/poolfmt.cxx
sw/source/core/doc/tblafmt.cxx
sw/source/core/doc/tblcpy.cxx
sw/source/core/doc/tblrwcl.cxx
sw/source/core/docnode/makefile.mk
sw/source/core/docnode/ndcopy.cxx
sw/source/core/docnode/ndnum.cxx
sw/source/core/docnode/ndsect.cxx
sw/source/core/docnode/ndtbl.cxx
sw/source/core/docnode/ndtbl1.cxx
sw/source/core/docnode/node.cxx
sw/source/core/docnode/node2lay.cxx
sw/source/core/docnode/nodes.cxx
sw/source/core/docnode/section.cxx
sw/source/core/docnode/swbaslnk.cxx
sw/source/core/draw/dcontact.cxx
sw/source/core/draw/dflyobj.cxx
sw/source/core/draw/drawdoc.cxx
sw/source/core/draw/dview.cxx
sw/source/core/draw/makefile.mk
sw/source/core/edit/autofmt.cxx
sw/source/core/edit/edattr.cxx
sw/source/core/edit/eddel.cxx
sw/source/core/edit/edfcol.cxx
sw/source/core/edit/edfld.cxx
sw/source/core/edit/edfldexp.cxx
sw/source/core/edit/edfmt.cxx
sw/source/core/edit/edglss.cxx
sw/source/core/edit/editsh.cxx
sw/source/core/edit/edlingu.cxx
sw/source/core/edit/ednumber.cxx
sw/source/core/edit/edsect.cxx
sw/source/core/edit/edtab.cxx
sw/source/core/edit/edtox.cxx
sw/source/core/edit/edundo.cxx
sw/source/core/edit/makefile.mk
sw/source/core/except/dbgloop.cxx
sw/source/core/except/errhdl.cxx
sw/source/core/fields/authfld.cxx
sw/source/core/fields/cellfml.cxx
sw/source/core/fields/chpfld.cxx
sw/source/core/fields/dbfld.cxx
sw/source/core/fields/ddefld.cxx
sw/source/core/fields/ddetbl.cxx
sw/source/core/fields/docufld.cxx
sw/source/core/fields/expfld.cxx
sw/source/core/fields/fldbas.cxx
sw/source/core/fields/flddat.cxx
sw/source/core/fields/flddropdown.cxx
sw/source/core/fields/macrofld.cxx
sw/source/core/fields/makefile.mk
sw/source/core/fields/reffld.cxx
sw/source/core/fields/scrptfld.cxx
sw/source/core/fields/tblcalc.cxx
sw/source/core/fields/usrfld.cxx
sw/source/core/frmedt/fecopy.cxx
sw/source/core/frmedt/fedesc.cxx
sw/source/core/frmedt/fefly1.cxx
sw/source/core/frmedt/feshview.cxx
sw/source/core/frmedt/fetab.cxx
sw/source/core/frmedt/fews.cxx
sw/source/core/frmedt/makefile.mk
sw/source/core/frmedt/tblsel.cxx
sw/source/core/graphic/grfatr.cxx
sw/source/core/inc/SwUndoFmt.hxx
sw/source/core/inc/SwUndoTOXChange.hxx
sw/source/core/inc/anchoredobjectposition.hxx
sw/source/core/inc/dbgloop.hxx
sw/source/core/inc/drawfont.hxx
sw/source/core/inc/flowfrm.hxx
sw/source/core/inc/frame.hxx
sw/source/core/inc/frmtool.hxx
sw/source/core/inc/layact.hxx
sw/source/core/inc/layfrm.hxx
sw/source/core/inc/notxtfrm.hxx
sw/source/core/inc/rolbck.hxx
sw/source/core/inc/rootfrm.hxx
sw/source/core/inc/scriptinfo.hxx
sw/source/core/inc/swblocks.hxx
sw/source/core/inc/swcache.hxx
sw/source/core/inc/tabfrm.hxx
sw/source/core/inc/txmsrt.hxx
sw/source/core/inc/undoflystrattr.hxx
sw/source/core/inc/viewimp.hxx
sw/source/core/layout/atrfrm.cxx
sw/source/core/layout/calcmove.cxx
sw/source/core/layout/dbg_lay.cxx
sw/source/core/layout/findfrm.cxx
sw/source/core/layout/flowfrm.cxx
sw/source/core/layout/fly.cxx
sw/source/core/layout/flycnt.cxx
sw/source/core/layout/flyincnt.cxx
sw/source/core/layout/flylay.cxx
sw/source/core/layout/frmtool.cxx
sw/source/core/layout/ftnfrm.cxx
sw/source/core/layout/layact.cxx
sw/source/core/layout/laycache.cxx
sw/source/core/layout/makefile.mk
sw/source/core/layout/objectformatter.cxx
sw/source/core/layout/pagechg.cxx
sw/source/core/layout/pagedesc.cxx
sw/source/core/layout/paintfrm.cxx
sw/source/core/layout/sectfrm.cxx
sw/source/core/layout/tabfrm.cxx
sw/source/core/layout/trvlfrm.cxx
sw/source/core/layout/unusedf.cxx
sw/source/core/layout/wsfrm.cxx
sw/source/core/makefile.mk
sw/source/core/objectpositioning/anchoredobjectposition.cxx
sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
sw/source/core/objectpositioning/makefile.mk
sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
sw/source/core/ole/ndole.cxx
sw/source/core/para/makefile.mk
sw/source/core/para/paratr.cxx
sw/source/core/sw3io/makefile.mk
sw/source/core/sw3io/sw3convert.cxx
sw/source/core/swg/SwXMLTextBlocks.cxx
sw/source/core/swg/makefile.mk
sw/source/core/swg/swblocks.cxx
sw/source/core/table/swnewtable.cxx
sw/source/core/table/swtable.cxx
sw/source/core/text/EnhancedPDFExportHelper.cxx
sw/source/core/text/atrstck.cxx
sw/source/core/text/frmcrsr.cxx
sw/source/core/text/frmform.cxx
sw/source/core/text/itrcrsr.cxx
sw/source/core/text/itrform2.cxx
sw/source/core/text/makefile.mk
sw/source/core/text/porlay.cxx
sw/source/core/text/pormulti.cxx
sw/source/core/text/txtfld.cxx
sw/source/core/text/txtfrm.cxx
sw/source/core/text/txtio.cxx
sw/source/core/tox/makefile.mk
sw/source/core/tox/txmsrt.cxx
sw/source/core/txtnode/fmtatr2.cxx
sw/source/core/txtnode/fntcache.cxx
sw/source/core/txtnode/fntcap.cxx
sw/source/core/txtnode/makefile.mk
sw/source/core/txtnode/ndhints.cxx
sw/source/core/txtnode/ndtxt.cxx
sw/source/core/txtnode/swfont.cxx
sw/source/core/txtnode/thints.cxx
sw/source/core/txtnode/txtatr2.cxx
sw/source/core/txtnode/txtedt.cxx
sw/source/core/undo/SwUndoField.cxx
sw/source/core/undo/SwUndoPageDesc.cxx
sw/source/core/undo/SwUndoTOXChange.cxx
sw/source/core/undo/docundo.cxx
sw/source/core/undo/makefile.mk
sw/source/core/undo/rolbck.cxx
sw/source/core/undo/unbkmk.cxx
sw/source/core/undo/undel.cxx
sw/source/core/undo/undobj.cxx
sw/source/core/undo/undobj1.cxx
sw/source/core/undo/unfmco.cxx
sw/source/core/undo/unins.cxx
sw/source/core/undo/unnum.cxx
sw/source/core/undo/unoutl.cxx
sw/source/core/undo/unredln.cxx
sw/source/core/undo/unsect.cxx
sw/source/core/undo/unsort.cxx
sw/source/core/undo/unspnd.cxx
sw/source/core/undo/untbl.cxx
sw/source/core/unocore/makefile.mk
sw/source/core/unocore/swunohelper.cxx
sw/source/core/unocore/unobkm.cxx
sw/source/core/unocore/unocoll.cxx
sw/source/core/unocore/unocrsrhelper.cxx
sw/source/core/unocore/unodraw.cxx
sw/source/core/unocore/unofield.cxx
sw/source/core/unocore/unoframe.cxx
sw/source/core/unocore/unomap.cxx
sw/source/core/unocore/unoprnms.cxx
sw/source/core/unocore/unoredlines.cxx
sw/source/core/unocore/unosett.cxx
sw/source/core/unocore/unosrch.cxx
sw/source/core/unocore/unostyle.cxx
sw/source/core/unocore/unotbl.cxx
sw/source/core/view/vdraw.cxx
sw/source/core/view/viewimp.cxx
sw/source/core/view/viewpg.cxx
sw/source/core/view/viewsh.cxx
sw/source/core/view/vnew.cxx
sw/source/core/view/vprint.cxx
sw/source/filter/ascii/ascatr.cxx
sw/source/filter/ascii/makefile.mk
sw/source/filter/ascii/wrtasc.cxx
sw/source/filter/basflt/fltini.cxx
sw/source/filter/basflt/iodetect.cxx
sw/source/filter/basflt/makefile.mk
sw/source/filter/html/SwAppletImpl.cxx
sw/source/filter/html/css1atr.cxx
sw/source/filter/html/htmlatr.cxx
sw/source/filter/html/htmlbas.cxx
sw/source/filter/html/htmlcss1.cxx
sw/source/filter/html/htmlfly.cxx
sw/source/filter/html/htmlftn.cxx
sw/source/filter/html/htmlgrin.cxx
sw/source/filter/html/htmlnum.cxx
sw/source/filter/html/htmlplug.cxx
sw/source/filter/html/htmltab.cxx
sw/source/filter/html/makefile.mk
sw/source/filter/html/parcss1.cxx
sw/source/filter/html/svxcss1.cxx
sw/source/filter/html/swhtml.cxx
sw/source/filter/inc/msfilter.hxx
sw/source/filter/inc/wrtswtbl.hxx
sw/source/filter/rtf/makefile.mk
sw/source/filter/rtf/rtffly.cxx
sw/source/filter/rtf/rtfnum.cxx
sw/source/filter/rtf/rtftbl.cxx
sw/source/filter/rtf/swparrtf.cxx
sw/source/filter/rtf/swparrtf.hxx
sw/source/filter/writer/makefile.mk
sw/source/filter/writer/writer.cxx
sw/source/filter/writer/wrt_fn.cxx
sw/source/filter/writer/wrtswtbl.cxx
sw/source/filter/ww1/fltshell.cxx
sw/source/filter/ww1/makefile.mk
sw/source/filter/ww1/w1class.cxx
sw/source/filter/ww1/w1class.hxx
sw/source/filter/ww1/w1filter.cxx
sw/source/filter/ww1/w1par.cxx
sw/source/filter/ww1/w1sprm.cxx
sw/source/filter/ww1/w1struct.hxx
sw/source/filter/ww8/README-rtf.txt
sw/source/filter/ww8/attributeoutputbase.hxx
sw/source/filter/ww8/docxattributeoutput.cxx
sw/source/filter/ww8/docxattributeoutput.hxx
sw/source/filter/ww8/docxexport.cxx
sw/source/filter/ww8/docxexport.hxx
sw/source/filter/ww8/docxexportfilter.cxx
sw/source/filter/ww8/dump/dump8.cxx
sw/source/filter/ww8/dump/dump8a.cxx
sw/source/filter/ww8/dump/msvbasic.cxx
sw/source/filter/ww8/dump/msvbasic.hxx
sw/source/filter/ww8/dump/ww8darr.cxx
sw/source/filter/ww8/dump/ww8darr.hxx
sw/source/filter/ww8/dump/ww8dout.cxx
sw/source/filter/ww8/dump/ww8dout.hxx
sw/source/filter/ww8/dump/ww8scan.cxx
sw/source/filter/ww8/dump/ww8scan.hxx
sw/source/filter/ww8/dump/ww8struc.hxx
sw/source/filter/ww8/makefile.mk
sw/source/filter/ww8/rtfattributeoutput.cxx
sw/source/filter/ww8/rtfattributeoutput.hxx
sw/source/filter/ww8/rtfexport.cxx
sw/source/filter/ww8/rtfexport.hxx
sw/source/filter/ww8/rtfexportfilter.cxx
sw/source/filter/ww8/rtfexportfilter.hxx
sw/source/filter/ww8/rtfimportfilter.cxx
sw/source/filter/ww8/rtfimportfilter.hxx
sw/source/filter/ww8/rtfsdrexport.cxx
sw/source/filter/ww8/rtfsdrexport.hxx
sw/source/filter/ww8/writerhelper.cxx
sw/source/filter/ww8/writerwordglue.cxx
sw/source/filter/ww8/wrtw8esh.cxx
sw/source/filter/ww8/wrtw8nds.cxx
sw/source/filter/ww8/wrtw8num.cxx
sw/source/filter/ww8/wrtw8sty.cxx
sw/source/filter/ww8/wrtww8.cxx
sw/source/filter/ww8/wrtww8.hxx
sw/source/filter/ww8/wrtww8gr.cxx
sw/source/filter/ww8/ww8atr.cxx
sw/source/filter/ww8/ww8attributeoutput.hxx
sw/source/filter/ww8/ww8graf.cxx
sw/source/filter/ww8/ww8graf.hxx
sw/source/filter/ww8/ww8graf2.cxx
sw/source/filter/ww8/ww8par.cxx
sw/source/filter/ww8/ww8par.hxx
sw/source/filter/ww8/ww8par2.cxx
sw/source/filter/ww8/ww8par3.cxx
sw/source/filter/ww8/ww8par5.cxx
sw/source/filter/ww8/ww8par6.cxx
sw/source/filter/ww8/ww8scan.cxx
sw/source/filter/ww8/ww8scan.hxx
sw/source/filter/ww8/ww8struc.hxx
sw/source/filter/xml/makefile.mk
sw/source/filter/xml/xmlimpit.cxx
sw/source/filter/xml/xmltble.cxx
sw/source/filter/xml/xmltbli.cxx
sw/source/ui/app/appenv.cxx
sw/source/ui/app/apphdl.cxx
sw/source/ui/app/applab.cxx
sw/source/ui/app/appopt.cxx
sw/source/ui/app/docsh.cxx
sw/source/ui/app/docsh2.cxx
sw/source/ui/app/docshini.cxx
sw/source/ui/app/docst.cxx
sw/source/ui/app/docstyle.cxx
sw/source/ui/app/makefile.mk
sw/source/ui/app/mn.src
sw/source/ui/app/swmodul1.cxx
sw/source/ui/cctrl/makefile.mk
sw/source/ui/cctrl/swlbox.cxx
sw/source/ui/chrdlg/break.cxx
sw/source/ui/chrdlg/ccoll.cxx
sw/source/ui/chrdlg/chardlg.cxx
sw/source/ui/chrdlg/drpcps.cxx
sw/source/ui/chrdlg/makefile.mk
sw/source/ui/chrdlg/numpara.cxx
sw/source/ui/chrdlg/pardlg.cxx
sw/source/ui/chrdlg/swuiccoll.cxx
sw/source/ui/config/barcfg.cxx
sw/source/ui/config/caption.cxx
sw/source/ui/config/cfgitems.cxx
sw/source/ui/config/fontcfg.cxx
sw/source/ui/config/mailconfigpage.cxx
sw/source/ui/config/makefile.mk
sw/source/ui/config/modcfg.cxx
sw/source/ui/config/optcomp.cxx
sw/source/ui/config/optload.cxx
sw/source/ui/config/optpage.cxx
sw/source/ui/config/prtopt.cxx
sw/source/ui/config/uinums.cxx
sw/source/ui/config/usrpref.cxx
sw/source/ui/config/viewopt.cxx
sw/source/ui/dbui/dbinsdlg.cxx
sw/source/ui/dbui/dbmgr.cxx
sw/source/ui/dbui/dbtree.cxx
sw/source/ui/dbui/makefile.mk
sw/source/ui/dbui/mmaddressblockpage.cxx
sw/source/ui/dbui/mmdocselectpage.cxx
sw/source/ui/dbui/mmoutputpage.cxx
sw/source/ui/dbui/swdbtoolsclient.cxx
sw/source/ui/dialog/abstract.cxx
sw/source/ui/dialog/ascfldlg.cxx
sw/source/ui/dialog/macassgn.cxx
sw/source/ui/dialog/makefile.mk
sw/source/ui/dialog/regionsw.cxx
sw/source/ui/dialog/swdlgfact.cxx
sw/source/ui/dialog/swdlgfact.hxx
sw/source/ui/dialog/uiregionsw.cxx
sw/source/ui/dochdl/gloshdl.cxx
sw/source/ui/dochdl/makefile.mk
sw/source/ui/dochdl/swdtflvr.cxx
sw/source/ui/docvw/PostItMgr.cxx
sw/source/ui/docvw/SidebarWin.cxx
sw/source/ui/docvw/edtdd.cxx
sw/source/ui/docvw/edtwin.cxx
sw/source/ui/docvw/edtwin2.cxx
sw/source/ui/docvw/edtwin3.cxx
sw/source/ui/docvw/makefile.mk
sw/source/ui/docvw/romenu.cxx
sw/source/ui/docvw/romenu.hxx
sw/source/ui/docvw/srcedtw.cxx
sw/source/ui/envelp/envfmt.cxx
sw/source/ui/envelp/envimg.cxx
sw/source/ui/envelp/envlop1.cxx
sw/source/ui/envelp/envprt.cxx
sw/source/ui/envelp/label1.cxx
sw/source/ui/envelp/labfmt.cxx
sw/source/ui/envelp/labprt.cxx
sw/source/ui/envelp/mailmrge.cxx
sw/source/ui/envelp/makefile.mk
sw/source/ui/fldui/flddb.cxx
sw/source/ui/fldui/flddinf.cxx
sw/source/ui/fldui/flddok.cxx
sw/source/ui/fldui/fldedt.cxx
sw/source/ui/fldui/fldfunc.cxx
sw/source/ui/fldui/fldmgr.cxx
sw/source/ui/fldui/fldpage.cxx
sw/source/ui/fldui/fldref.cxx
sw/source/ui/fldui/fldtdlg.cxx
sw/source/ui/fldui/fldvar.cxx
sw/source/ui/fldui/fldwrap.cxx
sw/source/ui/fldui/inpdlg.cxx
sw/source/ui/fldui/makefile.mk
sw/source/ui/fmtui/makefile.mk
sw/source/ui/fmtui/tmpdlg.cxx
sw/source/ui/frmdlg/colmgr.cxx
sw/source/ui/frmdlg/column.cxx
sw/source/ui/frmdlg/cption.cxx
sw/source/ui/frmdlg/frmdlg.cxx
sw/source/ui/frmdlg/frmmgr.cxx
sw/source/ui/frmdlg/frmpage.cxx
sw/source/ui/frmdlg/makefile.mk
sw/source/ui/frmdlg/wrap.cxx
sw/source/ui/globdoc/makefile.mk
sw/source/ui/inc/bmpwin.hxx
sw/source/ui/inc/colmgr.hxx
sw/source/ui/inc/column.hxx
sw/source/ui/inc/envimg.hxx
sw/source/ui/inc/envlop.hxx
sw/source/ui/inc/frmpage.hxx
sw/source/ui/inc/inputwin.hxx
sw/source/ui/inc/javaedit.hxx
sw/source/ui/inc/num.hxx
sw/source/ui/inc/optpage.hxx
sw/source/ui/inc/regionsw.hxx
sw/source/ui/inc/split.hxx
sw/source/ui/inc/swlbox.hxx
sw/source/ui/inc/swmn_tmpl.hrc
sw/source/ui/inc/swuiidxmrk.hxx
sw/source/ui/inc/tabsh.hxx
sw/source/ui/inc/toxmgr.hxx
sw/source/ui/inc/uiitems.hxx
sw/source/ui/inc/view.hxx
sw/source/ui/inc/workctrl.hxx
sw/source/ui/inc/wrap.hxx
sw/source/ui/inc/wrtsh.hxx
sw/source/ui/index/cnttab.cxx
sw/source/ui/index/makefile.mk
sw/source/ui/index/toxmgr.cxx
sw/source/ui/lingu/hhcwrp.cxx
sw/source/ui/lingu/makefile.mk
sw/source/ui/lingu/olmenu.cxx
sw/source/ui/misc/bookmark.cxx
sw/source/ui/misc/docfnote.cxx
sw/source/ui/misc/glosbib.cxx
sw/source/ui/misc/glosdoc.cxx
sw/source/ui/misc/glshell.cxx
sw/source/ui/misc/insfnote.cxx
sw/source/ui/misc/linenum.cxx
sw/source/ui/misc/makefile.mk
sw/source/ui/misc/num.cxx
sw/source/ui/misc/numberingtypelistbox.cxx
sw/source/ui/misc/outline.cxx
sw/source/ui/misc/pgfnote.cxx
sw/source/ui/misc/pggrid.cxx
sw/source/ui/misc/redlndlg.cxx
sw/source/ui/misc/srtdlg.cxx
sw/source/ui/misc/swmodalredlineacceptdlg.cxx
sw/source/ui/ribbar/conarc.cxx
sw/source/ui/ribbar/drawbase.cxx
sw/source/ui/ribbar/inputwin.cxx
sw/source/ui/ribbar/inputwin.src
sw/source/ui/ribbar/makefile.mk
sw/source/ui/ribbar/tbxanchr.cxx
sw/source/ui/ribbar/workctrl.cxx
sw/source/ui/ribbar/workctrl.src
sw/source/ui/shells/annotsh.cxx
sw/source/ui/shells/basesh.cxx
sw/source/ui/shells/beziersh.cxx
sw/source/ui/shells/drawdlg.cxx
sw/source/ui/shells/drwbassh.cxx
sw/source/ui/shells/drwtxtex.cxx
sw/source/ui/shells/drwtxtsh.cxx
sw/source/ui/shells/frmsh.cxx
sw/source/ui/shells/grfsh.cxx
sw/source/ui/shells/grfshex.cxx
sw/source/ui/shells/makefile.mk
sw/source/ui/shells/tabsh.cxx
sw/source/ui/shells/textfld.cxx
sw/source/ui/shells/textglos.cxx
sw/source/ui/shells/textsh.cxx
sw/source/ui/shells/textsh1.cxx
sw/source/ui/shells/txtattr.cxx
sw/source/ui/shells/txtcrsr.cxx
sw/source/ui/shells/txtnum.cxx
sw/source/ui/table/convert.cxx
sw/source/ui/table/instable.cxx
sw/source/ui/table/makefile.mk
sw/source/ui/table/swtablerep.cxx
sw/source/ui/table/tabledlg.cxx
sw/source/ui/table/tablemgr.cxx
sw/source/ui/table/tablepg.hxx
sw/source/ui/table/tautofmt.cxx
sw/source/ui/uiview/formatclipboard.cxx
sw/source/ui/uiview/makefile.mk
sw/source/ui/uiview/pview.cxx
sw/source/ui/uiview/pview.src
sw/source/ui/uiview/scroll.cxx
sw/source/ui/uiview/srcview.cxx
sw/source/ui/uiview/swcli.cxx
sw/source/ui/uiview/uivwimp.cxx
sw/source/ui/uiview/view.cxx
sw/source/ui/uiview/view1.cxx
sw/source/ui/uiview/view2.cxx
sw/source/ui/uiview/viewcoll.cxx
sw/source/ui/uiview/viewdlg2.cxx
sw/source/ui/uiview/viewling.cxx
sw/source/ui/uiview/viewmdi.cxx
sw/source/ui/uiview/viewport.cxx
sw/source/ui/uiview/viewprt.cxx
sw/source/ui/uiview/viewsrch.cxx
sw/source/ui/uiview/viewtab.cxx
sw/source/ui/uno/SwXDocumentSettings.cxx
sw/source/ui/uno/SwXPrintPreviewSettings.cxx
sw/source/ui/uno/SwXPrintPreviewSettings.hxx
sw/source/ui/uno/unoatxt.cxx
sw/source/ui/uno/unomod.cxx
sw/source/ui/uno/unotxdoc.cxx
sw/source/ui/uno/unotxvw.cxx
sw/source/ui/utlui/attrdesc.cxx
sw/source/ui/utlui/content.cxx
sw/source/ui/utlui/glbltree.cxx
sw/source/ui/utlui/initui.cxx
sw/source/ui/utlui/makefile.mk
sw/source/ui/utlui/navipi.cxx
sw/source/ui/utlui/navipi.src
sw/source/ui/utlui/numfmtlb.cxx
sw/source/ui/utlui/prcntfld.cxx
sw/source/ui/utlui/uiitems.cxx
sw/source/ui/utlui/uitool.cxx
sw/source/ui/utlui/unotools.cxx
sw/source/ui/utlui/viewlayoutctrl.cxx
sw/source/ui/utlui/zoomctrl.cxx
sw/source/ui/vba/makefile.mk
sw/source/ui/vba/service.cxx
sw/source/ui/web/makefile.mk
sw/source/ui/wrtsh/makefile.mk
sw/source/ui/wrtsh/wrtsh1.cxx
sw/source/ui/wrtsh/wrtsh2.cxx
sw/source/ui/wrtsh/wrtsh4.cxx
sw/source/ui/wrtsh/wrtundo.cxx
sw/util/hidother.src
sw/util/makefile.mk
sw/util/msword.map
Diffstat (limited to 'sw/source/ui/uno')
-rw-r--r-- | sw/source/ui/uno/SwXDocumentSettings.cxx | 34 | ||||
-rw-r--r-- | sw/source/ui/uno/SwXPrintPreviewSettings.cxx | 370 | ||||
-rw-r--r-- | sw/source/ui/uno/SwXPrintPreviewSettings.hxx | 90 | ||||
-rw-r--r-- | sw/source/ui/uno/detreg.cxx | 24 | ||||
-rw-r--r-- | sw/source/ui/uno/makefile.mk | 82 | ||||
-rw-r--r-- | sw/source/ui/uno/swdet2.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/uno/swdetect.cxx | 31 | ||||
-rw-r--r-- | sw/source/ui/uno/swdetect.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uno/unoatxt.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/uno/unofreg.cxx | 93 | ||||
-rw-r--r-- | sw/source/ui/uno/unomailmerge.cxx | 42 | ||||
-rw-r--r-- | sw/source/ui/uno/unomod.cxx | 64 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 223 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxvw.cxx | 33 |
14 files changed, 230 insertions, 882 deletions
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index d77b81be2aa3..a9d2f0b9b9c0 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -32,7 +32,6 @@ #include <osl/mutex.hxx> #include <sfx2/sfxbasecontroller.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <comphelper/MasterPropertySetInfo.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/i18n/XForbiddenCharacters.hpp> @@ -121,6 +120,7 @@ enum SwDocumentSettingsPropertyHandles HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- HANDLE_MODIFYPASSWORDINFO, + HANDLE_MATH_BASELINE_ALIGNMENT, HANDLE_INVERT_BORDER_SPACING, HANDLE_COLLAPSE_EMPTY_CELL_PARA }; @@ -177,6 +177,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() // --> OD 2008-06-05 #i89181# { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, CPPUTYPE_BOOLEAN, 0, 0}, /* @@ -220,7 +221,6 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel ) , mpPrinter( NULL ) { registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) ); - registerSlave ( new SwXPrintPreviewSettings ( mpModel->GetDocShell()->GetDoc() ) ); } SwXDocumentSettings::~SwXDocumentSettings() @@ -687,12 +687,18 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf uno::Reference< uno::XInterface >() ); } break; - case HANDLE_INVERT_BORDER_SPACING: - { + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); + mpDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, bTmp ); + } + break; + case HANDLE_INVERT_BORDER_SPACING: + { sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); mpDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, bTmp); - } - break; + } + break; case HANDLE_COLLAPSE_EMPTY_CELL_PARA: { sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); @@ -713,11 +719,7 @@ void SwXDocumentSettings::_postSetValues () // #i86352# the printer is also used as container for options by sfx // when setting a printer it should have decent default options SfxItemSet aOptions( mpPrinter->GetOptions() ); - SwPrintData aPrtData; - if( mpDoc->getPrintData() ) - aPrtData = *mpDoc->getPrintData(); - else - aPrtData = *SW_MOD()->GetPrtOptions(false); + SwPrintData aPrtData( mpDoc->getPrintData() ); SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, aPrtData); aOptions.Put(aAddPrinterItem); mpPrinter->SetOptions( aOptions ); @@ -758,14 +760,14 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf case HANDLE_FIELD_AUTO_UPDATE: { SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true); - BOOL bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS ); + sal_Bool bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS ); rValue.setValue(&bFieldUpd, ::getBooleanCppuType()); } break; case HANDLE_CHART_AUTO_UPDATE: { SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true); - BOOL bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS; + sal_Bool bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS; rValue.setValue(&bChartUpd, ::getBooleanCppuType()); } break; @@ -1030,6 +1032,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf rValue <<= mpDocSh->GetModifyPasswordInfo(); } break; + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + rValue.setValue( &bTmp, ::getBooleanCppuType() ); + } + break; case HANDLE_INVERT_BORDER_SPACING: { sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::INVERT_BORDER_SPACING); diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx deleted file mode 100644 index 35ef4c578447..000000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx +++ /dev/null @@ -1,370 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -#include <SwXPrintPreviewSettings.hxx> -#include <comphelper/ChainablePropertySetInfo.hxx> -#include <pvprtdat.hxx> -#include <swtypes.hxx> -#include <com/sun/star/beans/PropertyAttribute.hpp> -#include <doc.hxx> -#include <vcl/svapp.hxx> -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::lang; -using namespace ::comphelper; -using ::rtl::OUString; - -enum SwPrintSettingsPropertyHandles -{ - HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, - HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, - HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, - HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, - HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, - HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, - HANDLE_PRINTSET_PREVIEW_NUM_ROWS, - HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, - HANDLE_PRINTSET_PREVIEW_LANDSCAPE -}; - -static ChainablePropertySetInfo * lcl_createPrintPreviewSettingsInfo() -{ - static PropertyInfo aPrintPreviewSettingsMap_Impl[] = - { - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLeftMargin" ), HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintRightMargin" ), HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintTopMargin" ), HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintBottomMargin" ),HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintHorizontalSpacing" ),HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintVerticalSpacing" ), HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumRows" ), HANDLE_PRINTSET_PREVIEW_NUM_ROWS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumColumns" ), HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLandscape" ), HANDLE_PRINTSET_PREVIEW_LANDSCAPE, CPPUTYPE_BOOLEAN, PropertyAttribute::MAYBEVOID, 0 }, - { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } - }; - return new ChainablePropertySetInfo ( aPrintPreviewSettingsMap_Impl ); -} - -SwXPrintPreviewSettings::SwXPrintPreviewSettings( SwDoc *pDoc) -: ChainablePropertySet ( lcl_createPrintPreviewSettingsInfo (), &Application::GetSolarMutex() ) -, mbPreviewDataChanged( sal_False ) -, mpDoc( pDoc) -{ -} - -SwXPrintPreviewSettings::~SwXPrintPreviewSettings() - throw() -{ -} - -Any SAL_CALL SwXPrintPreviewSettings::queryInterface( const Type& rType ) - throw(RuntimeException) -{ - return ::cppu::queryInterface ( rType , - // OWeakObject interfaces - dynamic_cast< XInterface* >( dynamic_cast< OWeakObject* >(this) ) , - dynamic_cast< XWeak* >( this ) , - // my own interfaces - dynamic_cast< XServiceInfo* >( this ) , - dynamic_cast< XPropertySet* >( this ) , - dynamic_cast< XMultiPropertySet* >( this ) ); -} - -void SwXPrintPreviewSettings::acquire () - throw () -{ - OWeakObject::acquire(); -} - -void SwXPrintPreviewSettings::release () - throw () -{ - OWeakObject::release(); -} - -void SwXPrintPreviewSettings::_preSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mpDoc ) - { - const SwPagePreViewPrtData *pConstPrtData = mpDoc->GetPreViewPrtData(); - mpPreViewData = new SwPagePreViewPrtData; - if ( pConstPrtData ) - { - mpPreViewData->SetLeftSpace ( pConstPrtData->GetLeftSpace() ); - mpPreViewData->SetRightSpace ( pConstPrtData->GetRightSpace() ); - mpPreViewData->SetTopSpace ( pConstPrtData->GetTopSpace() ); - mpPreViewData->SetBottomSpace ( pConstPrtData->GetBottomSpace() ); - mpPreViewData->SetHorzSpace ( pConstPrtData->GetHorzSpace() ); - mpPreViewData->SetVertSpace ( pConstPrtData->GetVertSpace() ); - mpPreViewData->SetRow ( pConstPrtData->GetRow() ); - mpPreViewData->SetCol ( pConstPrtData->GetCol() ); - mpPreViewData->SetLandscape ( pConstPrtData->GetLandscape() ); - } - } -} - -void SwXPrintPreviewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue ) - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetLeftSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLeftSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetRightSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRightSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetTopSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetTopSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetBottomSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetBottomSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetHorzSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetHorzSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetVertSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetVertSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetRow() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRow( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetCol() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetCol( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - sal_Bool bVal = *(sal_Bool*)rValue.getValue(); - if ( bVal != mpPreViewData->GetLandscape() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLandscape ( bVal ); - } - } - break; - default: - throw UnknownPropertyException(); - } -} - -void SwXPrintPreviewSettings::_postSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mbPreviewDataChanged ) - { - mpDoc->SetPreViewPrtData ( mpPreViewData ); - mbPreviewDataChanged = sal_False; - } - delete mpPreViewData; - mpPreViewData = NULL; -} - -void SwXPrintPreviewSettings::_preGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if (mpDoc) - mpConstPreViewData = mpDoc->GetPreViewPrtData(); -} - -void SwXPrintPreviewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue ) - throw(UnknownPropertyException, WrappedTargetException ) -{ - sal_Bool bBool = TRUE; - sal_Bool bBoolVal; - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetLeftSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetRightSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetTopSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetBottomSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetHorzSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetVertSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetRow() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetCol() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - if (mpConstPreViewData) - bBoolVal = mpConstPreViewData->GetLandscape(); - else - bBool = FALSE; - } - break; - default: - throw UnknownPropertyException(); - } - if(bBool) - rValue.setValue(&bBoolVal, ::getBooleanCppuType()); -} - -void SwXPrintPreviewSettings::_postGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - mpConstPreViewData = NULL; -} - -OUString SwXPrintPreviewSettings::getImplementationName(void) throw( RuntimeException ) -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM ( "SwXPrintPreviewSettings" ) ); -} - -sal_Bool SwXPrintPreviewSettings::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - return rServiceName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.PrintPreviewSettings") ); -} - -Sequence< OUString > SwXPrintPreviewSettings::getSupportedServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.PrintPreviewSettings" ) ); - return aRet; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx deleted file mode 100644 index 867f4fb30f0c..000000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SW_XPRINTPREVIEWSETTINGS_HXX_ -#define _SW_XPRINTPREVIEWSETTINGS_HXX_ - -#ifdef PRECOMPILED -#include "ui_pch.hxx" -#endif -#include <comphelper/ChainablePropertySet.hxx> -#include <com/sun/star/text/XTextDocument.hpp> -#include <cppuhelper/weak.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> - -class SwDoc; -class SwPagePreViewPrtData; - -class SwXPrintPreviewSettings :public comphelper::ChainablePropertySet, - public cppu::OWeakObject, - public com::sun::star::lang::XServiceInfo -{ - friend class SwXDocumentSettings; -protected: - sal_Bool mbPreviewDataChanged; - SwDoc* mpDoc; - SwPagePreViewPrtData *mpPreViewData; - const SwPagePreViewPrtData *mpConstPreViewData; - - virtual void _preSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual ~SwXPrintPreviewSettings() - throw(); -public: - SwXPrintPreviewSettings(SwDoc *pDoc); - - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) - throw (); - virtual void SAL_CALL release( ) - throw (); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) - throw( ::com::sun::star::uno::RuntimeException ); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx index 3a0bf4be279a..69cf4888eb74 100644 --- a/sw/source/ui/uno/detreg.cxx +++ b/sw/source/ui/uno/detreg.cxx @@ -44,30 +44,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey ) -{ - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SwFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< OUString > aServices = SwFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk deleted file mode 100644 index 0023fd52f55c..000000000000 --- a/sw/source/ui/uno/makefile.mk +++ /dev/null @@ -1,82 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=unoidl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(DVO_XFORMS)" != "" -CDEFS+=-DDVO_XFORMS -.ENDIF - -# --- Files -------------------------------------------------------- - -SLO1FILES = \ - $(SLO)$/unodefaults.obj\ - $(SLO)$/unodispatch.obj\ - $(SLO)$/unotxdoc.obj\ - $(SLO)$/unoatxt.obj \ - $(SLO)$/unomailmerge.obj \ - $(SLO)$/unomod.obj \ - $(SLO)$/unotxvw.obj \ - $(SLO)$/dlelstnr.obj \ - $(SLO)$/unofreg.obj \ - $(SLO)$/SwXDocumentSettings.obj \ - $(SLO)$/SwXPrintPreviewSettings.obj \ - $(SLO)$/SwXFilterOptions.obj\ - $(SLO)$/RefreshListenerContainer.obj \ - $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj - -SLO2FILES = \ - $(SLO)$/swdetect.obj \ - $(SLO)$/swdet2.obj \ - $(SLO)$/detreg.obj - -SLOFILES = \ - $(SLO1FILES) \ - $(SLO2FILES) - -LIB1TARGET = \ - $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO1FILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx index 6f325faab3df..f38cf9a810e7 100644 --- a/sw/source/ui/uno/swdet2.cxx +++ b/sw/source/ui/uno/swdet2.cxx @@ -58,16 +58,16 @@ bool IsDocShellRegistered() //------------------------------------------------------------------------- -ULONG SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ) +sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ) { - ULONG nRet = ERRCODE_NONE; + sal_uLong nRet = ERRCODE_NONE; if( *ppFilter ) { // verify the given filter String aPrefFlt = (*ppFilter)->GetUserData(); // detection for TextFilter needs an additional checking - BOOL bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt ); + sal_Bool bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt ); return bDetected ? nRet : ERRCODE_ABORT; } diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index 51607e771909..aea3ff13f29c 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -170,7 +170,7 @@ SwFilterDetect::~SwFilterDetect() SfxApplication* pApp = SFX_APP(); SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() ); TransformParameters( SID_OPENDOC, lDescriptor, *pSet ); - SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); bWasReadOnly = pItem && pItem->GetValue(); @@ -189,8 +189,8 @@ SwFilterDetect::~SwFilterDetect() else { // ctor of SfxMedium uses owner transition of ItemSet - SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet ); - aMedium.UseInteractionHandler( TRUE ); + SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet ); + aMedium.UseInteractionHandler( sal_True ); if ( aMedium.GetErrorCode() == ERRCODE_NONE ) { // remember input stream and content and put them into the descriptor later @@ -199,7 +199,7 @@ SwFilterDetect::~SwFilterDetect() xContent = aMedium.GetContent(); bReadOnly = aMedium.IsReadOnly(); - BOOL bIsStorage = aMedium.IsStorage(); + sal_Bool bIsStorage = aMedium.IsStorage(); if ( bIsStorage ) { uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False ); @@ -245,7 +245,7 @@ SwFilterDetect::~SwFilterDetect() aTypeName = pPreFilter->GetTypeName(); } - aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : FALSE, &aFilterName ); + aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : sal_False, &aFilterName ); } catch( lang::WrappedTargetException& aWrap ) { @@ -267,18 +267,17 @@ SwFilterDetect::~SwFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - xInteraction->handle( xRequest ); - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + // repair either not allowed or not successful + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); rtl::Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction ); if ( nIndexOfInteractionHandler != -1 ) @@ -319,9 +318,9 @@ SwFilterDetect::~SwFilterDetect() else pFilter = SfxFilterMatcher().GetFilter4EA( aTypeName ); - BOOL bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") || + sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.WebDocument"); - BOOL bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument"); + sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument"); const SfxFilter* pOrigFilter = NULL; if ( !bTestWriter && !bTestGlobal && pFilter ) @@ -331,10 +330,10 @@ SwFilterDetect::~SwFilterDetect() // example: HTML filter for Calc pOrigFilter = pFilter; pFilter = SfxFilterMatcher().GetFilter4EA( pFilter->GetTypeName() ); - bTestWriter = TRUE; + bTestWriter = sal_True; } - ULONG nErr = ERRCODE_NONE; + sal_uLong nErr = ERRCODE_NONE; if ( pFilter || bTestWriter ) nErr = DetectFilter( aMedium, &pFilter ); if ( nErr != ERRCODE_NONE ) diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx index c58279ad6192..124a443025cf 100644 --- a/sw/source/ui/uno/swdetect.hxx +++ b/sw/source/ui/uno/swdetect.hxx @@ -79,8 +79,8 @@ class SfxFilter; class SwFilterDetect : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo > { - static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); - static ULONG GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); + static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); + static sal_uLong GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter ); public: SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); virtual ~SwFilterDetect(); diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index c3dda5a77701..e5943aab71e7 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -116,7 +116,7 @@ uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex) uno::Any aRet; sal_uInt16 nCount = pGlossaries->GetGroupCnt(); if ( 0 <= nIndex && nIndex < nCount ) - aRet = getByName(pGlossaries->GetGroupName( static_cast< USHORT >(nIndex) )); + aRet = getByName(pGlossaries->GetGroupName( static_cast< sal_uInt16 >(nIndex) )); else throw lang::IndexOutOfBoundsException(); return aRet; @@ -141,8 +141,8 @@ uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName) uno::Reference< text::XAutoTextGroup > xGroup; if ( pGlossaries && hasByName( GroupName ) ) // group name already known? - // TRUE = create group if not already available - xGroup = pGlossaries->GetAutoTextGroup( GroupName, TRUE ); + // sal_True = create group if not already available + xGroup = pGlossaries->GetAutoTextGroup( GroupName, sal_True ); if ( !xGroup.is() ) throw container::NoSuchElementException(); @@ -839,7 +839,7 @@ void SwXAutoTextEntry::GetBodyText () { SolarMutexGuard aGuard; - xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, FALSE ); + xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, sal_False ); OSL_ENSURE( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" ); // start listening at the document @@ -1057,7 +1057,7 @@ OUString SwAutoTextEventDescriptor::getImplementationName() } void SwAutoTextEventDescriptor::replaceByName( - const USHORT nEvent, + const sal_uInt16 nEvent, const SvxMacro& rMacro) throw( lang::IllegalArgumentException, @@ -1079,7 +1079,7 @@ void SwAutoTextEventDescriptor::replaceByName( if( pBlocks && !pBlocks->GetError()) { - USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); + sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); if( nIndex != USHRT_MAX ) { SvxMacroTableDtor aMacroTable; @@ -1098,7 +1098,7 @@ void SwAutoTextEventDescriptor::replaceByName( void SwAutoTextEventDescriptor::getByName( SvxMacro& rMacro, - const USHORT nEvent ) + const sal_uInt16 nEvent ) throw( container::NoSuchElementException, lang::WrappedTargetException, @@ -1122,7 +1122,7 @@ void SwAutoTextEventDescriptor::getByName( if ( pBlocks && !pBlocks->GetError()) { - USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); + sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() ); if( nIndex != USHRT_MAX ) { SvxMacroTableDtor aMacroTable; diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx index ef05b03a8c0d..d74485f7ab42 100644 --- a/sw/source/ui/uno/unofreg.cxx +++ b/sw/source/ui/uno/unofreg.cxx @@ -156,99 +156,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -static void lcl_uno_writeInfo( - registry::XRegistryKey * pRegistryKey, - const OUString& rImplementationName, - const uno::Sequence< OUString >& rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, - void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = - reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - - // xml filter - lcl_uno_writeInfo( pKey, SwXMLImport_getImplementationName(), - SwXMLImport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportStyles_getImplementationName(), - SwXMLImportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLImportContent_getImplementationName(), - SwXMLImportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportMeta_getImplementationName(), - SwXMLImportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportSettings_getImplementationName(), - SwXMLImportSettings_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportOOO_getImplementationName(), - SwXMLExportOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStylesOOO_getImplementationName(), - SwXMLExportStylesOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContentOOO_getImplementationName(), - SwXMLExportContentOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMetaOOO_getImplementationName(), - SwXMLExportMetaOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettingsOOO_getImplementationName(), - SwXMLExportSettingsOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExport_getImplementationName(), - SwXMLExport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStyles_getImplementationName(), - SwXMLExportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContent_getImplementationName(), - SwXMLExportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMeta_getImplementationName(), - SwXMLExportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettings_getImplementationName(), - SwXMLExportSettings_getSupportedServiceNames() ); - //API objects - lcl_uno_writeInfo( pKey, SwXAutoTextContainer_getImplementationName(), - SwXAutoTextContainer_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXModule_getImplementationName(), - SwXModule_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMailMerge_getImplementationName(), - SwXMailMerge_getSupportedServiceNames() ); - //Filter options - lcl_uno_writeInfo( pKey, SwXFilterOptions::getImplementationName_Static(), - SwXFilterOptions::getSupportedServiceNames_Static() ); - - // documents - lcl_uno_writeInfo( pKey, SwTextDocument_getImplementationName(), - SwTextDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwWebDocument_getImplementationName(), - SwWebDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwGlobalDocument_getImplementationName(), - SwGlobalDocument_getSupportedServiceNames() ); - - // module - lcl_uno_writeInfo( pKey, SwUnoModule_getImplementationName(), - SwUnoModule_getSupportedServiceNames() ); - // --> OD 2007-05-24 #i73788# - lcl_uno_writeInfo( pKey, - comp_FinalThreadManager::_getImplementationName(), - comp_FinalThreadManager::_getSupportedServiceNames() ); - // <-- - - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - static ::cppu::ImplementationEntry const entries[] = { { &comp_FinalThreadManager::_create, &comp_FinalThreadManager::_getImplementationName, diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 27cb34b6d98d..75637d39fe88 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -150,11 +150,11 @@ static CloseResult CloseModelAndDocSh( //////////////////////////////////////////////////////////// -static BOOL LoadFromURL_impl( +static sal_Bool LoadFromURL_impl( Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const String &rURL, - BOOL bClose ) + sal_Bool bClose ) throw (RuntimeException) { // try to open the document readonly and hidden @@ -172,7 +172,7 @@ static BOOL LoadFromURL_impl( } catch( Exception & ) { - return FALSE; + return sal_False; } // try to get the DocShell @@ -185,7 +185,7 @@ static BOOL LoadFromURL_impl( pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0; } - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (xTmpModel.is() && pTmpDocShell) // everything available? { if (bClose) @@ -193,10 +193,11 @@ static BOOL LoadFromURL_impl( // set new stuff rxModel = xTmpModel; rxDocSh = pTmpDocShell; - bRes = TRUE; + bRes = sal_True; } else { + // SfxObjectShellRef is ok here, since the document will be explicitly closed SfxObjectShellRef xTmpDocSh = pTmpDocShell; CloseModelAndDocSh( xTmpModel, xTmpDocSh ); } @@ -369,15 +370,15 @@ namespace //////////////////////////////////////////////////////////// -static BOOL DeleteTmpFile_Impl( +static sal_Bool DeleteTmpFile_Impl( Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const String &rTmpFileURL ) { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (rTmpFileURL.Len()) { - BOOL bDelete = TRUE; + sal_Bool bDelete = sal_True; if ( eVetoed == CloseModelAndDocSh( rxModel, rxDocSh ) ) { // somebody vetoed the closing, and took the ownership of the document @@ -385,7 +386,7 @@ static BOOL DeleteTmpFile_Impl( Reference< XEventListener > xEnsureDelete( new DelayedFileDeletion( rxModel, rTmpFileURL ) ); // note: as soon as #106931# is fixed, the whole DelayedFileDeletion is to be superseeded by // a better solution - bDelete = FALSE; + bDelete = sal_False; } rxModel = 0; @@ -400,7 +401,7 @@ static BOOL DeleteTmpFile_Impl( } } else - bRes = TRUE; // file will be deleted delayed + bRes = sal_True; // file will be deleted delayed } return bRes; } @@ -490,7 +491,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( const OUString &rName = pArguments[i].Name; const Any &rValue = pArguments[i].Value; - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; if (rName.equalsAscii( GetPropName( UNO_NAME_SELECTION ) )) bOK = rValue >>= aCurSelection; else if (rName.equalsAscii( GetPropName( UNO_NAME_RESULT_SET ) )) @@ -509,7 +510,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( { bOK = rValue >>= aCurDocumentURL; if (aCurDocumentURL.getLength() - && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, FALSE )) + && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, sal_False )) throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); } else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) )) @@ -620,7 +621,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( aCurSelection = aTranslated; } - SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, FALSE); + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, sal_False); SwView *pView = PTR_CAST( SwView, pFrame->GetViewShell() ); if (!pView) throw RuntimeException(); @@ -686,7 +687,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( // aDescriptor[ svx::daColumnObject ] not used aDescriptor[ svx::daSelection ] <<= aCurSelection; - USHORT nMergeType; + sal_uInt16 nMergeType; switch (nCurOutputType) { case MailMergeType::PRINTER : nMergeType = DBMGR_MERGE_MAILMERGE; break; @@ -707,11 +708,8 @@ uno::Any SAL_CALL SwXMailMerge::execute( uno::Reference< mail::XMailService > xInService; if (MailMergeType::PRINTER == nCurOutputType) { - SwPrintData aPrtData = *SW_MOD()->GetPrtOptions( FALSE ); IDocumentDeviceAccess* pIDDA = rSh.getIDocumentDeviceAccess(); - SwPrintData* pShellPrintData = pIDDA->getPrintData(); - if (pShellPrintData) - aPrtData = *pShellPrintData; + SwPrintData aPrtData( pIDDA->getPrintData() ); aPrtData.SetPrintSingleJobs( bCurSinglePrintJobs ); pIDDA->setPrintData( aPrtData ); // #i25686# printing should not be done asynchronously to prevent dangling offices @@ -818,13 +816,13 @@ uno::Any SAL_CALL SwXMailMerge::execute( if ( !bStoredAsTemporary ) throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to save temporary file." ) ), static_cast < cppu::OWeakObject * > ( this ) ); - pMgr->SetMergeSilent( TRUE ); // suppress dialogs, message boxes, etc. + pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc. const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc(); OSL_ENSURE( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." ); pMgr->SetMailMergeEvtSrc( this ); // launch events for listeners SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xCurDocSh)); - BOOL bSucc = pMgr->MergeNew( aMergeDesc ); + sal_Bool bSucc = pMgr->MergeNew( aMergeDesc ); SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), xCurDocSh)); pMgr->SetMailMergeEvtSrc( pOldSrc ); @@ -960,7 +958,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( OUString aText; bOK = rValue >>= aText; if (aText.getLength() - && !LoadFromURL_impl( xModel, xDocSh, aText, TRUE )) + && !LoadFromURL_impl( xModel, xDocSh, aText, sal_True )) throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ) ); aDocumentURL = aText; } @@ -1033,7 +1031,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( if (bChanged) { PropertyChangeEvent aChgEvt( (XPropertySet *) this, rPropertyName, - FALSE, pCur->nWID, aOld, rValue ); + sal_False, pCur->nWID, aOld, rValue ); launchEvent( aChgEvt ); } } diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index d2658ffe93d7..a478dbd00f4d 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -53,7 +53,7 @@ #include <comphelper/ChainablePropertySetInfo.hxx> #include <edtwin.hxx> #include <rtl/ustrbuf.hxx> - +#include <tools/urlobj.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -275,9 +275,9 @@ sal_Bool SwXModule::supportsService(const OUString& rServiceName) throw( Runtime for(sal_Int32 nService = 0; nService < aNames.getLength(); nService++) { if(aNames.getConstArray()[nService] == rServiceName) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } Sequence< OUString > SwXModule::getSupportedServiceNames(void) throw( RuntimeException ) @@ -316,13 +316,7 @@ void SwXPrintSettings::_preSetValues () { if (!mpDoc) throw IllegalArgumentException (); - if ( !mpDoc->getPrintData() ) - { - mpPrtOpt = new SwPrintData; - mpDoc->setPrintData ( *mpPrtOpt ); - delete mpPrtOpt; - } - mpPrtOpt = mpDoc->getPrintData(); + mpPrtOpt = const_cast< SwPrintData * >(&mpDoc->getPrintData()); } break; } @@ -479,13 +473,7 @@ void SwXPrintSettings::_preGetValues () { if (!mpDoc) throw IllegalArgumentException (); - if ( !mpDoc->getPrintData() ) - { - mpPrtOpt = new SwPrintData; - mpDoc->setPrintData ( *mpPrtOpt ); - delete mpPrtOpt; - } - mpPrtOpt = mpDoc->getPrintData(); + mpPrtOpt = const_cast< SwPrintData * >(&mpDoc->getPrintData()); } break; } @@ -651,10 +639,10 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c case HANDLE_VIEWSET_DRAWINGS : mpViewOption->SetDraw(bVal); break; case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFldName(bVal); break; case HANDLE_VIEWSET_ANNOTATIONS : mpViewOption->SetPostIts(bVal); break; - case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break; + case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break; case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: mpViewOption->SetViewMetaChars( bVal ); break; - case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break; - case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break; + case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break; + case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break; case HANDLE_VIEWSET_PARA_BREAKS : mpViewOption->SetParagraph(bVal); break; case HANDLE_VIEWSET_SOFT_HYPHENS : mpViewOption->SetSoftHyph(bVal); break; case HANDLE_VIEWSET_SPACES : mpViewOption->SetBlank(bVal); break; @@ -664,7 +652,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c case HANDLE_VIEWSET_HIDDEN_TEXT : mpViewOption->SetShowHiddenField(bVal); break; case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(bVal); break; case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(bVal); break; - case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, TRUE); break; + case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, sal_True); break; case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break; case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break; case HANDLE_VIEWSET_SOLID_MARK_HANDLES : mpViewOption->SetSolidMarkHdl(bVal); break; @@ -765,14 +753,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c OUString sHelpURL; if ( ! ( rValue >>= sHelpURL ) ) throw IllegalArgumentException(); - SwEditWin &rEditWin = pView->GetEditWin(); - OUString sPrefix = sHelpURL.copy ( 0, 4 ); - // Make sure we have a valid string...should be in the format HID:12345 - if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) ) + + INetURLObject aHID( sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + pView->GetEditWin().SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) ); + else throw IllegalArgumentException (); - OUString sNumber = sHelpURL.copy ( 4 ); - sal_uInt32 nHelpId = sNumber.toInt32(); - rEditWin.SetHelpId ( nHelpId ); } else throw UnknownPropertyException(); @@ -859,13 +845,13 @@ void SwXViewSettings::_preGetValues () void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue ) throw(UnknownPropertyException, WrappedTargetException ) { - sal_Bool bBool = TRUE; + sal_Bool bBool = sal_True; sal_Bool bBoolVal; switch( rInfo.mnHandle ) { case HANDLE_VIEWSET_SHOW_RULER: bBoolVal = mpConstViewOption->IsViewAnyRuler(); break; - case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(TRUE); break; - case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(TRUE);break; + case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(sal_True); break; + case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(sal_True);break; case HANDLE_VIEWSET_VRULER_RIGHT : bBoolVal = mpConstViewOption->IsVRulerRight();break; case HANDLE_VIEWSET_HSCROLL: bBoolVal = mpConstViewOption->IsViewHScrollBar();break; case HANDLE_VIEWSET_VSCROLL: bBoolVal = mpConstViewOption->IsViewVScrollBar();break; @@ -895,28 +881,28 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u case HANDLE_VIEWSET_IS_RASTER_VISIBLE : bBoolVal = mpConstViewOption->IsGridVisible(); break; case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal = mpConstViewOption->IsSnap(); break; case HANDLE_VIEWSET_RASTER_RESOLUTION_X : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Width()); break; case HANDLE_VIEWSET_RASTER_RESOLUTION_Y : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Height()); break; case HANDLE_VIEWSET_RASTER_SUBDIVISION_X : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) mpConstViewOption->GetDivisionX(); break; case HANDLE_VIEWSET_RASTER_SUBDIVISION_Y : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int32) mpConstViewOption->GetDivisionY(); break; case HANDLE_VIEWSET_ZOOM : - bBool = FALSE; + bBool = sal_False; rValue <<= (sal_Int16)mpConstViewOption->GetZoom(); break; case HANDLE_VIEWSET_ZOOM_TYPE: { - bBool = FALSE; + bBool = sal_False; sal_Int16 nRet(0); switch (mpConstViewOption->GetZoomType()) { @@ -952,9 +938,9 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { bBool = sal_False; OUStringBuffer sHelpURL; - sHelpURL.appendAscii ( "HID:" ); + sHelpURL.appendAscii ( INET_HID_SCHEME ); SwEditWin &rEditWin = pView->GetEditWin(); - sHelpURL.append ( static_cast < sal_Int32 > ( rEditWin.GetHelpId() ) ); + sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); rValue <<= sHelpURL.makeStringAndClear(); } else diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 649c926f1a4f..e7f0022ad93e 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -46,7 +46,7 @@ #include <pview.hxx> #include <viewsh.hxx> #include <pvprtdat.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <svl/stritem.hxx> #include <unotxdoc.hxx> #include <svl/numuno.hxx> @@ -81,7 +81,6 @@ #include <globals.hrc> #include <unomid.h> #include <unotools/printwarningoptions.hxx> - #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/lang/DisposedException.hpp> @@ -106,7 +105,6 @@ #include <swcont.hxx> #include <unodefaults.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <doc.hxx> #include <editeng/forbiddencharacterstable.hxx> #include <svl/zforlist.hxx> @@ -181,17 +179,16 @@ SwPrintUIOptions * lcl_GetPrintUIOptions( if (!pDocShell) return NULL; - const BOOL bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell); + const sal_Bool bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell); const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView); const SwView * pSwView = dynamic_cast< const SwView * >(pView); const bool bHasSelection = pSwView ? pSwView->HasSelection( sal_False ) : false; // check for any selection, not just text selection const bool bHasPostIts = lcl_GetPostIts( pDocShell->GetDoc(), 0 ); // get default values to use in dialog from documents SwPrintData - const SwPrintData *pPrintData = pDocShell->GetDoc()->getPrintData(); - OSL_ENSURE( pPrintData, "failed to get SwPrintData from document" ); + const SwPrintData &rPrintData = pDocShell->GetDoc()->getPrintData(); - return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, *pPrintData ); + return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, rPrintData ); } SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc) @@ -210,7 +207,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) { // check if the view frame still exists SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell, - FALSE ); + sal_False ); while(pFound) { if( pFound == pToClose) @@ -220,7 +217,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) } pFound = SfxViewFrame::GetNext( *pFound, pDocShell, - FALSE ); + sal_False ); } } @@ -735,7 +732,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > 0); pSearch->FillSearchItemSet(aSearch); pSearch->FillReplaceItemSet(aReplace); - BOOL bCancel; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -747,7 +744,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); SwTxtFmtColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc());; - BOOL bCancel; + sal_Bool bCancel; nResult = pUnoCrsr->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); @@ -756,8 +753,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > else { //todo/mba: assuming that notes should be omitted - BOOL bSearchInNotes = FALSE; - BOOL bCancel; + sal_Bool bSearchInNotes = sal_False; + sal_Bool bCancel; nResult = pUnoCrsr->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -863,10 +860,10 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_FRMATR_BEGIN, RES_FRMATR_END-1, - RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, + RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT, 0); pSearch->FillSearchItemSet(aSearch); - BOOL bCancel; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -878,7 +875,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc()); //pSearch->sReplaceText SwTxtFmtColl *pReplaceColl = 0; - BOOL bCancel; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl, eStart, eEnd, bCancel, (FindRanges)eRanges, pReplaceColl ); @@ -886,8 +883,8 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > else { //todo/mba: assuming that notes should be omitted - BOOL bSearchInNotes = FALSE; - BOOL bCancel; + sal_Bool bSearchInNotes = sal_False; + sal_Bool bCancel; nResult = (sal_Int32)pUnoCrsr->Find( aSearchOpt, bSearchInNotes, eStart, eEnd, bCancel, (FindRanges)eRanges, @@ -996,7 +993,7 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void) pArray[6] = beans::PropertyValue(C2U("HoriMargin"), -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetVertSpace()); pArray[7] = beans::PropertyValue(C2U("VertMargin"), -1, aVal, PropertyState_DIRECT_VALUE); - BOOL bTemp = aData.GetLandscape(); + sal_Bool bTemp = aData.GetLandscape(); aVal.setValue(&bTemp, ::getCppuBooleanType()); pArray[8] = beans::PropertyValue(C2U("IsLandscape"), -1, aVal, PropertyState_DIRECT_VALUE); } @@ -1024,7 +1021,7 @@ sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, sal_Bool& bException) return nRet; } -String lcl_CreateOutlineString( USHORT nIndex, +String lcl_CreateOutlineString( sal_uInt16 nIndex, const SwOutlineNodes& rOutlineNodes, const SwNumRule* pOutlRule) { String sEntry; @@ -1069,13 +1066,13 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue { if(!nVal || nVal > 0xff) throw RuntimeException(); - aData.SetRow((BYTE)nVal); + aData.SetRow((sal_uInt8)nVal); } else if(COMPARE_EQUAL == sName.CompareToAscii("PageColumns")) { if(!nVal || nVal > 0xff) throw RuntimeException(); - aData.SetCol((BYTE)nVal); + aData.SetCol((sal_uInt8)nVal); } else if(COMPARE_EQUAL == sName.CompareToAscii("LeftMargin")) { @@ -1401,7 +1398,7 @@ void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell) if(pDocShell && pDocShell != pNewDocShell) Invalidate(); pDocShell = pNewDocShell; - bObjectValid = TRUE; + bObjectValid = sal_True; } void SwXTextDocument::InitNewDoc() @@ -1668,9 +1665,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic } else if (sCategory == C2U ("text") ) { - if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.PrintPreviewSettings") ) ) - xRet = Reference < XInterface > ( *new SwXPrintPreviewSettings ( pDocShell->GetDoc() ) ); - else if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) + if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); } else if (sCategory == C2U ("chart2") ) @@ -1768,9 +1763,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R ) return sal_True; - BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); - BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); - BOOL bTextDoc = (!bWebDoc && !bGlobalDoc); + sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); + sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); + sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc); return ( (bWebDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument" ))) || @@ -1781,9 +1776,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( RuntimeException ) { - BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); - BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); - BOOL bTextDoc = (!bWebDoc && !bGlobalDoc); + sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); + sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); + sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc); Sequence< OUString > aRet (3); OUString* pArray = aRet.getArray(); @@ -2066,7 +2061,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) break; case WID_DOC_HIDE_TIPS : { - BOOL bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips(); + sal_Bool bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips(); aAny.setValue(&bTemp, ::getBooleanCppuType()); } break; @@ -2093,7 +2088,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) break; case WID_DOC_TWO_DIGIT_YEAR: { - aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( TRUE )->GetYear2000()); + aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( sal_True )->GetYear2000()); } break; case WID_DOC_AUTOMATIC_CONTROL_FOCUS: @@ -2247,7 +2242,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException) if( rLnkMan.GetLinks().Count() ) { UnoActionContext aAction(pDoc); - rLnkMan.UpdateAllLinks( FALSE, FALSE, TRUE ); + rLnkMan.UpdateAllLinks( sal_False, sal_False, sal_True ); } } @@ -2425,7 +2420,7 @@ SwDoc * SwXTextDocument::GetRenderDoc( const TypeId aSwViewTypeId = TYPE(SwView); if (rpView && rpView->IsA(aSwViewTypeId)) { - SfxObjectShellRef xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); + SfxObjectShellLock xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); if (xDocSh.Is()) { pDoc = ((SwDocShell*)&xDocSh)->GetDoc(); @@ -2446,33 +2441,28 @@ static void lcl_SavePrintUIOptionsToDocumentPrintData( const SwPrintUIOptions &rPrintUIOptions, bool bIsPDFEXport ) { - if (!rDoc.getPrintData()) - { - SwPrintData *pTmpData = new SwPrintData; - rDoc.setPrintData ( *pTmpData ); - delete pTmpData; // setPrintData does make its own copy! - } - - SwPrintData *pDocPrintData = rDoc.getPrintData(); - - pDocPrintData->SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() ); - pDocPrintData->SetPrintTable( rPrintUIOptions.IsPrintTables() ); - pDocPrintData->SetPrintDraw( rPrintUIOptions.IsPrintDrawings() ); - pDocPrintData->SetPrintControl( rPrintUIOptions.IsPrintFormControls() ); - pDocPrintData->SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() ); - pDocPrintData->SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() ); - pDocPrintData->SetPrintReverse( rPrintUIOptions.IsPrintReverse() ); - pDocPrintData->SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() ); - pDocPrintData->SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) ); - pDocPrintData->SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() ); - pDocPrintData->SetPrintProspect( rPrintUIOptions.IsPrintProspect() ); - pDocPrintData->SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() ); - pDocPrintData->SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() ); - pDocPrintData->SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() ); - // pDocPrintData->SetPrintSingleJobs( b ); handled by File/Print dialog itself - // pDocPrintData->SetFaxName( s ); n/a in File/Print dialog - pDocPrintData->SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() ); - pDocPrintData->SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() ); + SwPrintData aDocPrintData( rDoc.getPrintData() ); + + aDocPrintData.SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() ); + aDocPrintData.SetPrintTable( rPrintUIOptions.IsPrintTables() ); + aDocPrintData.SetPrintDraw( rPrintUIOptions.IsPrintDrawings() ); + aDocPrintData.SetPrintControl( rPrintUIOptions.IsPrintFormControls() ); + aDocPrintData.SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() ); + aDocPrintData.SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() ); + aDocPrintData.SetPrintReverse( rPrintUIOptions.IsPrintReverse() ); + aDocPrintData.SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() ); + aDocPrintData.SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) ); + aDocPrintData.SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() ); + aDocPrintData.SetPrintProspect( rPrintUIOptions.IsPrintProspect() ); + aDocPrintData.SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() ); + aDocPrintData.SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() ); + aDocPrintData.SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() ); + // aDocPrintData.SetPrintSingleJobs( b ); handled by File/Print dialog itself + // arDocPrintData.SetFaxName( s ); n/a in File/Print dialog + aDocPrintData.SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() ); + aDocPrintData.SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() ); + + rDoc.setPrintData( aDocPrintData ); } sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( @@ -2543,14 +2533,15 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() ); } - m_pRenderData->SetSwPrtOptions( new SwPrtOptions( bIsPDFExport ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PDF export")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printing") ) ) ); + m_pRenderData->SetSwPrtOptions( new SwPrintData ); m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell, m_pPrintUIOptions, m_pRenderData, bIsPDFExport ); if (pView->IsA(aSwViewTypeId)) { // PDF export should not make use of the SwPrtOptions - const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions(); + const SwPrintData *pPrtOptions = (bIsPDFExport) + ? NULL : m_pRenderData->GetSwPrtOptions(); m_pRenderData->ViewOptionAdjust( pPrtOptions ); } @@ -2568,7 +2559,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // --> FME 2005-05-23 #122919# Force field update before PDF export: - pWrtShell->ViewShell::UpdateFlds(TRUE); + pWrtShell->ViewShell::UpdateFlds(sal_True); // <-- if( bStateChanged ) pRenderDocShell->EnableSetModified( sal_True ); @@ -2682,7 +2673,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( // determine the correct page number from the renderer index // --> OD 2010-10-01 #i114875 // consider brochure print - const USHORT nPage = bPrintProspect + const sal_uInt16 nPage = bPrintProspect ? nRenderer + 1 : m_pRenderData->GetPagesToPrint()[ nRenderer ]; // <-- @@ -2722,6 +2713,9 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aTmpSize = pPrinter->LogicToLogic( aTmpSize, pPrinter->GetMapMode(), MapMode( MAP_100TH_MM )); aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); + #if 0 + // #i115048# it seems users didn't like getting double the formatted page size + // revert to "old" behavior scaling to the current paper size of the printer if (bPrintProspect) { // we just state what output size we would need @@ -2731,6 +2725,20 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ), TWIP_TO_MM100( aTmpSize.Height() )); } + #else + if( bPrintProspect ) + { + // just switch to an appropriate portrait/landscape format + // FIXME: brochure printing with landscape pages puts the + // pages next to each other, so landscape is currently always + // the better choice + if( aPageSize.Width < aPageSize.Height ) + { + aPreferredPageSize.Width = aPageSize.Height; + aPreferredPageSize.Height = aPageSize.Width; + } + } + #endif } } else @@ -2906,7 +2914,8 @@ void SAL_CALL SwXTextDocument::render( } // <-- - const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions(); + SwPrintData const& rSwPrtOptions = + *m_pRenderData->GetSwPrtOptions(); if (bPrintProspect) pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer ); else // normal printing and PDF export @@ -2981,8 +2990,12 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno:: SolarMutexGuard aGuard; if(!IsValid()) throw RuntimeException(); - //create a new document - hidden - copy the storage and return it - SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false); + + // create a new document - hidden - copy the storage and return it + // SfxObjectShellRef is used here, since the model should control object lifetime after creation + // and thus SfxObjectShellLock is not allowed here + // the model holds reference to the shell, so the shell will not destructed at the end of method + SfxObjectShellRef pShell = pDocShell->GetDoc()->CreateCopy(false); uno::Reference< frame::XModel > xNewModel = pShell->GetModel(); uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( ); uno::Sequence< beans::PropertyValue > aTempMediaDescriptor; @@ -3036,50 +3049,50 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( //USER STYLES const SwCharFmts *pFmts = pDoc->GetCharFmts(); - for(USHORT i = 0; i < pFmts->Count(); ++i) + for(sal_uInt16 i = 0; i < pFmts->Count(); ++i) { const SwAttrSet &rAttrSet = (*pFmts)[i]->GetAttrSet(); LanguageType nLang = LANGUAGE_DONTKNOW; if (bLatin) { - nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } } const SwTxtFmtColls *pColls = pDoc->GetTxtFmtColls(); - for (USHORT i = 0; i < pColls->Count(); ++i) + for (sal_uInt16 i = 0; i < pColls->Count(); ++i) { const SwAttrSet &rAttrSet = (*pColls)[i]->GetAttrSet(); LanguageType nLang = LANGUAGE_DONTKNOW;; if (bLatin) { - nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage(); + nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } @@ -3104,19 +3117,19 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( LanguageType nLang = LANGUAGE_DONTKNOW; if (bLatin) { - nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } @@ -3133,38 +3146,38 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( if(pOutliner) { EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine(); - ULONG nParCount = pOutliner->GetParagraphCount(); - for (ULONG nPar=0; nPar<nParCount; nPar++) + sal_uLong nParCount = pOutliner->GetParagraphCount(); + for (sal_uLong nPar=0; nPar<nParCount; nPar++) { //every paragraph SvUShorts aPortions; - rEditEng.GetPortions( (USHORT)nPar, aPortions ); + rEditEng.GetPortions( (sal_uInt16)nPar, aPortions ); - for ( USHORT nPos = aPortions.Count(); nPos; ) + for ( sal_uInt16 nPos = aPortions.Count(); nPos; ) { //every position --nPos; - USHORT nEnd = aPortions.GetObject( nPos ); - USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0; - ESelection aSelection( (USHORT)nPar, nStart, (USHORT)nPar, nEnd ); + sal_uInt16 nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0; + ESelection aSelection( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd ); SfxItemSet aAttr = rEditEng.GetAttribs( aSelection ); LanguageType nLang = LANGUAGE_DONTKNOW; if (bLatin) { - nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bAsian) { - nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } if (bComplex) { - nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, FALSE )).GetLanguage(); + nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, sal_False )).GetLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aAllLangs.insert( nLang ); } @@ -3805,8 +3818,8 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl() m_rShell.ApplyViewOptions( m_aOldViewOptions ); } -void SwViewOptionAdjust_Impl::AdjustViewOptions( - const SwPrtOptions *pPrtOptions ) +void +SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) { // to avoid unnecessary reformatting the view options related to the content // below should only change if necessary, that is if respective content is present @@ -3824,15 +3837,15 @@ void SwViewOptionAdjust_Impl::AdjustViewOptions( // disable anything in the view that should not be printed (or exported to PDF) by default // (see also dialog "Tools/Options - StarOffice Writer - Formatting Aids" // in section "Display of ...") - aRenderViewOptions.SetParagraph( FALSE ); // paragraph end - aRenderViewOptions.SetSoftHyph( FALSE ); // aka custom hyphens - aRenderViewOptions.SetBlank( FALSE ); // spaces - aRenderViewOptions.SetHardBlank( FALSE ); // non-breaking spaces - aRenderViewOptions.SetTab( FALSE ); // tabs - aRenderViewOptions.SetLineBreak( FALSE ); // breaks (type 1) - aRenderViewOptions.SetPageBreak( FALSE ); // breaks (type 2) - aRenderViewOptions.SetColumnBreak( FALSE ); // breaks (type 3) - BOOL bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : FALSE; + aRenderViewOptions.SetParagraph( sal_False ); // paragraph end + aRenderViewOptions.SetSoftHyph( sal_False ); // aka custom hyphens + aRenderViewOptions.SetBlank( sal_False ); // spaces + aRenderViewOptions.SetHardBlank( sal_False ); // non-breaking spaces + aRenderViewOptions.SetTab( sal_False ); // tabs + aRenderViewOptions.SetLineBreak( sal_False ); // breaks (type 1) + aRenderViewOptions.SetPageBreak( sal_False ); // breaks (type 2) + aRenderViewOptions.SetColumnBreak( sal_False ); // breaks (type 3) + sal_Bool bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : sal_False; if (bContainsHiddenChars) aRenderViewOptions.SetShowHiddenChar( bVal ); // hidden text if (bContainsHiddenFields) @@ -3843,16 +3856,16 @@ void SwViewOptionAdjust_Impl::AdjustViewOptions( if (bContainsPlaceHolders) { // should always be printed in PDF export! - bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : TRUE; + bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : sal_True; aRenderViewOptions.SetShowPlaceHolderFields( bVal ); } if (bContainsFields) - aRenderViewOptions.SetFldName( FALSE ); + aRenderViewOptions.SetFldName( sal_False ); // we need to set this flag in order to get to see the visible effect of // some of the above settings (needed for correct rendering) - aRenderViewOptions.SetViewMetaChars( TRUE ); + aRenderViewOptions.SetViewMetaChars( sal_True ); if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary { diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 0a37ea46e477..995f146a45a2 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -747,11 +747,11 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); SwRubyList aList; - USHORT nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 ); + sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 ); Sequence< Sequence< PropertyValue > > aRet(nCount); Sequence< PropertyValue >* pRet = aRet.getArray(); String aString; - for(USHORT n = 0; n < nCount; n++) + for(sal_uInt16 n = 0; n < nCount; n++) { const SwRubyListEntryPtr pEntry = aList[n]; @@ -843,20 +843,23 @@ void SAL_CALL SwXTextView::setRubyList( pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1); } } - aList.Insert(pEntry, (USHORT)nPos); + aList.Insert(pEntry, (sal_uInt16)nPos); } SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 ); } -SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ ) +SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() { SwWrtShell& rOldSh = m_pView->GetWrtShell(); SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false ); SwDocShell* pDocSh; - SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt); + SwDoc *const pTempDoc( pDocSh->GetDoc() ); + // #i103634#, #i112425#: do not expand numbering and fields on PDF export + pTempDoc->SetClipBoard(true); + rOldSh.FillPrtDoc(pTempDoc, pPrt); SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. @@ -990,7 +993,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue( if (nWID == WID_PAGE_COUNT) nCount = m_pView->GetDocShell()->GetDoc()->GetPageCount(); else // WID_LINE_COUNT - nCount = m_pView->GetWrtShell().GetLineCount( FALSE /*of whole document*/ ); + nCount = m_pView->GetWrtShell().GetLineCount( sal_False /*of whole document*/ ); aRet <<= nCount; } break; @@ -1002,7 +1005,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue( const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions(); if (!pOpt) throw RuntimeException(); - UINT32 nFlag = VIEWOPT_1_ONLINESPELL; + sal_uInt32 nFlag = VIEWOPT_1_ONLINESPELL; sal_Bool bVal = 0 != (pOpt->GetCoreOptions() & nFlag); aRet <<= bVal; } @@ -1424,7 +1427,7 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException ) rSh.LeaveSelFrmMode(); } rSh.EnterStdMode(); - bRet = rSh.SttEndDoc(TRUE); + bRet = rSh.SttEndDoc(sal_True); } else throw uno::RuntimeException(); @@ -1444,7 +1447,7 @@ sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException ) rSh.LeaveSelFrmMode(); } rSh.EnterStdMode(); - bRet = rSh.SttEndDoc(FALSE); + bRet = rSh.SttEndDoc(sal_False); rSh.SttPg(); } else @@ -1457,7 +1460,7 @@ sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeExcep SolarMutexGuard aGuard; sal_Bool bRet = sal_False; if(m_pView) - bRet = m_pView->GetWrtShell().GotoPage(nPage, TRUE); + bRet = m_pView->GetWrtShell().GotoPage(nPage, sal_True); else throw uno::RuntimeException(); return bRet; @@ -1515,7 +1518,7 @@ sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException ) { SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); - nRet = (short)pShellCrsr->GetPageNum( TRUE, 0 ); + nRet = (short)pShellCrsr->GetPageNum( sal_True, 0 ); } else throw uno::RuntimeException(); @@ -1984,8 +1987,8 @@ uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransfera else { SwTransferable* pTransfer = new SwTransferable( rSh ); - const BOOL bLockedView = rSh.IsViewLocked(); - rSh.LockView( TRUE ); //lock visible section + const sal_Bool bLockedView = rSh.IsViewLocked(); + rSh.LockView( sal_True ); //lock visible section pTransfer->PrepareForCopy(); rSh.LockView( bLockedView ); return uno::Reference< datatransfer::XTransferable >( pTransfer ); @@ -2003,7 +2006,7 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe { SdrView *pSdrView = rSh.GetDrawView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); - pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), FALSE ); + pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), sal_False ); } else { |