summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2010-03-01 12:22:02 +0100
committerThomas Benisch <tbe@openoffice.org>2010-03-01 12:22:02 +0100
commit9894a711a7550c717381e80c38c981e6b502beb7 (patch)
tree781477b79027c5c1101d211c79603c366a002aeb /sw/source/ui
parent04d7fd9828cdb09ff190bc65975e0c51df778487 (diff)
parent7e12418df527339d4a78416596ea12ed3cd6133a (diff)
chartshapes: merge with DEV300_m72
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/app.src7
-rw-r--r--sw/source/ui/app/appenv.cxx37
-rw-r--r--sw/source/ui/app/apphdl.cxx205
-rw-r--r--sw/source/ui/app/applab.cxx35
-rw-r--r--sw/source/ui/app/appopt.cxx29
-rw-r--r--sw/source/ui/app/docsh.cxx45
-rw-r--r--sw/source/ui/app/docsh2.cxx62
-rw-r--r--sw/source/ui/app/docshdrw.cxx7
-rw-r--r--sw/source/ui/app/docshini.cxx63
-rw-r--r--sw/source/ui/app/docst.cxx20
-rw-r--r--sw/source/ui/app/docstyle.cxx28
-rw-r--r--sw/source/ui/app/error.src5
-rw-r--r--sw/source/ui/app/mainwn.cxx7
-rw-r--r--sw/source/ui/app/makefile.mk6
-rw-r--r--sw/source/ui/app/mn.src11
-rw-r--r--sw/source/ui/app/swdll.cxx7
-rw-r--r--sw/source/ui/app/swmodul1.cxx21
-rw-r--r--sw/source/ui/app/swmodule.cxx9
-rw-r--r--sw/source/ui/app/swwait.cxx5
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx5
-rw-r--r--sw/source/ui/cctrl/makefile.mk6
-rw-r--r--sw/source/ui/cctrl/popbox.cxx5
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx5
-rw-r--r--sw/source/ui/chrdlg/break.cxx7
-rw-r--r--sw/source/ui/chrdlg/break.hrc5
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx13
-rw-r--r--sw/source/ui/chrdlg/ccoll.hrc5
-rw-r--r--sw/source/ui/chrdlg/ccoll.src5
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx13
-rw-r--r--sw/source/ui/chrdlg/chardlg.hrc5
-rw-r--r--sw/source/ui/chrdlg/chardlg.src5
-rw-r--r--sw/source/ui/chrdlg/chrdlg.src5
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx17
-rw-r--r--sw/source/ui/chrdlg/drpcps.hrc5
-rw-r--r--sw/source/ui/chrdlg/drpcps.src5
-rw-r--r--sw/source/ui/chrdlg/makefile.mk6
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx11
-rw-r--r--sw/source/ui/chrdlg/numpara.hrc5
-rw-r--r--sw/source/ui/chrdlg/numpara.src5
-rw-r--r--sw/source/ui/chrdlg/paradlg.hrc5
-rw-r--r--sw/source/ui/chrdlg/paradlg.src5
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx17
-rw-r--r--sw/source/ui/chrdlg/swbreak.src5
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx5
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx7
-rw-r--r--sw/source/ui/config/barcfg.cxx7
-rw-r--r--sw/source/ui/config/caption.cxx5
-rw-r--r--sw/source/ui/config/cfgitems.cxx9
-rw-r--r--sw/source/ui/config/config.hrc5
-rw-r--r--sw/source/ui/config/dbconfig.cxx7
-rw-r--r--sw/source/ui/config/fontcfg.cxx9
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx5
-rw-r--r--sw/source/ui/config/mailconfigpage.hrc5
-rw-r--r--sw/source/ui/config/mailconfigpage.src5
-rw-r--r--sw/source/ui/config/makefile.mk6
-rw-r--r--sw/source/ui/config/modcfg.cxx19
-rw-r--r--sw/source/ui/config/optcomp.cxx5
-rw-r--r--sw/source/ui/config/optcomp.hrc5
-rw-r--r--sw/source/ui/config/optcomp.src5
-rw-r--r--sw/source/ui/config/optdlg.hrc13
-rw-r--r--sw/source/ui/config/optdlg.src108
-rw-r--r--sw/source/ui/config/optload.cxx7
-rw-r--r--sw/source/ui/config/optload.hrc5
-rw-r--r--sw/source/ui/config/optload.src5
-rw-r--r--sw/source/ui/config/optpage.cxx108
-rw-r--r--sw/source/ui/config/prtopt.cxx38
-rw-r--r--sw/source/ui/config/redlopt.hrc5
-rw-r--r--sw/source/ui/config/redlopt.src5
-rw-r--r--sw/source/ui/config/uinums.cxx13
-rw-r--r--sw/source/ui/config/usrpref.cxx18
-rw-r--r--sw/source/ui/config/viewopt.cxx25
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx9
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hrc5
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx5
-rw-r--r--sw/source/ui/dbui/addresslistdialog.src5
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx7
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hrc5
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hxx5
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.src5
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx5
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hrc5
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hxx5
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.src5
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx25
-rw-r--r--sw/source/ui/dbui/dbinsdlg.hrc5
-rw-r--r--sw/source/ui/dbui/dbinsdlg.src5
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx523
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx5
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hrc5
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hxx5
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.src5
-rw-r--r--sw/source/ui/dbui/dbtree.cxx5
-rw-r--r--sw/source/ui/dbui/dbui.cxx5
-rw-r--r--sw/source/ui/dbui/dbui.src5
-rw-r--r--sw/source/ui/dbui/maildispatcher.cxx16
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx5
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.hrc5
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.src5
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx5
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx5
-rw-r--r--sw/source/ui/dbui/mailmergewizard.hrc5
-rw-r--r--sw/source/ui/dbui/mailmergewizard.src5
-rw-r--r--sw/source/ui/dbui/makefile.mk6
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx5
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hrc5
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx7
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.src5
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx13
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx7
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hrc5
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx5
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.src5
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx5
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hrc5
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx5
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.src5
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx17
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hrc5
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx5
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.src5
-rw-r--r--sw/source/ui/dbui/mmmergepage.cxx9
-rw-r--r--sw/source/ui/dbui/mmmergepage.hrc5
-rw-r--r--sw/source/ui/dbui/mmmergepage.hxx5
-rw-r--r--sw/source/ui/dbui/mmmergepage.src5
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx36
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hrc5
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx5
-rw-r--r--sw/source/ui/dbui/mmoutputpage.src5
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx5
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hrc5
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hxx5
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.src5
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx5
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hrc5
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx5
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.src5
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx5
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hrc5
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx5
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.src5
-rw-r--r--sw/source/ui/dbui/swdbtoolsclient.cxx5
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx30
-rw-r--r--sw/source/ui/dialog/abstract.cxx5
-rw-r--r--sw/source/ui/dialog/abstract.hrc5
-rw-r--r--sw/source/ui/dialog/abstract.src5
-rw-r--r--sw/source/ui/dialog/addrdlg.cxx5
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx17
-rw-r--r--sw/source/ui/dialog/ascfldlg.hrc5
-rw-r--r--sw/source/ui/dialog/ascfldlg.src5
-rw-r--r--sw/source/ui/dialog/dialog.src5
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx5
-rw-r--r--sw/source/ui/dialog/docstdlg.hrc5
-rw-r--r--sw/source/ui/dialog/docstdlg.src5
-rw-r--r--sw/source/ui/dialog/macassgn.cxx7
-rw-r--r--sw/source/ui/dialog/makefile.mk6
-rw-r--r--sw/source/ui/dialog/regionsw.cxx48
-rw-r--r--sw/source/ui/dialog/regionsw.hrc5
-rw-r--r--sw/source/ui/dialog/regionsw.src5
-rw-r--r--sw/source/ui/dialog/swabstdlg.cxx5
-rw-r--r--sw/source/ui/dialog/swdialmgr.cxx5
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx9
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx5
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx5
-rw-r--r--sw/source/ui/dialog/swwrtshitem.cxx5
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx23
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx5
-rw-r--r--sw/source/ui/dialog/wordcountdialog.hrc5
-rw-r--r--sw/source/ui/dialog/wordcountdialog.src5
-rw-r--r--sw/source/ui/dochdl/dochdl.src5
-rw-r--r--sw/source/ui/dochdl/gloshdl.cxx17
-rw-r--r--sw/source/ui/dochdl/makefile.mk6
-rw-r--r--sw/source/ui/dochdl/selglos.cxx5
-rw-r--r--sw/source/ui/dochdl/selglos.hrc5
-rw-r--r--sw/source/ui/dochdl/selglos.src5
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx49
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx23
-rw-r--r--sw/source/ui/docvw/access.src5
-rw-r--r--sw/source/ui/docvw/docvw.hrc5
-rw-r--r--sw/source/ui/docvw/docvw.src5
-rw-r--r--sw/source/ui/docvw/edtdd.cxx7
-rw-r--r--sw/source/ui/docvw/edtwin.cxx76
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx23
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx7
-rw-r--r--sw/source/ui/docvw/makefile.mk6
-rw-r--r--sw/source/ui/docvw/postit.cxx63
-rw-r--r--sw/source/ui/docvw/romenu.cxx18
-rw-r--r--sw/source/ui/docvw/romenu.hxx5
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx23
-rw-r--r--sw/source/ui/envelp/envelp.src5
-rw-r--r--sw/source/ui/envelp/envfmt.cxx15
-rw-r--r--sw/source/ui/envelp/envfmt.hrc5
-rw-r--r--sw/source/ui/envelp/envfmt.hxx7
-rw-r--r--sw/source/ui/envelp/envfmt.src5
-rw-r--r--sw/source/ui/envelp/envimg.cxx12
-rw-r--r--sw/source/ui/envelp/envlop.hrc5
-rw-r--r--sw/source/ui/envelp/envlop.src5
-rw-r--r--sw/source/ui/envelp/envlop1.cxx5
-rw-r--r--sw/source/ui/envelp/envprt.cxx5
-rw-r--r--sw/source/ui/envelp/envprt.hrc5
-rw-r--r--sw/source/ui/envelp/envprt.hxx5
-rw-r--r--sw/source/ui/envelp/envprt.src5
-rw-r--r--sw/source/ui/envelp/label.hrc5
-rw-r--r--sw/source/ui/envelp/label.src5
-rw-r--r--sw/source/ui/envelp/label1.cxx5
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx8
-rw-r--r--sw/source/ui/envelp/labelexp.cxx7
-rw-r--r--sw/source/ui/envelp/labfmt.cxx5
-rw-r--r--sw/source/ui/envelp/labfmt.hrc5
-rw-r--r--sw/source/ui/envelp/labfmt.hxx5
-rw-r--r--sw/source/ui/envelp/labfmt.src5
-rw-r--r--sw/source/ui/envelp/labimg.cxx9
-rw-r--r--sw/source/ui/envelp/labimp.hxx5
-rw-r--r--sw/source/ui/envelp/labprt.cxx9
-rw-r--r--sw/source/ui/envelp/labprt.hrc5
-rw-r--r--sw/source/ui/envelp/labprt.hxx5
-rw-r--r--sw/source/ui/envelp/labprt.src5
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx17
-rw-r--r--sw/source/ui/envelp/mailmrge.hrc5
-rw-r--r--sw/source/ui/envelp/mailmrge.src5
-rw-r--r--sw/source/ui/envelp/makefile.mk6
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx5
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx5
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx5
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.hrc5
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.src5
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.cxx5
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.hxx5
-rw-r--r--sw/source/ui/fldui/changedb.cxx5
-rw-r--r--sw/source/ui/fldui/changedb.hrc5
-rw-r--r--sw/source/ui/fldui/changedb.src5
-rw-r--r--sw/source/ui/fldui/flddb.cxx5
-rw-r--r--sw/source/ui/fldui/flddb.hxx5
-rw-r--r--sw/source/ui/fldui/flddb.src5
-rw-r--r--sw/source/ui/fldui/flddinf.cxx87
-rw-r--r--sw/source/ui/fldui/flddinf.hxx12
-rw-r--r--sw/source/ui/fldui/flddinf.src5
-rw-r--r--sw/source/ui/fldui/flddok.cxx7
-rw-r--r--sw/source/ui/fldui/flddok.hxx5
-rw-r--r--sw/source/ui/fldui/flddok.src5
-rw-r--r--sw/source/ui/fldui/fldedt.cxx23
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx5
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx5
-rw-r--r--sw/source/ui/fldui/fldfunc.src5
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx17
-rw-r--r--sw/source/ui/fldui/fldpage.cxx7
-rw-r--r--sw/source/ui/fldui/fldpage.hxx5
-rw-r--r--sw/source/ui/fldui/fldref.cxx5
-rw-r--r--sw/source/ui/fldui/fldref.hxx5
-rw-r--r--sw/source/ui/fldui/fldref.src5
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx39
-rw-r--r--sw/source/ui/fldui/fldtdlg.hrc5
-rw-r--r--sw/source/ui/fldui/fldtdlg.src5
-rw-r--r--sw/source/ui/fldui/fldui.src5
-rw-r--r--sw/source/ui/fldui/fldvar.cxx7
-rw-r--r--sw/source/ui/fldui/fldvar.hxx5
-rw-r--r--sw/source/ui/fldui/fldvar.src5
-rw-r--r--sw/source/ui/fldui/fldwrap.cxx5
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx7
-rw-r--r--sw/source/ui/fldui/inpdlg.hrc5
-rw-r--r--sw/source/ui/fldui/inpdlg.src5
-rw-r--r--sw/source/ui/fldui/javaedit.cxx7
-rw-r--r--sw/source/ui/fldui/javaedit.hrc5
-rw-r--r--sw/source/ui/fldui/javaedit.src5
-rw-r--r--sw/source/ui/fldui/makefile.mk7
-rw-r--r--sw/source/ui/fldui/xfldui.cxx5
-rw-r--r--sw/source/ui/fmtui/fmtui.src5
-rw-r--r--sw/source/ui/fmtui/makefile.mk6
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx23
-rw-r--r--sw/source/ui/fmtui/tmpdlg.src5
-rw-r--r--sw/source/ui/frmdlg/colex.cxx17
-rw-r--r--sw/source/ui/frmdlg/colmgr.cxx7
-rw-r--r--sw/source/ui/frmdlg/column.cxx19
-rw-r--r--sw/source/ui/frmdlg/column.hrc5
-rw-r--r--sw/source/ui/frmdlg/column.src5
-rw-r--r--sw/source/ui/frmdlg/cption.cxx5
-rw-r--r--sw/source/ui/frmdlg/cption.hrc5
-rw-r--r--sw/source/ui/frmdlg/cption.src5
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx5
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx46
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx91
-rw-r--r--sw/source/ui/frmdlg/frmpage.hrc5
-rw-r--r--sw/source/ui/frmdlg/frmpage.src5
-rw-r--r--sw/source/ui/frmdlg/frmui.src5
-rw-r--r--sw/source/ui/frmdlg/makefile.mk6
-rw-r--r--sw/source/ui/frmdlg/pattern.cxx5
-rw-r--r--sw/source/ui/frmdlg/pattern.hrc5
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx9
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx67
-rw-r--r--sw/source/ui/frmdlg/wrap.hrc5
-rw-r--r--sw/source/ui/frmdlg/wrap.src5
-rw-r--r--sw/source/ui/globdoc/globdoc.cxx7
-rw-r--r--sw/source/ui/globdoc/globdoc.src5
-rw-r--r--sw/source/ui/globdoc/makefile.mk6
-rw-r--r--sw/source/ui/inc/DropDownFieldDialog.hxx5
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx5
-rw-r--r--sw/source/ui/inc/SwXFilterOptions.hxx5
-rw-r--r--sw/source/ui/inc/abstract.hxx5
-rw-r--r--sw/source/ui/inc/actctrl.hxx5
-rw-r--r--sw/source/ui/inc/addrdlg.hxx5
-rwxr-xr-xsw/source/ui/inc/annotsh.hxx5
-rw-r--r--sw/source/ui/inc/app.hrc5
-rw-r--r--sw/source/ui/inc/ascfldlg.hxx5
-rw-r--r--sw/source/ui/inc/autoedit.hxx5
-rw-r--r--sw/source/ui/inc/barcfg.hxx8
-rw-r--r--sw/source/ui/inc/basesh.hxx7
-rw-r--r--sw/source/ui/inc/beziersh.hxx5
-rw-r--r--sw/source/ui/inc/bmpwin.hxx5
-rw-r--r--sw/source/ui/inc/bookctrl.hxx5
-rw-r--r--sw/source/ui/inc/bookmark.hxx5
-rw-r--r--sw/source/ui/inc/break.hxx5
-rw-r--r--sw/source/ui/inc/caption.hxx5
-rw-r--r--sw/source/ui/inc/cfgdesc.hxx5
-rw-r--r--sw/source/ui/inc/cfgid.h5
-rw-r--r--sw/source/ui/inc/cfgitems.hxx19
-rw-r--r--sw/source/ui/inc/changedb.hxx5
-rw-r--r--sw/source/ui/inc/chartins.hxx5
-rw-r--r--sw/source/ui/inc/chldwrap.hxx5
-rw-r--r--sw/source/ui/inc/chrdlg.hxx5
-rw-r--r--sw/source/ui/inc/cnttab.hxx5
-rw-r--r--sw/source/ui/inc/colex.hxx7
-rw-r--r--sw/source/ui/inc/colmgr.hxx5
-rw-r--r--sw/source/ui/inc/column.hxx5
-rw-r--r--sw/source/ui/inc/conarc.hxx5
-rw-r--r--sw/source/ui/inc/concustomshape.hxx5
-rw-r--r--sw/source/ui/inc/condedit.hxx5
-rw-r--r--sw/source/ui/inc/conform.hxx5
-rw-r--r--sw/source/ui/inc/conpoly.hxx5
-rw-r--r--sw/source/ui/inc/conrect.hxx5
-rw-r--r--sw/source/ui/inc/content.hxx5
-rw-r--r--sw/source/ui/inc/conttree.hxx5
-rw-r--r--sw/source/ui/inc/convert.hxx5
-rw-r--r--sw/source/ui/inc/cption.hxx5
-rw-r--r--sw/source/ui/inc/dbconfig.hxx7
-rw-r--r--sw/source/ui/inc/dbinsdlg.hxx11
-rw-r--r--sw/source/ui/inc/dbtree.hxx5
-rw-r--r--sw/source/ui/inc/dbui.hxx5
-rw-r--r--sw/source/ui/inc/dialmgr.hxx5
-rw-r--r--sw/source/ui/inc/docfnote.hxx5
-rw-r--r--sw/source/ui/inc/docstdlg.hxx5
-rw-r--r--sw/source/ui/inc/drawbase.hxx5
-rw-r--r--sw/source/ui/inc/drawsh.hxx5
-rw-r--r--sw/source/ui/inc/drformsh.hxx5
-rw-r--r--sw/source/ui/inc/drpcps.hxx5
-rw-r--r--sw/source/ui/inc/drwbassh.hxx5
-rw-r--r--sw/source/ui/inc/drwtxtsh.hxx5
-rw-r--r--sw/source/ui/inc/dselect.hxx5
-rw-r--r--sw/source/ui/inc/edtwin.hxx7
-rw-r--r--sw/source/ui/inc/envimg.hxx8
-rw-r--r--sw/source/ui/inc/envlop.hxx5
-rw-r--r--sw/source/ui/inc/fldedt.hxx5
-rw-r--r--sw/source/ui/inc/fldmgr.hxx7
-rw-r--r--sw/source/ui/inc/fldtdlg.hxx5
-rw-r--r--sw/source/ui/inc/fldwrap.hxx5
-rw-r--r--sw/source/ui/inc/fontcfg.hxx6
-rw-r--r--sw/source/ui/inc/formatclipboard.hxx9
-rw-r--r--sw/source/ui/inc/formedt.hxx5
-rw-r--r--sw/source/ui/inc/frmdlg.hxx5
-rw-r--r--sw/source/ui/inc/frmmgr.hxx7
-rw-r--r--sw/source/ui/inc/frmpage.hxx5
-rw-r--r--sw/source/ui/inc/frmsh.hxx5
-rw-r--r--sw/source/ui/inc/frmui.hrc5
-rw-r--r--sw/source/ui/inc/globals.h5
-rw-r--r--sw/source/ui/inc/globdoc.hrc5
-rw-r--r--sw/source/ui/inc/glosbib.hxx5
-rw-r--r--sw/source/ui/inc/glosdoc.hxx7
-rw-r--r--sw/source/ui/inc/gloshdl.hxx5
-rw-r--r--sw/source/ui/inc/gloslst.hxx7
-rw-r--r--sw/source/ui/inc/glossary.hxx5
-rw-r--r--sw/source/ui/inc/glshell.hxx5
-rw-r--r--sw/source/ui/inc/grfsh.hxx5
-rw-r--r--sw/source/ui/inc/hidfunc.h5
-rw-r--r--sw/source/ui/inc/hyp.hxx7
-rw-r--r--sw/source/ui/inc/idxmrk.hxx5
-rw-r--r--sw/source/ui/inc/imaildsplistener.hxx5
-rw-r--r--sw/source/ui/inc/initui.hxx5
-rw-r--r--sw/source/ui/inc/inpdlg.hxx5
-rw-r--r--sw/source/ui/inc/inputwin.hxx5
-rw-r--r--sw/source/ui/inc/insfnote.hxx5
-rw-r--r--sw/source/ui/inc/insrule.hxx5
-rw-r--r--sw/source/ui/inc/instable.hxx5
-rw-r--r--sw/source/ui/inc/javaedit.hxx5
-rw-r--r--sw/source/ui/inc/label.hxx7
-rw-r--r--sw/source/ui/inc/labelcfg.hxx8
-rw-r--r--sw/source/ui/inc/labimg.hxx10
-rwxr-xr-xsw/source/ui/inc/langhelper.hxx5
-rw-r--r--sw/source/ui/inc/linenum.hxx5
-rw-r--r--sw/source/ui/inc/listsh.hxx5
-rw-r--r--sw/source/ui/inc/macassgn.hxx5
-rw-r--r--sw/source/ui/inc/mailconfigpage.hxx5
-rw-r--r--sw/source/ui/inc/maildispatcher.hxx7
-rw-r--r--sw/source/ui/inc/mailmergechildwindow.hxx5
-rw-r--r--sw/source/ui/inc/mailmergehelper.hxx5
-rw-r--r--sw/source/ui/inc/mailmergewizard.hxx5
-rw-r--r--sw/source/ui/inc/mailmrge.hxx5
-rw-r--r--sw/source/ui/inc/makefile.mk6
-rw-r--r--sw/source/ui/inc/mediash.hxx5
-rw-r--r--sw/source/ui/inc/mergetbl.hxx5
-rw-r--r--sw/source/ui/inc/misc.hrc5
-rw-r--r--sw/source/ui/inc/mmconfigitem.hxx5
-rw-r--r--sw/source/ui/inc/multmrk.hxx5
-rw-r--r--sw/source/ui/inc/navicfg.hxx8
-rw-r--r--sw/source/ui/inc/navicont.hxx5
-rw-r--r--sw/source/ui/inc/navipi.hxx7
-rw-r--r--sw/source/ui/inc/num.hxx5
-rw-r--r--sw/source/ui/inc/numberingtypelistbox.hxx5
-rw-r--r--sw/source/ui/inc/numfmtlb.hxx7
-rw-r--r--sw/source/ui/inc/numpara.hxx5
-rw-r--r--sw/source/ui/inc/numprevw.hxx5
-rw-r--r--sw/source/ui/inc/olesh.hxx5
-rw-r--r--sw/source/ui/inc/olmenu.hxx5
-rw-r--r--sw/source/ui/inc/optcomp.hxx7
-rw-r--r--sw/source/ui/inc/optload.hxx5
-rw-r--r--sw/source/ui/inc/optpage.hxx15
-rw-r--r--sw/source/ui/inc/outline.hxx5
-rw-r--r--sw/source/ui/inc/pardlg.hxx5
-rw-r--r--sw/source/ui/inc/pattern.hxx5
-rw-r--r--sw/source/ui/inc/pgfnote.hxx5
-rw-r--r--sw/source/ui/inc/pggrid.hxx5
-rw-r--r--sw/source/ui/inc/popbox.hxx5
-rw-r--r--sw/source/ui/inc/popup.hrc5
-rw-r--r--sw/source/ui/inc/prcntfld.hxx5
-rw-r--r--sw/source/ui/inc/prtopt.hxx8
-rw-r--r--sw/source/ui/inc/pview.hxx7
-rw-r--r--sw/source/ui/inc/redlndlg.hxx9
-rw-r--r--sw/source/ui/inc/regionsw.hxx11
-rw-r--r--sw/source/ui/inc/ribbar.hrc5
-rw-r--r--sw/source/ui/inc/rowht.hxx5
-rw-r--r--sw/source/ui/inc/scroll.hxx5
-rw-r--r--sw/source/ui/inc/selglos.hxx5
-rw-r--r--sw/source/ui/inc/sharedconnection.hxx5
-rw-r--r--sw/source/ui/inc/shdwcrsr.hxx5
-rw-r--r--sw/source/ui/inc/shells.hrc5
-rw-r--r--sw/source/ui/inc/split.hxx5
-rw-r--r--sw/source/ui/inc/splittbl.hxx5
-rw-r--r--sw/source/ui/inc/srcedtw.hxx18
-rw-r--r--sw/source/ui/inc/srcview.hxx15
-rw-r--r--sw/source/ui/inc/srtdlg.hxx5
-rw-r--r--sw/source/ui/inc/stmenu.hxx5
-rw-r--r--sw/source/ui/inc/swcont.hxx5
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx5
-rw-r--r--sw/source/ui/inc/swlbox.hxx7
-rw-r--r--sw/source/ui/inc/swmn_tmpl.hrc5
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx5
-rw-r--r--sw/source/ui/inc/swrenamexnameddlg.hxx5
-rw-r--r--sw/source/ui/inc/swtablerep.hxx5
-rw-r--r--sw/source/ui/inc/swuiccoll.hxx5
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx5
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx5
-rw-r--r--sw/source/ui/inc/swuipardlg.hxx5
-rw-r--r--sw/source/ui/inc/swvset.hxx5
-rw-r--r--sw/source/ui/inc/swwrtshitem.hxx7
-rw-r--r--sw/source/ui/inc/syncbtn.hxx5
-rw-r--r--sw/source/ui/inc/table.hrc5
-rw-r--r--sw/source/ui/inc/tabledlg.hxx5
-rw-r--r--sw/source/ui/inc/tablemgr.hxx5
-rw-r--r--sw/source/ui/inc/tabsh.hxx5
-rw-r--r--sw/source/ui/inc/tautofmt.hxx5
-rw-r--r--sw/source/ui/inc/tblctrl.hxx5
-rw-r--r--sw/source/ui/inc/tblnumfm.hxx5
-rw-r--r--sw/source/ui/inc/tbxanchr.hxx5
-rw-r--r--sw/source/ui/inc/tbxmgr.hxx5
-rw-r--r--sw/source/ui/inc/textcontrolcombo.hxx5
-rw-r--r--sw/source/ui/inc/textsh.hxx5
-rw-r--r--sw/source/ui/inc/tmpdlg.hxx5
-rw-r--r--sw/source/ui/inc/tmplctrl.hxx5
-rw-r--r--sw/source/ui/inc/toolbox_tmpl.hrc5
-rw-r--r--sw/source/ui/inc/toxmgr.hxx5
-rw-r--r--sw/source/ui/inc/uiborder.hxx5
-rw-r--r--sw/source/ui/inc/uiitems.hxx7
-rw-r--r--sw/source/ui/inc/uinums.hxx7
-rw-r--r--sw/source/ui/inc/uitool.hxx5
-rw-r--r--sw/source/ui/inc/uivwimp.hxx5
-rw-r--r--sw/source/ui/inc/unodispatch.hxx5
-rw-r--r--sw/source/ui/inc/unotools.hxx5
-rw-r--r--sw/source/ui/inc/unotxvw.hxx9
-rw-r--r--sw/source/ui/inc/usrpref.hxx15
-rw-r--r--sw/source/ui/inc/utlui.hrc5
-rw-r--r--sw/source/ui/inc/view.hxx21
-rw-r--r--sw/source/ui/inc/viewlayoutctrl.hxx5
-rw-r--r--sw/source/ui/inc/web.hrc5
-rw-r--r--sw/source/ui/inc/wformsh.hxx5
-rw-r--r--sw/source/ui/inc/wfrmsh.hxx5
-rw-r--r--sw/source/ui/inc/wgrfsh.hxx5
-rw-r--r--sw/source/ui/inc/wlistsh.hxx5
-rw-r--r--sw/source/ui/inc/wolesh.hxx5
-rw-r--r--sw/source/ui/inc/wordcountdialog.hxx5
-rw-r--r--sw/source/ui/inc/workctrl.hxx5
-rw-r--r--sw/source/ui/inc/wrap.hxx5
-rw-r--r--sw/source/ui/inc/wrtsh.hxx5
-rw-r--r--sw/source/ui/inc/wtabsh.hxx5
-rw-r--r--sw/source/ui/inc/wtextsh.hxx5
-rw-r--r--sw/source/ui/inc/wview.hxx5
-rw-r--r--sw/source/ui/inc/zoomctrl.hxx5
-rw-r--r--sw/source/ui/index/cntex.cxx5
-rw-r--r--sw/source/ui/index/cnttab.cxx13
-rw-r--r--sw/source/ui/index/cnttab.hrc5
-rw-r--r--sw/source/ui/index/cnttab.src5
-rw-r--r--sw/source/ui/index/idxmrk.cxx19
-rw-r--r--sw/source/ui/index/idxmrk.hrc5
-rw-r--r--sw/source/ui/index/idxmrk.src5
-rw-r--r--sw/source/ui/index/makefile.mk6
-rw-r--r--sw/source/ui/index/multmrk.cxx5
-rw-r--r--sw/source/ui/index/multmrk.hrc5
-rw-r--r--sw/source/ui/index/multmrk.src5
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx21
-rw-r--r--sw/source/ui/index/toxmgr.cxx5
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx19
-rw-r--r--sw/source/ui/lingu/hyp.cxx5
-rw-r--r--sw/source/ui/lingu/makefile.mk6
-rw-r--r--sw/source/ui/lingu/olmenu.cxx34
-rw-r--r--sw/source/ui/lingu/olmenu.hrc5
-rw-r--r--sw/source/ui/lingu/olmenu.src5
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.cxx11
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.hxx5
-rw-r--r--sw/source/ui/makefile.mk6
-rw-r--r--sw/source/ui/misc/autocorr.src5
-rw-r--r--sw/source/ui/misc/bookmark.cxx7
-rw-r--r--sw/source/ui/misc/bookmark.hrc5
-rw-r--r--sw/source/ui/misc/bookmark.src5
-rw-r--r--sw/source/ui/misc/docfnote.cxx7
-rw-r--r--sw/source/ui/misc/docfnote.hrc5
-rw-r--r--sw/source/ui/misc/docfnote.src5
-rw-r--r--sw/source/ui/misc/glosbib.cxx9
-rw-r--r--sw/source/ui/misc/glosbib.hrc5
-rw-r--r--sw/source/ui/misc/glosbib.src5
-rw-r--r--sw/source/ui/misc/glosdoc.cxx13
-rw-r--r--sw/source/ui/misc/glossary.cxx41
-rw-r--r--sw/source/ui/misc/glossary.hrc5
-rw-r--r--sw/source/ui/misc/glossary.src5
-rw-r--r--sw/source/ui/misc/glshell.cxx23
-rw-r--r--sw/source/ui/misc/impfnote.hxx5
-rw-r--r--sw/source/ui/misc/insfnote.cxx11
-rw-r--r--sw/source/ui/misc/insfnote.hrc5
-rw-r--r--sw/source/ui/misc/insfnote.src5
-rw-r--r--sw/source/ui/misc/insrule.cxx9
-rw-r--r--sw/source/ui/misc/insrule.hrc5
-rw-r--r--sw/source/ui/misc/insrule.src5
-rw-r--r--sw/source/ui/misc/linenum.cxx7
-rw-r--r--sw/source/ui/misc/linenum.hrc5
-rw-r--r--sw/source/ui/misc/linenum.src5
-rw-r--r--sw/source/ui/misc/makefile.mk6
-rw-r--r--sw/source/ui/misc/num.cxx18
-rw-r--r--sw/source/ui/misc/num.hrc5
-rw-r--r--sw/source/ui/misc/num.src5
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx5
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.src5
-rw-r--r--sw/source/ui/misc/outline.cxx9
-rw-r--r--sw/source/ui/misc/outline.hrc5
-rw-r--r--sw/source/ui/misc/outline.src5
-rw-r--r--sw/source/ui/misc/pgfnote.cxx13
-rw-r--r--sw/source/ui/misc/pgfnote.hrc5
-rw-r--r--sw/source/ui/misc/pgfnote.src5
-rw-r--r--sw/source/ui/misc/pggrid.cxx15
-rw-r--r--sw/source/ui/misc/pggrid.hrc5
-rw-r--r--sw/source/ui/misc/pggrid.src5
-rw-r--r--sw/source/ui/misc/redlndlg.cxx11
-rw-r--r--sw/source/ui/misc/redlndlg.hrc5
-rw-r--r--sw/source/ui/misc/redlndlg.src5
-rw-r--r--sw/source/ui/misc/srtdlg.cxx11
-rw-r--r--sw/source/ui/misc/srtdlg.hrc5
-rw-r--r--sw/source/ui/misc/srtdlg.src5
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx9
-rw-r--r--sw/source/ui/ribbar/conarc.cxx5
-rw-r--r--sw/source/ui/ribbar/concustomshape.cxx11
-rw-r--r--sw/source/ui/ribbar/conform.cxx5
-rw-r--r--sw/source/ui/ribbar/conpoly.cxx5
-rw-r--r--sw/source/ui/ribbar/conrect.cxx18
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx12
-rw-r--r--sw/source/ui/ribbar/dselect.cxx5
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx9
-rw-r--r--sw/source/ui/ribbar/inputwin.hrc5
-rw-r--r--sw/source/ui/ribbar/inputwin.src5
-rw-r--r--sw/source/ui/ribbar/makefile.mk6
-rw-r--r--sw/source/ui/ribbar/tblctrl.cxx7
-rw-r--r--sw/source/ui/ribbar/tblctrl.hrc5
-rw-r--r--sw/source/ui/ribbar/tblctrl.src5
-rw-r--r--sw/source/ui/ribbar/tbxanchr.cxx7
-rw-r--r--sw/source/ui/ribbar/tbxanchr.src5
-rw-r--r--sw/source/ui/ribbar/tbxmgr.cxx5
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx9
-rw-r--r--sw/source/ui/ribbar/workctrl.hrc5
-rw-r--r--sw/source/ui/ribbar/workctrl.src5
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx83
-rw-r--r--sw/source/ui/shells/basesh.cxx109
-rw-r--r--sw/source/ui/shells/beziersh.cxx11
-rw-r--r--sw/source/ui/shells/drawdlg.cxx9
-rw-r--r--sw/source/ui/shells/drawsh.cxx11
-rw-r--r--sw/source/ui/shells/drformsh.cxx11
-rw-r--r--sw/source/ui/shells/drwbassh.cxx31
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx77
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx35
-rw-r--r--sw/source/ui/shells/frmsh.cxx26
-rw-r--r--sw/source/ui/shells/grfsh.cxx19
-rw-r--r--sw/source/ui/shells/grfshex.cxx14
-rwxr-xr-xsw/source/ui/shells/langhelper.cxx29
-rw-r--r--sw/source/ui/shells/listsh.cxx19
-rw-r--r--sw/source/ui/shells/makefile.mk6
-rw-r--r--sw/source/ui/shells/mediash.cxx19
-rw-r--r--sw/source/ui/shells/olesh.cxx5
-rw-r--r--sw/source/ui/shells/shells.src5
-rw-r--r--sw/source/ui/shells/slotadd.cxx104
-rw-r--r--sw/source/ui/shells/tabsh.cxx45
-rw-r--r--sw/source/ui/shells/textdrw.cxx13
-rw-r--r--sw/source/ui/shells/textfld.cxx19
-rw-r--r--sw/source/ui/shells/textglos.cxx9
-rw-r--r--sw/source/ui/shells/textidx.cxx17
-rw-r--r--sw/source/ui/shells/textsh.cxx51
-rw-r--r--sw/source/ui/shells/textsh1.cxx47
-rw-r--r--sw/source/ui/shells/textsh2.cxx13
-rw-r--r--sw/source/ui/shells/txtattr.cxx27
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx7
-rw-r--r--sw/source/ui/shells/txtnum.cxx13
-rw-r--r--sw/source/ui/smartmenu/makefile.mk6
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx7
-rw-r--r--sw/source/ui/smartmenu/stmenu.hrc5
-rw-r--r--sw/source/ui/smartmenu/stmenu.src5
-rw-r--r--sw/source/ui/table/chartins.cxx12
-rw-r--r--sw/source/ui/table/chartins.hrc5
-rw-r--r--sw/source/ui/table/chartins.src5
-rw-r--r--sw/source/ui/table/colwd.cxx5
-rw-r--r--sw/source/ui/table/colwd.hrc5
-rw-r--r--sw/source/ui/table/colwd.src5
-rw-r--r--sw/source/ui/table/convert.cxx7
-rw-r--r--sw/source/ui/table/convert.hrc5
-rw-r--r--sw/source/ui/table/convert.src7
-rw-r--r--sw/source/ui/table/instable.cxx5
-rw-r--r--sw/source/ui/table/instable.hrc5
-rw-r--r--sw/source/ui/table/instable.src7
-rw-r--r--sw/source/ui/table/makefile.mk6
-rw-r--r--sw/source/ui/table/mergetbl.cxx5
-rw-r--r--sw/source/ui/table/mergetbl.hrc5
-rw-r--r--sw/source/ui/table/mergetbl.src5
-rw-r--r--sw/source/ui/table/rowht.cxx9
-rw-r--r--sw/source/ui/table/rowht.hrc5
-rw-r--r--sw/source/ui/table/rowht.src5
-rw-r--r--sw/source/ui/table/splittbl.cxx5
-rw-r--r--sw/source/ui/table/splittbl.hrc5
-rw-r--r--sw/source/ui/table/splittbl.src5
-rw-r--r--sw/source/ui/table/swtablerep.cxx21
-rw-r--r--sw/source/ui/table/table.src5
-rw-r--r--sw/source/ui/table/tabledlg.cxx21
-rw-r--r--sw/source/ui/table/tabledlg.hrc5
-rw-r--r--sw/source/ui/table/tabledlg.src5
-rw-r--r--sw/source/ui/table/tablemgr.cxx5
-rw-r--r--sw/source/ui/table/tablepg.hxx5
-rw-r--r--sw/source/ui/table/tautofmt.cxx7
-rw-r--r--sw/source/ui/table/tautofmt.hrc5
-rw-r--r--sw/source/ui/table/tautofmt.src5
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx17
-rw-r--r--sw/source/ui/uiview/makefile.mk7
-rw-r--r--sw/source/ui/uiview/pview.cxx94
-rw-r--r--sw/source/ui/uiview/pview.hrc5
-rw-r--r--sw/source/ui/uiview/pview.src10
-rw-r--r--sw/source/ui/uiview/scroll.cxx5
-rw-r--r--sw/source/ui/uiview/srcview.cxx205
-rw-r--r--sw/source/ui/uiview/swcli.cxx5
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx5
-rw-r--r--sw/source/ui/uiview/view.cxx82
-rw-r--r--sw/source/ui/uiview/view.hrc5
-rw-r--r--sw/source/ui/uiview/view.src5
-rw-r--r--sw/source/ui/uiview/view0.cxx25
-rw-r--r--sw/source/ui/uiview/view1.cxx5
-rw-r--r--sw/source/ui/uiview/view2.cxx62
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx7
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx9
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx5
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx23
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx5
-rw-r--r--sw/source/ui/uiview/viewling.cxx45
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx9
-rw-r--r--sw/source/ui/uiview/viewport.cxx9
-rw-r--r--sw/source/ui/uiview/viewprt.cxx336
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx23
-rw-r--r--sw/source/ui/uiview/viewstat.cxx31
-rw-r--r--sw/source/ui/uiview/viewtab.cxx27
-rw-r--r--sw/source/ui/uno/RefreshListenerContainer.cxx5
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx13
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.hxx5
-rw-r--r--sw/source/ui/uno/SwXFilterOptions.cxx5
-rw-r--r--sw/source/ui/uno/SwXPrintPreviewSettings.cxx5
-rw-r--r--sw/source/ui/uno/SwXPrintPreviewSettings.hxx5
-rw-r--r--sw/source/ui/uno/detreg.cxx5
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx7
-rw-r--r--sw/source/ui/uno/makefile.mk6
-rw-r--r--sw/source/ui/uno/swdet2.cxx7
-rw-r--r--sw/source/ui/uno/swdetect.cxx14
-rw-r--r--sw/source/ui/uno/swdetect.hxx5
-rw-r--r--sw/source/ui/uno/unoatxt.cxx72
-rw-r--r--sw/source/ui/uno/unodefaults.cxx5
-rw-r--r--sw/source/ui/uno/unodefaults.hxx5
-rw-r--r--sw/source/ui/uno/unodispatch.cxx12
-rw-r--r--sw/source/ui/uno/unodoc.cxx5
-rw-r--r--sw/source/ui/uno/unofreg.cxx5
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx10
-rw-r--r--sw/source/ui/uno/unomod.cxx45
-rw-r--r--sw/source/ui/uno/unomodule.cxx5
-rw-r--r--sw/source/ui/uno/unomodule.hxx5
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx906
-rw-r--r--sw/source/ui/uno/unotxvw.cxx117
-rw-r--r--sw/source/ui/uno/warnpassword.cxx7
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx19
-rw-r--r--sw/source/ui/utlui/attrdesc.hrc5
-rw-r--r--sw/source/ui/utlui/attrdesc.src5
-rw-r--r--sw/source/ui/utlui/bookctrl.cxx11
-rw-r--r--sw/source/ui/utlui/condedit.cxx5
-rw-r--r--sw/source/ui/utlui/content.cxx9
-rw-r--r--sw/source/ui/utlui/glbltree.cxx17
-rw-r--r--sw/source/ui/utlui/gloslst.cxx11
-rw-r--r--sw/source/ui/utlui/gloslst.hrc5
-rw-r--r--sw/source/ui/utlui/gloslst.src5
-rw-r--r--sw/source/ui/utlui/initui.cxx8
-rw-r--r--sw/source/ui/utlui/initui.hrc6
-rw-r--r--sw/source/ui/utlui/initui.src9
-rw-r--r--sw/source/ui/utlui/makefile.mk6
-rw-r--r--sw/source/ui/utlui/navicfg.cxx8
-rw-r--r--sw/source/ui/utlui/navipi.cxx11
-rw-r--r--sw/source/ui/utlui/navipi.hrc5
-rw-r--r--sw/source/ui/utlui/navipi.src5
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx13
-rw-r--r--sw/source/ui/utlui/poolfmt.src5
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx5
-rw-r--r--sw/source/ui/utlui/shdwcrsr.cxx5
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx8
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx5
-rw-r--r--sw/source/ui/utlui/tmplctrl.cxx9
-rw-r--r--sw/source/ui/utlui/uiitems.cxx7
-rw-r--r--sw/source/ui/utlui/uitool.cxx23
-rw-r--r--sw/source/ui/utlui/unotools.cxx10
-rw-r--r--sw/source/ui/utlui/unotools.hrc5
-rw-r--r--sw/source/ui/utlui/unotools.src5
-rw-r--r--sw/source/ui/utlui/utlui.src9
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx7
-rw-r--r--sw/source/ui/utlui/zoomctrl.cxx7
-rw-r--r--sw/source/ui/vba/makefile.mk107
-rw-r--r--sw/source/ui/vba/service.cxx84
-rw-r--r--sw/source/ui/vba/vbaaddin.cxx104
-rw-r--r--sw/source/ui/vba/vbaaddin.hxx59
-rw-r--r--sw/source/ui/vba/vbaaddins.cxx107
-rw-r--r--sw/source/ui/vba/vbaaddins.hxx52
-rw-r--r--sw/source/ui/vba/vbaapplication.cxx203
-rw-r--r--sw/source/ui/vba/vbaapplication.hxx74
-rw-r--r--sw/source/ui/vba/vbaautotextentry.cxx126
-rw-r--r--sw/source/ui/vba/vbaautotextentry.hxx80
-rw-r--r--sw/source/ui/vba/vbabookmark.cxx109
-rw-r--r--sw/source/ui/vba/vbabookmark.hxx65
-rw-r--r--sw/source/ui/vba/vbabookmarks.cxx237
-rw-r--r--sw/source/ui/vba/vbabookmarks.hxx75
-rw-r--r--sw/source/ui/vba/vbaborders.cxx378
-rw-r--r--sw/source/ui/vba/vbaborders.hxx63
-rw-r--r--sw/source/ui/vba/vbadialog.cxx78
-rw-r--r--sw/source/ui/vba/vbadialog.hxx50
-rw-r--r--sw/source/ui/vba/vbadialogs.cxx61
-rw-r--r--sw/source/ui/vba/vbadialogs.hxx53
-rw-r--r--sw/source/ui/vba/vbadocument.cxx381
-rw-r--r--sw/source/ui/vba/vbadocument.hxx80
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx764
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.hxx67
-rw-r--r--sw/source/ui/vba/vbadocuments.cxx197
-rw-r--r--sw/source/ui/vba/vbadocuments.hxx66
-rw-r--r--sw/source/ui/vba/vbafield.cxx478
-rw-r--r--sw/source/ui/vba/vbafield.hxx77
-rw-r--r--sw/source/ui/vba/vbafind.cxx428
-rw-r--r--sw/source/ui/vba/vbafind.hxx101
-rw-r--r--sw/source/ui/vba/vbafont.cxx216
-rw-r--r--sw/source/ui/vba/vbafont.hxx31
-rw-r--r--sw/source/ui/vba/vbaglobals.cxx193
-rw-r--r--sw/source/ui/vba/vbaglobals.hxx80
-rw-r--r--sw/source/ui/vba/vbaheaderfooter.cxx111
-rw-r--r--sw/source/ui/vba/vbaheaderfooter.hxx60
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.cxx175
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.hxx49
-rw-r--r--sw/source/ui/vba/vbainformationhelper.cxx68
-rw-r--r--sw/source/ui/vba/vbainformationhelper.hxx43
-rw-r--r--sw/source/ui/vba/vbaoptions.cxx284
-rw-r--r--sw/source/ui/vba/vbaoptions.hxx87
-rw-r--r--sw/source/ui/vba/vbapagesetup.cxx272
-rw-r--r--sw/source/ui/vba/vbapagesetup.hxx67
-rw-r--r--sw/source/ui/vba/vbapalette.cxx75
-rw-r--r--sw/source/ui/vba/vbapalette.hxx15
-rw-r--r--sw/source/ui/vba/vbapane.cxx76
-rw-r--r--sw/source/ui/vba/vbapane.hxx54
-rw-r--r--sw/source/ui/vba/vbapanes.cxx124
-rw-r--r--sw/source/ui/vba/vbapanes.hxx57
-rw-r--r--sw/source/ui/vba/vbaparagraph.cxx174
-rw-r--r--sw/source/ui/vba/vbaparagraph.hxx81
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx573
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.hxx95
-rw-r--r--sw/source/ui/vba/vbarange.cxx345
-rw-r--r--sw/source/ui/vba/vbarange.hxx90
-rw-r--r--sw/source/ui/vba/vbarangehelper.cxx171
-rw-r--r--sw/source/ui/vba/vbarangehelper.hxx43
-rw-r--r--sw/source/ui/vba/vbareplacement.cxx71
-rw-r--r--sw/source/ui/vba/vbareplacement.hxx54
-rw-r--r--sw/source/ui/vba/vbasection.cxx87
-rw-r--r--sw/source/ui/vba/vbasection.hxx59
-rw-r--r--sw/source/ui/vba/vbasections.cxx187
-rw-r--r--sw/source/ui/vba/vbasections.hxx59
-rw-r--r--sw/source/ui/vba/vbaselection.cxx679
-rw-r--r--sw/source/ui/vba/vbaselection.hxx105
-rw-r--r--sw/source/ui/vba/vbastyle.cxx149
-rw-r--r--sw/source/ui/vba/vbastyle.hxx67
-rw-r--r--sw/source/ui/vba/vbastyles.cxx377
-rw-r--r--sw/source/ui/vba/vbastyles.hxx51
-rw-r--r--sw/source/ui/vba/vbasystem.cxx192
-rw-r--r--sw/source/ui/vba/vbasystem.hxx72
-rw-r--r--sw/source/ui/vba/vbatable.cxx97
-rw-r--r--sw/source/ui/vba/vbatable.hxx28
-rw-r--r--sw/source/ui/vba/vbatables.cxx131
-rw-r--r--sw/source/ui/vba/vbatables.hxx28
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx103
-rw-r--r--sw/source/ui/vba/vbatemplate.hxx52
-rw-r--r--sw/source/ui/vba/vbavariable.cxx105
-rw-r--r--sw/source/ui/vba/vbavariable.hxx59
-rw-r--r--sw/source/ui/vba/vbavariables.cxx102
-rw-r--r--sw/source/ui/vba/vbavariables.hxx61
-rw-r--r--sw/source/ui/vba/vbaview.cxx422
-rw-r--r--sw/source/ui/vba/vbaview.hxx68
-rw-r--r--sw/source/ui/vba/vbawindow.cxx113
-rw-r--r--sw/source/ui/vba/vbawindow.hxx58
-rw-r--r--sw/source/ui/vba/vbawrapformat.cxx257
-rw-r--r--sw/source/ui/vba/vbawrapformat.hxx70
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx92
-rw-r--r--sw/source/ui/vba/wordvbahelper.hxx54
-rw-r--r--sw/source/ui/web/makefile.mk6
-rw-r--r--sw/source/ui/web/wdocsh.cxx7
-rw-r--r--sw/source/ui/web/web.src5
-rw-r--r--sw/source/ui/web/wformsh.cxx7
-rw-r--r--sw/source/ui/web/wfrmsh.cxx7
-rw-r--r--sw/source/ui/web/wgrfsh.cxx7
-rw-r--r--sw/source/ui/web/wlistsh.cxx7
-rw-r--r--sw/source/ui/web/wolesh.cxx7
-rw-r--r--sw/source/ui/web/wtabsh.cxx7
-rw-r--r--sw/source/ui/web/wtextsh.cxx7
-rw-r--r--sw/source/ui/web/wview.cxx7
-rw-r--r--sw/source/ui/wrtsh/delete.cxx7
-rw-r--r--sw/source/ui/wrtsh/makefile.mk6
-rw-r--r--sw/source/ui/wrtsh/move.cxx5
-rw-r--r--sw/source/ui/wrtsh/select.cxx18
-rw-r--r--sw/source/ui/wrtsh/wrtsh.hrc5
-rw-r--r--sw/source/ui/wrtsh/wrtsh.src5
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx22
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx13
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx5
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx5
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx7
845 files changed, 16021 insertions, 6157 deletions
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 961e8bdc57a0..e1a3d314d572 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: app.src,v $
- * $Revision: 1.120 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,7 +27,7 @@
-#include <svtools/style.hrc>
+#include <svl/style.hrc>
#include <sfx2/sfx.hrc>
#include <svx/dialogs.hrc>
#include <svx/globlmn.hrc>
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 7f3acf375b35..a35bc90f38f0 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appenv.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,45 +40,31 @@
#include <svx/svxids.hrc>
#include <svtools/svmedit.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/printer.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/pbinitem.hxx>
-#include <svx/paperinf.hxx>
-#include <svx/brkitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/pbinitem.hxx>
+#include <editeng/paperinf.hxx>
+#include <editeng/brkitem.hxx>
#include <fmthdft.hxx>
#include <swwait.hxx>
#include <paratr.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <frmatr.hxx>
#include <fldbas.hxx>
#include <swundo.hxx>
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <fmtcol.hxx>
#include <frmmgr.hxx>
#include <fldmgr.hxx>
@@ -91,9 +74,7 @@
#include <SwStyleNameMapper.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -478,7 +459,7 @@ static USHORT nTitleNo = 0;
if (rItem.bSend)
{
pSh->SttEndDoc(TRUE);
- aMgr.InsertFlyFrm(FLY_PAGE,
+ aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper),
Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0));
@@ -494,7 +475,7 @@ static USHORT nTitleNo = 0;
// Empfaenger
pSh->SttEndDoc(TRUE);
- aMgr.InsertFlyFrm(FLY_PAGE,
+ aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
Size (nPageW - rItem.lAddrFromLeft - 566, 0));
pSh->EnterSelFrmMode();
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 7fe0d349e8a7..accb052033f6 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: apphdl.cxx,v $
- * $Revision: 1.68 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,26 +34,26 @@
#include <tools/link.hxx>
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/undoopt.hxx>
-#include <svtools/pathoptions.hxx>
+#include <svl/svstdarr.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/undoopt.hxx>
+#include <unotools/pathoptions.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/event.hxx>
#include <sfx2/objitem.hxx>
#include <svx/dataaccessdescriptor.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svtools/colorcfg.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/isethint.hxx>
+#include <svl/eitem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/isethint.hxx>
#include <svx/hyprlink.hxx>
#include <sfx2/request.hxx>
#include <sfx2/fcontnr.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/ctloptions.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/ctloptions.hxx>
+#include <unotools/useroptions.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/wrkwin.hxx>
#include <svx/insctrl.hxx>
@@ -100,7 +97,7 @@
#include <mmconfigitem.hxx>
#include <mailmergechildwindow.hxx>
#include <linguistic/lngprops.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
@@ -753,82 +750,8 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else if(rHint.ISA(SfxSimpleHint))
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
- if(SFX_HINT_COLORS_CHANGED == nHintId ||
- SFX_HINT_ACCESSIBILITY_CHANGED == nHintId )
- {
- sal_Bool bAccessibility = sal_False;
- if(SFX_HINT_COLORS_CHANGED == nHintId)
- SwViewOption::ApplyColorConfigValues(*pColorConfig);
- else
- bAccessibility = sal_True;
-
- //invalidate all edit windows
- const TypeId aSwViewTypeId = TYPE(SwView);
- const TypeId aSwPreViewTypeId = TYPE(SwPagePreView);
- const TypeId aSwSrcViewTypeId = TYPE(SwSrcView);
- SfxViewShell* pViewShell = SfxViewShell::GetFirst();
- while(pViewShell)
- {
- if(pViewShell->GetWindow())
- {
- if((pViewShell->IsA(aSwViewTypeId) ||
- pViewShell->IsA(aSwPreViewTypeId) ||
- pViewShell->IsA(aSwSrcViewTypeId)))
- {
- if(bAccessibility)
- {
- if(pViewShell->IsA(aSwViewTypeId))
- ((SwView*)pViewShell)->ApplyAccessiblityOptions(*pAccessibilityOptions);
- else if(pViewShell->IsA(aSwPreViewTypeId))
- ((SwPagePreView*)pViewShell)->ApplyAccessiblityOptions(*pAccessibilityOptions);
- }
- pViewShell->GetWindow()->Invalidate();
- }
- }
- pViewShell = SfxViewShell::GetNext( *pViewShell );
- }
- }
- else if( SFX_HINT_CTL_SETTINGS_CHANGED == nHintId )
- {
- const SfxObjectShell* pObjSh = SfxObjectShell::GetFirst();
- while( pObjSh )
- {
- if( pObjSh->IsA(TYPE(SwDocShell)) )
- {
- const SwDoc* pDoc = ((SwDocShell*)pObjSh)->GetDoc();
- ViewShell* pVSh = 0;
- pDoc->GetEditShell( &pVSh );
- if ( pVSh )
- pVSh->ChgNumberDigits();
- }
- pObjSh = SfxObjectShell::GetNext(*pObjSh);
- }
- }
- else if(SFX_HINT_USER_OPTIONS_CHANGED == nHintId)
- {
- bAuthorInitialised = FALSE;
- }
- else if(SFX_HINT_UNDO_OPTIONS_CHANGED == nHintId)
- {
- const int nNew = GetUndoOptions().GetUndoCount();
- const int nOld = SwEditShell::GetUndoActionCount();
- if(!nNew || !nOld)
- {
- sal_Bool bUndo = nNew != 0;
- //ueber DocShells iterieren und Undo umschalten
-
- TypeId aType(TYPE(SwDocShell));
- SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
- while( pDocShell )
- {
- pDocShell->GetDoc()->DoUndo( bUndo );
- pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
- }
- }
- SwEditShell::SetUndoActionCount( static_cast< USHORT >(nNew));
- }
- else if(SFX_HINT_DEINITIALIZING == nHintId)
+ USHORT nHintId = ((SfxSimpleHint&)rHint).GetId();
+ if(SFX_HINT_DEINITIALIZING == nHintId)
{
DELETEZ(pWebUsrPref);
DELETEZ(pUsrPref) ;
@@ -842,20 +765,98 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
DELETEZ(pWebToolbarConfig) ;
DELETEZ(pAuthorNames) ;
DELETEZ(pDBConfig);
- EndListening(*pColorConfig);
+ pColorConfig->RemoveListener(this);
DELETEZ(pColorConfig);
- EndListening(*pAccessibilityOptions);
+ pAccessibilityOptions->RemoveListener(this);
DELETEZ(pAccessibilityOptions);
- EndListening(*pCTLOptions);
+ pCTLOptions->RemoveListener(this);
DELETEZ(pCTLOptions);
- EndListening(*pUserOptions);
+ pUserOptions->RemoveListener(this);
DELETEZ(pUserOptions);
- EndListening(*pUndoOptions);
+ pUndoOptions->RemoveListener(this);
DELETEZ(pUndoOptions);
}
}
}
+void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal_uInt32 )
+{
+ if( pBrdCst == pUserOptions )
+ {
+ bAuthorInitialised = FALSE;
+ }
+ else if( pBrdCst == pUndoOptions )
+ {
+ const int nNew = GetUndoOptions().GetUndoCount();
+ const int nOld = SwEditShell::GetUndoActionCount();
+ if(!nNew || !nOld)
+ {
+ sal_Bool bUndo = nNew != 0;
+ //ueber DocShells iterieren und Undo umschalten
+
+ TypeId aType(TYPE(SwDocShell));
+ SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
+ while( pDocShell )
+ {
+ pDocShell->GetDoc()->DoUndo( bUndo );
+ pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
+ }
+ }
+ SwEditShell::SetUndoActionCount( static_cast< USHORT >(nNew));
+ }
+ else if ( pBrdCst == pColorConfig || pBrdCst == pAccessibilityOptions )
+ {
+ sal_Bool bAccessibility = sal_False;
+ if( pBrdCst == pColorConfig )
+ SwViewOption::ApplyColorConfigValues(*pColorConfig);
+ else
+ bAccessibility = sal_True;
+
+ //invalidate all edit windows
+ const TypeId aSwViewTypeId = TYPE(SwView);
+ const TypeId aSwPreViewTypeId = TYPE(SwPagePreView);
+ const TypeId aSwSrcViewTypeId = TYPE(SwSrcView);
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+ while(pViewShell)
+ {
+ if(pViewShell->GetWindow())
+ {
+ if((pViewShell->IsA(aSwViewTypeId) ||
+ pViewShell->IsA(aSwPreViewTypeId) ||
+ pViewShell->IsA(aSwSrcViewTypeId)))
+ {
+ if(bAccessibility)
+ {
+ if(pViewShell->IsA(aSwViewTypeId))
+ ((SwView*)pViewShell)->ApplyAccessiblityOptions(*pAccessibilityOptions);
+ else if(pViewShell->IsA(aSwPreViewTypeId))
+ ((SwPagePreView*)pViewShell)->ApplyAccessiblityOptions(*pAccessibilityOptions);
+ }
+ pViewShell->GetWindow()->Invalidate();
+ }
+ }
+ pViewShell = SfxViewShell::GetNext( *pViewShell );
+ }
+ }
+ else if( pBrdCst == pCTLOptions )
+ {
+ const SfxObjectShell* pObjSh = SfxObjectShell::GetFirst();
+ while( pObjSh )
+ {
+ if( pObjSh->IsA(TYPE(SwDocShell)) )
+ {
+ const SwDoc* pDoc = ((SwDocShell*)pObjSh)->GetDoc();
+ ViewShell* pVSh = 0;
+ pDoc->GetEditShell( &pVSh );
+ if ( pVSh )
+ pVSh->ChgNumberDigits();
+ }
+ pObjSh = SfxObjectShell::GetNext(*pObjSh);
+ }
+ }
+
+}
+
/* -----------------------------20.02.01 12:43--------------------------------
---------------------------------------------------------------------------*/
@@ -874,7 +875,7 @@ svtools::ColorConfig& SwModule::GetColorConfig()
{
pColorConfig = new svtools::ColorConfig;
SwViewOption::ApplyColorConfigValues(*pColorConfig);
- StartListening(*pColorConfig);
+ pColorConfig->AddListener(this);
}
return *pColorConfig;
}
@@ -886,7 +887,7 @@ SvtAccessibilityOptions& SwModule::GetAccessibilityOptions()
if(!pAccessibilityOptions)
{
pAccessibilityOptions = new SvtAccessibilityOptions;
- StartListening(*pAccessibilityOptions);
+ pAccessibilityOptions->AddListener(this);
}
return *pAccessibilityOptions;
}
@@ -898,7 +899,7 @@ SvtCTLOptions& SwModule::GetCTLOptions()
if(!pCTLOptions)
{
pCTLOptions = new SvtCTLOptions;
- StartListening(*pCTLOptions);
+ pCTLOptions->AddListener(this);
}
return *pCTLOptions;
}
@@ -910,7 +911,7 @@ SvtUserOptions& SwModule::GetUserOptions()
if(!pUserOptions)
{
pUserOptions = new SvtUserOptions;
- StartListening(*pUserOptions);
+ pUserOptions->AddListener(this);
}
return *pUserOptions;
}
@@ -922,7 +923,7 @@ SvtUndoOptions& SwModule::GetUndoOptions()
if(!pUndoOptions)
{
pUndoOptions = new SvtUndoOptions;
- StartListening(*pUndoOptions);
+ pUndoOptions->AddListener(this);
}
return *pUndoOptions;
}
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index d09e522599d7..7ff62b4a0c1b 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: applab.cxx,v $
- * $Revision: 1.34.46.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,26 +36,20 @@
#include <hintids.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/request.hxx>
#include <sfx2/linkmgr.hxx>
-#include <svx/pbinitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/paperinf.hxx>
-#include <svx/protitem.hxx>
+#include <editeng/pbinitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/paperinf.hxx>
+#include <editeng/protitem.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <fmthdft.hxx>
@@ -71,21 +62,13 @@
#include <frmatr.hxx>
#include <paratr.hxx>
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <fldbas.hxx>
#include <swundo.hxx>
#include <wrtsh.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <fmtcol.hxx>
#include <expfld.hxx>
#include <fldmgr.hxx>
@@ -126,7 +109,7 @@ const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
- aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum));
+ aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum));
if (!bPage)
{
aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist,
@@ -166,7 +149,7 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
- aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum));
+ aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum));
if (!bPage)
{
aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist,
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index 7698fe58c580..c6e2527ba0c8 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: appopt.cxx,v $
- * $Revision: 1.36 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,20 +35,20 @@
#include <com/sun/star/i18n/ScriptType.hpp>
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/request.hxx>
#include <sfx2/app.hxx>
#include <sfx2/printer.hxx>
#include <svx/htmlmode.hxx>
#include <sfx2/bindings.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/brshitem.hxx>
#ifndef _SVX_TSTPITEM_HXX //autogen
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#endif
#include <svx/optgrid.hxx>
#include <svx/svxdlg.hxx>
@@ -86,15 +83,15 @@
#endif
#include <glosdoc.hxx>
#include <uiitems.hxx>
-#include <svx/langitem.hxx>
-#include <svtools/lingucfg.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/langitem.hxx>
+#include <unotools/lingucfg.hxx>
+#include <editeng/unolingu.hxx>
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
#include <globals.h> // globale Konstanten z.B.
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include "swabstdlg.hxx"
#include <swwrtshitem.hxx>
@@ -151,7 +148,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
SID_ATTR_LANGUAGE, SID_ATTR_LANGUAGE,
SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
-#ifndef PRODUCT
+#ifdef DBG_UTIL
FN_PARAM_SWTEST, FN_PARAM_SWTEST,
#endif
0);
@@ -285,7 +282,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(SvxBrushItem(aViewOpt.GetRetoucheColor(), RES_BACKGROUND));
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*-----------------01.02.97 13.02-------------------
Test-Optionen
--------------------------------------------------*/
@@ -491,7 +488,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*--------------------------------------------------------------------------
Writer Testseite auswerten
----------------------------------------------------------------------------*/
@@ -614,7 +611,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
}
}
break;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
case RID_SW_TP_OPTTEST_PAGE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 06289c10f38a..3759f3a9cd89 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docsh.cxx,v $
- * $Revision: 1.79.188.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,32 +35,29 @@
#include <vcl/wrkwin.hxx>
#include <vcl/jobset.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svx/adjitem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <editeng/adjitem.hxx>
#include <basic/sbx.hxx>
-#include <svtools/moduleoptions.hxx>
-#include <sfx2/app.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <unotools/misccfg.hxx>
#include <sfx2/request.hxx>
-#include <svtools/misccfg.hxx>
#include <sfx2/passwd.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/evntconf.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/printer.hxx>
-#include <svx/linkmgr.hxx>
-#include <svx/srchitem.hxx>
-#include <svx/flstitem.hxx>
+#include <sfx2/linkmgr.hxx>
+#include <svl/srchitem.hxx>
+#include <editeng/flstitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/svxmsbas.hxx>
#include <svtools/soerr.hxx>
#include <sot/clsids.hxx>
#include <basic/basmgr.hxx>
#include <basic/sbmod.hxx>
-//#include <basic/sbjsmod.hxx>
#include <swevent.hxx>
#include <fmtpdsc.hxx>
#include <fmtfsize.hxx>
@@ -111,9 +105,9 @@
#include "warnpassword.hxx"
#include <cfgid.h>
-#include <svtools/moduleoptions.hxx>
-#include <svtools/fltrcfg.hxx>
-#include <svx/htmlcfg.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/objface.hxx>
#include <comphelper/storagehelper.hxx>
@@ -382,8 +376,7 @@ BOOL SwDocShell::Save()
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
//aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
- nVBWarning = SvxImportMSVBasic::
- GetSaveWarningOfMSVBAStorage( *this );
+ nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
pDoc->SetContainsMSVBasic( FALSE );
}
@@ -501,8 +494,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
//aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
- nVBWarning = SvxImportMSVBasic::
- GetSaveWarningOfMSVBAStorage( *this );
+ nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
pDoc->SetContainsMSVBasic( FALSE );
}
@@ -599,8 +591,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
DBG_ASSERT( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
- SvxImportMSVBasic aTmp( *this, *xStg );
- nVBWarning = aTmp.SaveOrDelMSVBAStorage( bSave, String::CreateFromAscii("Macros") );
+ nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
xStg->Commit();
pDoc->SetContainsMSVBasic( TRUE );
}
@@ -1134,7 +1125,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
rSet.Put( SfxUInt16Item( nWhich,
static_cast< sal_uInt16 >(
pFmtr ? pFmtr->GetYear2000()
- : SFX_APP()->GetMiscConfig()->GetYear2000() )));
+ : ::utl::MiscCfg().GetYear2000() )));
}
break;
case SID_ATTR_CHAR_FONTLIST:
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 3fd1e879b063..cb8931b0a055 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docsh2.cxx,v $
- * $Revision: 1.103.144.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,33 +27,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#ifndef _COM_SUN_STAR_LANG_XMultiServiceFactory_HPP_
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
-#include <comphelper/processfactory.hxx>
-#endif
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XDispatchHelper.hpp>
+#include <comphelper/processfactory.hxx>
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#include <svtools/lckbitem.hxx>
-#include <svtools/eitem.hxx>
-/*
-#include <svtools/macitem.hxx>
-*/
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/pathoptions.hxx>
+#include <svl/lckbitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
+#include <unotools/pathoptions.hxx>
#include <svtools/transfer.hxx>
#ifndef _SFXSIDS_HRC //autogen
#include <sfx2/dialogs.hrc>
@@ -75,11 +61,11 @@
#include <svx/svxids.hrc>
#endif
#include <svx/drawitem.hxx>
-#include <svx/svxacorr.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/svxacorr.hxx>
+#include <editeng/langitem.hxx>
#include <svx/fmshell.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <svx/ofaitem.hxx>
#include <SwSmartTagMgr.hxx>
#include <sfx2/app.hxx>
@@ -90,51 +76,33 @@
#include <swunodef.hxx>
#include <fmtcol.hxx>
#include <swevent.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx> // fuer die aktuelle Sicht
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // Dokumenterzeugung
-#endif
#include <wrtsh.hxx>
#include <fldbas.hxx>
#include <viewopt.hxx>
-#ifndef _GLOBDOC_HXX
#include <globdoc.hxx>
-#endif
#include <fldwrap.hxx>
-#ifndef _REDLNDLG_HXX
#include <redlndlg.hxx>
-#endif
#include <docstyle.hxx>
#include <doc.hxx>
#include <pagedesc.hxx>
#include <shellio.hxx>
-#ifndef _PVIEW_HXX
#include <pview.hxx>
-#endif
-#ifndef _SRCVIEW_HXX
#include <srcview.hxx>
-#endif
#include <poolfmt.hxx>
#include <usrpref.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
#include <unotxdoc.hxx>
#include <acmplwrd.hxx>
#include <swmodule.hxx>
-#include <unoobj.hxx>
+#include <unobaseclass.hxx>
#include <swwait.hxx>
#include <swcli.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <globals.h>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#ifndef _APP_HRC
#include <app.hrc>
#endif
@@ -152,7 +120,7 @@
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include <SwStyleNameMapper.hxx>
#include <sfx2/fcontnr.hxx>
@@ -180,8 +148,6 @@ SfxDocumentInfoDialog* SwDocShell::CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &rSet)
{
SfxDocumentInfoDialog* pDlg = new SfxDocumentInfoDialog(pParent, rSet);
-// const SfxDocumentInfoItem& rItem = (const SfxDocumentInfoItem&)rSet.Get(SID_DOCINFO);
-// if(rItem.IsOwnFormat())
//nur mit Statistik, wenn dieses Doc auch angezeigt wird, nicht
//aus dem Doc-Manager
SwDocShell* pDocSh = (SwDocShell*) SfxObjectShell::Current();
@@ -1134,7 +1100,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
xRef( pClipCntnr );
pClipCntnr->CopyAnyData( FORMAT_RTF, (sal_Char*)
- pStrm->GetData(), pStrm->GetSize() );
+ pStrm->GetData(), pStrm->GetEndOfData() );
pClipCntnr->CopyToClipboard(
GetView()? (Window*)&GetView()->GetEditWin() : 0 );
delete pStrm;
diff --git a/sw/source/ui/app/docshdrw.cxx b/sw/source/ui/app/docshdrw.cxx
index 25c9f5113d6f..cd6d2aee296d 100644
--- a/sw/source/ui/app/docshdrw.cxx
+++ b/sw/source/ui/app/docshdrw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docshdrw.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,7 +42,7 @@
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svx/drawitem.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdoutl.hxx>
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 630d836c785b..8ed82a935a4d 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docshini.cxx,v $
- * $Revision: 1.67 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,60 +31,43 @@
#include <hintids.hxx>
-#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
-#endif
#include <i18npool/mslangid.hxx>
#include <sot/storinfo.hxx>
#include <sot/storage.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <svtools/ctrltool.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <sfx2/docfile.hxx>
-#ifndef _OFA_MISCCFG_HXX //autogen
-#include <svtools/misccfg.hxx>
-#endif
#include <sfx2/printer.hxx>
#include <sfx2/bindings.hxx>
-#include <svx/asiancfg.hxx>
-#include <svx/unolingu.hxx>
+#include <svl/asiancfg.hxx>
+#include <editeng/unolingu.hxx>
#include <sfx2/request.hxx>
-#include <svtools/intitem.hxx>
-#include <svx/adjitem.hxx>
-#ifndef _SVX_AKRNTEM_HXX
-#include <svx/akrnitem.hxx>
-#endif
+#include <svl/intitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/akrnitem.hxx>
#include <linguistic/lngprops.hxx>
#include <com/sun/star/document/UpdateDocMode.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <rtl/logfile.hxx>
#include <sfx2/docfilt.hxx>
#include <svx/xtable.hxx>
-#ifndef _SVX_DRAWITEM_HXX //autogen
-
#include <svx/drawitem.hxx>
-#endif
-#include <svx/fhgtitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/flstitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
-#include <svx/tstpitem.hxx>
-#endif
-#include <svx/langitem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/hyznitem.hxx>
-#include <svx/svxacorr.hxx>
-
+#include <editeng/fhgtitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/flstitem.hxx>
+#include <editeng/tstpitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/hyznitem.hxx>
+#include <editeng/svxacorr.hxx>
#include <vcl/svapp.hxx>
#include <view.hxx>
#include <prtopt.hxx>
#include <fmtcol.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
#include <swmodule.hxx>
#include <doc.hxx>
#include <docfac.hxx>
@@ -95,18 +75,12 @@
#include <shellio.hxx>
#include <tox.hxx>
#include <swdtflvr.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <usrpref.hxx>
#include <fontcfg.hxx>
#include <poolfmt.hxx>
-#ifndef _MODCFG_HXX
#include <modcfg.hxx>
-#endif
-#ifndef _GLOBDOC_HXX
#include <globdoc.hxx>
-#endif
#include <ndole.hxx>
#include <mdiexp.hxx>
#include <unotxdoc.hxx>
@@ -114,10 +88,7 @@
#include <swwait.hxx>
#include <wrtsh.hxx>
#include <swerror.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-
// #i18732#
#include <fmtfollowtextflow.hxx>
@@ -655,7 +626,7 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
pDoc->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( !this, "ohne Sw3Reader geht nichts" );
#endif
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index cd98bb0cb554..0cf03f803ad3 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docst.cxx,v $
- * $Revision: 1.36.136.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,23 +33,24 @@
#include <hintids.hxx>
#include <sfx2/app.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <sfx2/templdlg.hxx>
#include <sfx2/tplpitem.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/newstyle.hxx>
-#include <svtools/macitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/languageoptions.hxx>
-#include <svx/eeitem.hxx>
+#include <sfx2/printer.hxx>
+#include <svl/macitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/languageoptions.hxx>
+#include <editeng/eeitem.hxx>
#include <svx/htmlmode.hxx>
#include <swmodule.hxx>
#include <wdocsh.hxx>
#include <fmtfsize.hxx>
#include <fchrfmt.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <SwStyleNameMapper.hxx>
#include <undobj.hxx>
#include <swundo.hxx>
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 7841176d47e1..b0b81c5df6e4 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docstyle.cxx,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,23 +30,21 @@
#define _SVSTDARR_USHORTS
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/syslocale.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/numitem.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/eitem.hxx>
+#include <unotools/syslocale.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/numitem.hxx>
// --> OD 2008-02-13 #newlistlevelattrs#
-#include <svx/lrspitem.hxx>
+#include <editeng/lrspitem.hxx>
// <--
#include <fmtcol.hxx>
#include <uitool.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <errhdl.hxx>
#include <frmfmt.hxx>
#include <charfmt.hxx>
@@ -59,21 +54,18 @@
#include <docary.hxx>
#include <ccoll.hxx>
#include <doc.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <swstyle.h>
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
#include <paratr.hxx>
#include <SwStyleNameMapper.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/intlwrapper.hxx>
#include <numrule.hxx>
#include <fmthdft.hxx>
+#include <svx/svxids.hrc>
// --> OD 2008-02-12 #newlistlevelattrs#
#include <SwRewriter.hxx>
#include <undobj.hxx>
diff --git a/sw/source/ui/app/error.src b/sw/source/ui/app/error.src
index b1a47121a0b1..30b9bc7c0e35 100644
--- a/sw/source/ui/app/error.src
+++ b/sw/source/ui/app/error.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: error.src,v $
- * $Revision: 1.53 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx
index 815269e82044..e6085a4a8662 100644
--- a/sw/source/ui/app/mainwn.cxx
+++ b/sw/source/ui/app/mainwn.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mainwn.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <tools/shl.hxx>
#include <tools/string.hxx>
#ifndef _SVARRAY_HXX
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <sfx2/progress.hxx>
#ifndef _RESID_HXX //autogen
diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk
index d3a4cd242d30..943f1004eb74 100644
--- a/sw/source/ui/app/makefile.mk
+++ b/sw/source/ui/app/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.21 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index c58eaa369fc0..81dad77566b2 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mn.src,v $
- * $Revision: 1.53.118.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -1065,12 +1062,6 @@ Menu MN_PPREVIEW_POPUPMENU
HelpID = FN_PRINT_PAGEPREVIEW ;
Text [ en-US ] = "Print" ;
};
- MenuItem
- {
- Identifier = FN_PREVIEW_PRINT_OPTIONS;
- HelpID = FN_PREVIEW_PRINT_OPTIONS;
- Text [ en-US ] = "Print Options";
- };
SEPARATOR ;
MenuItem
{
diff --git a/sw/source/ui/app/swdll.cxx b/sw/source/ui/app/swdll.cxx
index 57f983a3852d..71409e4dedf3 100644
--- a/sw/source/ui/app/swdll.cxx
+++ b/sw/source/ui/app/swdll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdll.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,7 +48,7 @@
#include <dobjfac.hxx>
#include <cfgid.h>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#ifndef _FM_FMOBJFAC_HXX
#include <svx/fmobjfac.hxx>
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 863ef3c22f76..97c34c573756 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swmodul1.cxx,v $
- * $Revision: 1.45 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,19 +33,19 @@
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/childwin.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <cppuhelper/weak.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <cppuhelper/implbase1.hxx> // helper for implementations
#include <svx/dataaccessdescriptor.hxx>
-#include <svx/wghtitem.hxx>
-#include <svx/postitem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/crsditem.hxx>
-#include <svx/cmapitem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/crsditem.hxx>
+#include <editeng/cmapitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/brshitem.hxx>
#include <vcl/msgbox.hxx>
#include <swmodule.hxx>
#include <swtypes.hxx>
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index c84273770667..a72d935f3796 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swmodule.cxx,v $
- * $Revision: 1.67 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -153,8 +150,8 @@
// OD 14.02.2003 #107424#
#include <svtools/colorcfg.hxx>
-#include <svx/acorrcfg.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <unotools/moduleoptions.hxx>
#ifndef _AVMEDIA_MEDIAPPLAYER_HXX
#include <avmedia/mediaplayer.hxx>
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index 5ab9258025e8..0345cd8a6806 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swwait.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index dfb2ef0ae4e6..967505a5f96d 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: actctrl.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk
index 24600e5415ad..c724f287fc3a 100644
--- a/sw/source/ui/cctrl/makefile.mk
+++ b/sw/source/ui/cctrl/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx
index a77a64b25bc8..9b99a41b3e64 100644
--- a/sw/source/ui/cctrl/popbox.cxx
+++ b/sw/source/ui/cctrl/popbox.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: popbox.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 4569ed542c90..a6a50a01f851 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swlbox.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index d2d07d81e368..cc1f208950dc 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: break.cxx,v $
- * $Revision: 1.16.224.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <sfx2/request.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
diff --git a/sw/source/ui/chrdlg/break.hrc b/sw/source/ui/chrdlg/break.hrc
index 00a14a9999d5..7667a4a9f3b6 100644
--- a/sw/source/ui/chrdlg/break.hrc
+++ b/sw/source/ui/chrdlg/break.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: break.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index 25276c2cc4bc..44b144d28f4b 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ccoll.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -209,11 +206,7 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
const String& SwCondCollItem::GetStyle(USHORT nPos) const
{
-#ifndef IRIX
return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr;
-#else
- return nPos < COND_COMMAND_COUNT ? (String)sStyles[nPos] : aEmptyStr;
-#endif
}
/****************************************************************************
@@ -224,11 +217,7 @@ const String& SwCondCollItem::GetStyle(USHORT nPos) const
void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos)
{
if( nPos < COND_COMMAND_COUNT )
-#ifndef IRIX
sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
-#else
- sStyles[nPos] = pStyle ? (String)*pStyle : aEmptyStr;
-#endif
}
diff --git a/sw/source/ui/chrdlg/ccoll.hrc b/sw/source/ui/chrdlg/ccoll.hrc
index c7bf7825fa8c..f3d21092273a 100644
--- a/sw/source/ui/chrdlg/ccoll.hrc
+++ b/sw/source/ui/chrdlg/ccoll.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ccoll.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src
index 4eb70601c3a0..eab997761d8d 100644
--- a/sw/source/ui/chrdlg/ccoll.src
+++ b/sw/source/ui/chrdlg/ccoll.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ccoll.src,v $
- * $Revision: 1.44 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 2aff6e0cf4d1..fdf633a45b8a 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chardlg.cxx,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,11 +38,11 @@
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svtools/urihelper.hxx>
-#include <svtools/stritem.hxx>
-#include <svx/flstitem.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/stritem.hxx>
+#include <editeng/flstitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#ifndef _CMDID_H
#include <cmdid.h>
diff --git a/sw/source/ui/chrdlg/chardlg.hrc b/sw/source/ui/chrdlg/chardlg.hrc
index 039165d12129..48a661bfebec 100644
--- a/sw/source/ui/chrdlg/chardlg.hrc
+++ b/sw/source/ui/chrdlg/chardlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chardlg.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/chardlg.src b/sw/source/ui/chrdlg/chardlg.src
index dd39894ba014..8340b4f60669 100644
--- a/sw/source/ui/chrdlg/chardlg.src
+++ b/sw/source/ui/chrdlg/chardlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chardlg.src,v $
- * $Revision: 1.52 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/chrdlg.src b/sw/source/ui/chrdlg/chrdlg.src
index c8ea03325925..297668f6093a 100644
--- a/sw/source/ui/chrdlg/chrdlg.src
+++ b/sw/source/ui/chrdlg/chrdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chrdlg.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index cc4d15664cf7..8caf959195dd 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drpcps.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,7 +36,7 @@
#include <hintids.hxx>
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGSISORTDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include "cmdid.h"
#include "swmodule.hxx"
@@ -51,24 +48,24 @@
#ifndef _METRIC_HXX //autogen
#include <vcl/metric.hxx>
#endif
-#include <svtools/stritem.hxx>
-#include <svx/fontitem.hxx>
+#include <svl/stritem.hxx>
+#include <editeng/fontitem.hxx>
#include <svx/htmlmode.hxx>
#include <sfx2/objsh.hxx>
-#include <svx/svxfont.hxx>
+#include <editeng/svxfont.hxx>
#include <vcl/print.hxx>
#include <sfx2/printer.hxx>
#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
#endif
-#include <svx/scripttypeitem.hxx>
+#include <editeng/scripttypeitem.hxx>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <comphelper/processfactory.hxx>
#define _SVSTDARR_XUB_STRLEN
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include "charatr.hxx"
#include "viewopt.hxx"
diff --git a/sw/source/ui/chrdlg/drpcps.hrc b/sw/source/ui/chrdlg/drpcps.hrc
index ffeb93565401..d1b432edbba7 100644
--- a/sw/source/ui/chrdlg/drpcps.hrc
+++ b/sw/source/ui/chrdlg/drpcps.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drpcps.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/drpcps.src b/sw/source/ui/chrdlg/drpcps.src
index 1c5967575faa..af8a0d920375 100644
--- a/sw/source/ui/chrdlg/drpcps.src
+++ b/sw/source/ui/chrdlg/drpcps.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drpcps.src,v $
- * $Revision: 1.39 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk
index 4213461f4115..42aad1aeddf1 100644
--- a/sw/source/ui/chrdlg/makefile.mk
+++ b/sw/source/ui/chrdlg/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 26f146e628f0..f80130f475e9 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numpara.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,9 +44,9 @@
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
#endif
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/intitem.hxx>
#include <fmtline.hxx>
#include <numpara.hxx>
#include <numpara.hrc>
diff --git a/sw/source/ui/chrdlg/numpara.hrc b/sw/source/ui/chrdlg/numpara.hrc
index 97dcb5707e12..536dc8d935dd 100644
--- a/sw/source/ui/chrdlg/numpara.hrc
+++ b/sw/source/ui/chrdlg/numpara.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numpara.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src
index e83487d1cc64..2c384d5dc7a8 100644
--- a/sw/source/ui/chrdlg/numpara.src
+++ b/sw/source/ui/chrdlg/numpara.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numpara.src,v $
- * $Revision: 1.41 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/paradlg.hrc b/sw/source/ui/chrdlg/paradlg.hrc
index 41469edbf9fe..e8e48dfaa956 100644
--- a/sw/source/ui/chrdlg/paradlg.hrc
+++ b/sw/source/ui/chrdlg/paradlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: paradlg.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/paradlg.src b/sw/source/ui/chrdlg/paradlg.src
index 54fb712cb22f..1384e4ae8fa3 100644
--- a/sw/source/ui/chrdlg/paradlg.src
+++ b/sw/source/ui/chrdlg/paradlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: paradlg.src,v $
- * $Revision: 1.36 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index e095c7b79085..0976c7fbf5aa 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pardlg.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,15 +35,15 @@
#include "hintids.hxx"
#include <svx/htmlmode.hxx>
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#ifndef _SVSTDARR_STRINGSSORTDTOR
#define _SVSTDARR_STRINGSSORTDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include "docsh.hxx"
#include "wrtsh.hxx"
#include "frmatr.hxx"
@@ -62,8 +59,8 @@
#include "chrdlg.hrc"
#include "poolfmt.hrc"
#include <svx/svxids.hrc>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include <svx/flagsdef.hxx>
diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src
index 2347dd315bbd..8c6cee69d440 100644
--- a/sw/source/ui/chrdlg/swbreak.src
+++ b/sw/source/ui/chrdlg/swbreak.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swbreak.src,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 80dc79e1d301..a9d90a4c02e4 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuiccoll.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx
index 1024c8a6bff6..263cb9703ef5 100644
--- a/sw/source/ui/chrdlg/tblnumfm.cxx
+++ b/sw/source/ui/chrdlg/tblnumfm.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tblnumfm.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,7 +48,7 @@
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <sfx2/tabdlg.hxx>
SwNumFmtDlg::SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet)
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx
index 4859c59499e3..5fb403da58ce 100644
--- a/sw/source/ui/config/barcfg.cxx
+++ b/sw/source/ui/config/barcfg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: barcfg.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -151,3 +148,5 @@ void SwToolbarConfigItem::Commit()
PutProperties(aNames, aValues);
}
+void SwToolbarConfigItem::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx
index c93346689ae5..d60361e49453 100644
--- a/sw/source/ui/config/caption.cxx
+++ b/sw/source/ui/config/caption.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: caption.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index 1ca465678def..3a462ce452b2 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cfgitems.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,7 +36,7 @@
#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
#endif
-#include <svx/svxenum.hxx>
+#include <editeng/svxenum.hxx>
#include "viewopt.hxx"
@@ -407,7 +404,7 @@ void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const
rVOpt.SetShdwCrsrFillMode( eMode );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
diff --git a/sw/source/ui/config/config.hrc b/sw/source/ui/config/config.hrc
index c3ba68fe7c6e..197e6482d7a1 100644
--- a/sw/source/ui/config/config.hrc
+++ b/sw/source/ui/config/config.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: config.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/dbconfig.cxx b/sw/source/ui/config/dbconfig.cxx
index 52a06b389643..ade5163a5921 100644
--- a/sw/source/ui/config/dbconfig.cxx
+++ b/sw/source/ui/config/dbconfig.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbconfig.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -140,5 +137,7 @@ const SwDBData& SwDBConfig::GetBibliographySource()
return *pBibImpl;
}
+void SwDBConfig::Commit() {}
+void SwDBConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index 34ffa8f215b9..e1b951c1c879 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fontcfg.cxx,v $
- * $Revision: 1.24.224.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#include <fontcfg.hxx>
#include <i18npool/mslangid.hxx>
#include <vcl/outdev.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
@@ -358,3 +355,5 @@ sal_Int32 SwStdFontConfig::GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType
return nRet;
}
+void SwStdFontConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 00219b8d9cdf..5fa03de5e0a5 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailconfigpage.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/mailconfigpage.hrc b/sw/source/ui/config/mailconfigpage.hrc
index 27a53ae0bb6b..a7115878ccf5 100644
--- a/sw/source/ui/config/mailconfigpage.hrc
+++ b/sw/source/ui/config/mailconfigpage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailconfigpage.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src
index d244be5474c1..1ad1378222c0 100644
--- a/sw/source/ui/config/mailconfigpage.src
+++ b/sw/source/ui/config/mailconfigpage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailconfigpage.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk
index 02ed4d075995..4b8ed01ca90e 100644
--- a/sw/source/ui/config/makefile.mk
+++ b/sw/source/ui/config/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.15 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index dab5e97cc2e8..ec0e47393eb2 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: modcfg.cxx,v $
- * $Revision: 1.32 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,11 +33,11 @@
#include <sot/clsids.hxx>
#include <tools/stream.hxx>
#include <vcl/svapp.hxx>
-#include <goodies/mailenum.hxx>
+#include <svl/mailenum.hxx>
#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
#endif
-#include <svx/svxenum.hxx>
+#include <editeng/svxenum.hxx>
#include <tools/debug.hxx>
#include <tools/globname.hxx>
@@ -50,7 +47,7 @@
#include <modcfg.hxx>
#endif
#include <fldupde.hxx>
-#include <svtools/syslocaleoptions.hxx>
+#include <unotools/syslocaleoptions.hxx>
#include <caption.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -336,6 +333,8 @@ sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
return nRet;
}
//-----------------------------------------------------------------------------
+void SwRevisionConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwRevisionConfig::Commit()
{
const Sequence<OUString>& aNames = GetPropertyNames();
@@ -691,6 +690,8 @@ void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nProp, sal_
}
}
//-----------------------------------------------------------------------------
+void SwInsertConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwInsertConfig::Commit()
{
const Sequence<OUString>& aNames = GetPropertyNames();
@@ -1207,6 +1208,8 @@ SwTableConfig::~SwTableConfig()
/*-- 10.10.00 16:22:56---------------------------------------------------
-----------------------------------------------------------------------*/
+void SwTableConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwTableConfig::Commit()
{
const Sequence<OUString>& aNames = GetPropertyNames();
@@ -1318,6 +1321,8 @@ const Sequence<OUString>& SwMiscConfig::GetPropertyNames()
/*-- 18.01.01 17:02:47---------------------------------------------------
-----------------------------------------------------------------------*/
+void SwMiscConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwMiscConfig::Commit()
{
const Sequence<OUString>& aNames = GetPropertyNames();
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 51608929475a..49c073103501 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optcomp.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/optcomp.hrc b/sw/source/ui/config/optcomp.hrc
index 5fbee8042fff..4219724a9106 100644
--- a/sw/source/ui/config/optcomp.hrc
+++ b/sw/source/ui/config/optcomp.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optcomp.hrc,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src
index dd62af25bd24..927eadc183a1 100644
--- a/sw/source/ui/config/optcomp.src
+++ b/sw/source/ui/config/optcomp.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optcomp.src,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 2ada884e48c7..4162b656d7e5 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optdlg.hrc,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -96,13 +93,13 @@
#define CB_CHAR_HIDDEN 61
// Print-Extra-Page
#define CB_PGRF 61
-#define CB_PTAB 62
-#define CB_PDRAW 63
+//#define CB_PTAB 62 merged with CB_PGRF in printerpullpages
+//#define CB_PDRAW 63 removed in printerpullpages
#define CB_LEFTP 64
#define CB_RIGHTP 65
-#define CB_REVERSE 66
+//#define CB_REVERSE 66 removed in printerpullpages
#define CB_PROSPECT 67
-#define CB_SINGLEJOBS 68
+//#define CB_SINGLEJOBS 68 removed in printerpullpages
#define CB_CTRLFLD 69
#define CB_PAPERFROMSETUP 70
#define FL_1 71
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index 41ba789789ff..a2b9b4af8a9e 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optdlg.src,v $
- * $Revision: 1.106 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -215,60 +212,66 @@ TabPage TP_OPTPRINT_PAGE
Text [ en-US ] = "Contents" ;
Group = TRUE ;
};
- CheckBox CB_PGRF
+ CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "~Graphics" ;
+ Text [ en-US ] = "~Pictures and objects" ;
TabStop = TRUE ;
Group = TRUE ;
};
+/*
+ removed, tables now always get printed
CheckBox CB_PTAB
{
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Tables" ;
};
+*/
+/*
+ functionally merged with CB_PGRF (pictures and graphics)
CheckBox CB_PDRAW
{
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Dra~wings" ;
};
+*/
CheckBox CB_CTRLFLD
{
- Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Control~s" ;
+ Text [ en-US ] = "Form control~s" ;
};
CheckBox CB_BACKGROUND
{
- Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Ba~ckground" ;
+ Text [ en-US ] = "Page ba~ckground" ;
};
CheckBox CB_BLACK_FONT
{
- Pos = MAP_APPFONT ( 12 , 79 ) ;
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Print blac~k" ;
+ Text [ en-US ] = "Print text in blac~k" ;
};
CheckBox CB_HIDDEN_TEXT
{
- Pos = MAP_APPFONT ( 12 , 92 ) ;
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Hidden te~xt" ;
};
CheckBox CB_TEXT_PLACEHOLDER
{
- Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Pos = MAP_APPFONT ( 12 , 79 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Text ~placeholder" ;
};
FixedLine FL_SEP_PRT_LEFT
{
Pos = MAP_APPFONT ( 85 , 14 ) ;
- Size = MAP_APPFONT ( 4 , 104 ) ;
+ Size = MAP_APPFONT ( 4 , 78 ) ;
Vert = TRUE;
};
FixedLine FL_2
@@ -292,21 +295,24 @@ TabPage TP_OPTPRINT_PAGE
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Right pages" ;
};
+/*
+ removed, noe handled by the new print dialog (i.e. vcl) itself
CheckBox CB_REVERSE
{
Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Re~versed" ;
};
+*/
CheckBox CB_PROSPECT
{
- Pos = MAP_APPFONT ( 96 , 53 ) ;
+ Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Broch~ure" ;
};
CheckBox CB_PROSPECT_RTL
{
- Pos = MAP_APPFONT ( 103 , 66 ) ;
+ Pos = MAP_APPFONT ( 103 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Right to Left" ;
Text [ x-comment ] = " ";
@@ -340,7 +346,7 @@ TabPage TP_OPTPRINT_PAGE
FixedLine FL_SEP_PRT_RIGHT
{
Pos = MAP_APPFONT ( 169 , 14 ) ;
- Size = MAP_APPFONT ( 4 , 104 ) ;
+ Size = MAP_APPFONT ( 4 , 78 ) ;
Vert = TRUE;
};
FixedLine FL_3
@@ -352,35 +358,37 @@ TabPage TP_OPTPRINT_PAGE
};
FixedLine FL_4
{
- Pos = MAP_APPFONT ( 6 , 121 ) ;
+ Pos = MAP_APPFONT ( 6 , 95 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Group = TRUE ;
Text [ en-US ] = "Other";
};
CheckBox CB_PRINTEMPTYPAGES
{
- Pos = MAP_APPFONT ( 12 , 132 ) ;
+ Pos = MAP_APPFONT ( 12 , 106 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Print ~automatically inserted blank pages";
};
+/*
CheckBox CB_SINGLEJOBS
{
- Pos = MAP_APPFONT ( 12 , 145 ) ;
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Create s~ingle print jobs" ;
};
+*/
CheckBox CB_PAPERFROMSETUP
{
- Pos = MAP_APPFONT ( 12 , 158 ) ;
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Paper tray from printer settings";
};
FixedText FT_FAX
{
- Pos = MAP_APPFONT ( 12 , 173 ) ;
+ Pos = MAP_APPFONT ( 12 , 134 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Group = TRUE ;
Text [ en-US ] = "~Fax";
@@ -388,7 +396,7 @@ TabPage TP_OPTPRINT_PAGE
ListBox LB_FAX
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 70 , 171 ) ;
+ Pos = MAP_APPFONT ( 70 , 132 ) ;
Size = MAP_APPFONT ( 184 , 70 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
@@ -935,3 +943,55 @@ TabPage TP_OPTSHDWCRSR
};
};
+
+StringArray STR_PRINTOPTUI
+{
+ ItemList [en-US] =
+ {
+ < "%PRODUCTNAME %s"; >;
+ < "Contents"; >;
+ < "Page ba~ckground"; >;
+ < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >;
+ < "~Pictures and objects"; >;
+ < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >;
+ < "Hidden te~xt"; >;
+ < "Enable this option to print text that is marked as hidden."; >;
+ < "~Text placeholder"; >;
+ < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >;
+ < "Form control~s"; >;
+ < "Specifies whether the form control fields of the text document are printed"; >;
+ < "Color"; >;
+ < "Print text in blac~k"; >;
+ < "Specifies whether to always print text in black."; >;
+ < "Pages"; >;
+ < "Print ~automatically inserted blank pages"; >;
+ < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >;
+ < "~Use only paper tray from printer preferences"; >;
+ < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >;
+ < "Print"; >;
+ < "None (document only)"; >;
+ < "Comments only"; >;
+ < "Place at end of document"; >;
+ < "Place at end of page"; >;
+ < "Specify where to print comments (if any)."; >;
+ < "~Comments"; >;
+ < "Page sides";>;
+ < "All pages"; >;
+ < "Back sides / left pages"; >;
+ < "Front sides / right pages"; >;
+ < "Specify which pages to include in the output"; >;
+ < "Include"; >;
+ < "Broch~ure"; >;
+ < "Select the Brochure option to print the document in brochure format."; >;
+ < "Left-to-right script"; >;
+ < "Right-to-left script"; >;
+ < "Ranges and copies"; >;
+ < "~All pages"; >;
+ < "Print the whole document."; >;
+ < "Pa~ges"; >;
+ < "Print a range of pages of the document."; >;
+ < "~Selection"; >;
+ < "Print only the selected parts of the document"; >;
+ };
+};
+
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 70db2cdf008b..4a0c9c2a6b25 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optload.cxx,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -76,7 +73,7 @@
#include <SwNodeNum.hxx>
#include <doc.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
using namespace ::com::sun::star;
diff --git a/sw/source/ui/config/optload.hrc b/sw/source/ui/config/optload.hrc
index bebcb3ef19bd..b396b2d9f9f0 100644
--- a/sw/source/ui/config/optload.hrc
+++ b/sw/source/ui/config/optload.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optload.hrc,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src
index 95840f2658c7..febd2a6fc35f 100644
--- a/sw/source/ui/config/optload.src
+++ b/sw/source/ui/config/optload.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optload.src,v $
- * $Revision: 1.78 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 114a57215d10..97930582ce5a 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optpage.cxx,v $
- * $Revision: 1.61 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,18 +39,18 @@
#include <vcl/svapp.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include <svtools/ctrltool.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svx/htmlmode.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/bindings.hxx>
#include <svx/xtable.hxx>
-#include <svx/fhgtitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/dlgutil.hxx>
#include <fmtcol.hxx>
#include <charatr.hxx>
@@ -97,10 +94,10 @@
#include <optdlg.hrc>
#endif
#include <svx/strarray.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include <sfx2/request.hxx>
#include <swwrtshitem.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/ctloptions.hxx>
#include <unomid.h>
@@ -350,8 +347,8 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
SfxTabPage( pParent, SW_RES( TP_OPTPRINT_PAGE ), rCoreSet),
aFL1 (this, SW_RES(FL_1)),
aGrfCB (this, SW_RES(CB_PGRF)),
- aTabCB (this, SW_RES(CB_PTAB)),
- aDrawCB (this, SW_RES(CB_PDRAW)),
+// aTabCB (this, SW_RES(CB_PTAB)),
+// aDrawCB (this, SW_RES(CB_PDRAW)),
aCtrlFldCB (this, SW_RES(CB_CTRLFLD)),
aBackgroundCB (this, SW_RES(CB_BACKGROUND)),
aBlackFontCB (this, SW_RES(CB_BLACK_FONT)),
@@ -361,7 +358,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFL2 (this, SW_RES(FL_2)),
aLeftPageCB (this, SW_RES(CB_LEFTP)),
aRightPageCB (this, SW_RES(CB_RIGHTP)),
- aReverseCB (this, SW_RES(CB_REVERSE)),
+// aReverseCB (this, SW_RES(CB_REVERSE)),
aProspectCB (this, SW_RES(CB_PROSPECT)),
aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)),
aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)),
@@ -372,7 +369,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFL3 (this, SW_RES(FL_3)),
aFL4 (this, SW_RES(FL_4)),
aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
- aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
+// aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)),
aFaxFT (this, SW_RES(FT_FAX)),
aFaxLB (this, SW_RES(LB_FAX)),
@@ -386,14 +383,14 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aGrfCB.SetClickHdl( aLk );
aRightPageCB.SetClickHdl( aLk );
aLeftPageCB.SetClickHdl( aLk );
- aTabCB.SetClickHdl( aLk );
- aDrawCB.SetClickHdl( aLk );
+// aTabCB.SetClickHdl( aLk );
+// aDrawCB.SetClickHdl( aLk );
aCtrlFldCB.SetClickHdl( aLk );
aBackgroundCB.SetClickHdl( aLk );
aBlackFontCB.SetClickHdl( aLk );
aPrintHiddenTextCB.SetClickHdl( aLk );
aPrintTextPlaceholderCB.SetClickHdl( aLk );
- aReverseCB.SetClickHdl( aLk );
+// aReverseCB.SetClickHdl( aLk );
aProspectCB.SetClickHdl( aLk );
aProspectCB_RTL.SetClickHdl( aLk );
aPaperFromSetupCB.SetClickHdl( aLk );
@@ -402,27 +399,40 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aEndRB.SetClickHdl( aLk );
aOnlyRB.SetClickHdl( aLk );
aNoRB.SetClickHdl( aLk );
- aSingleJobsCB.SetClickHdl( aLk );
+// aSingleJobsCB.SetClickHdl( aLk );
aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
- aDrawCB .Hide();
+// aDrawCB .Hide();
aLeftPageCB .Hide();
aRightPageCB .Hide();
aPrintHiddenTextCB.Hide();
aPrintTextPlaceholderCB.Hide();
- Point rPt(aReverseCB .GetPosPixel());
- rPt.setX(rPt.getX() + 15); // indent
- aProspectCB_RTL.SetPosPixel(rPt);
- aReverseCB.SetPosPixel(aLeftPageCB .GetPosPixel());
- aProspectCB.SetPosPixel(aRightPageCB .GetPosPixel());
- aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
- aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
- aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
- aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
+// aReverseCB.SetPosPixel(aLeftPageCB.GetPosPixel());
+ aProspectCB.SetPosPixel(aLeftPageCB.GetPosPixel());
+ Point aPt( aRightPageCB.GetPosPixel() );
+ aPt.setX(aPt.getX() + 15); // indent
+ aProspectCB_RTL.SetPosPixel(aPt);
+// aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
+// aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
+// aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
+// aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
+
+ // hide aPrintEmptyPagesCB and move everything below up accordingly
+ long nDeltaY = aPaperFromSetupCB.GetPosPixel().getY() - aPrintEmptyPagesCB.GetPosPixel().getY();
+ aPrintEmptyPagesCB.Hide();
+ aPt = aPaperFromSetupCB.GetPosPixel();
+ aPt.setY( aPt.getY() - nDeltaY );
+ aPaperFromSetupCB.SetPosPixel( aPt );
+ aPt = aFaxFT.GetPosPixel();
+ aPt.setY( aPt.getY() - nDeltaY );
+ aFaxFT.SetPosPixel( aPt );
+ aPt = aFaxLB.GetPosPixel();
+ aPt.setY( aPt.getY() - nDeltaY );
+ aFaxLB.SetPosPixel( aPt );
}
aProspectCB_RTL.Disable();
SvtCTLOptions aCTLOptions;
@@ -465,22 +475,22 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked();
- aAddPrinterAttr.bPrintTable = aTabCB.IsChecked();
- aAddPrinterAttr.bPrintDraw = aDrawCB.IsChecked();
+ aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
+ aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/;
aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked();
aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked();
aAddPrinterAttr.bPrintBlackFont = aBlackFontCB.IsChecked();
aAddPrinterAttr.bPrintHiddenText = aPrintHiddenTextCB.IsChecked();
aAddPrinterAttr.bPrintTextPlaceholder = aPrintTextPlaceholderCB.IsChecked();
- aAddPrinterAttr.bPrintLeftPage = aLeftPageCB.IsChecked();
- aAddPrinterAttr.bPrintRightPage = aRightPageCB.IsChecked();
- aAddPrinterAttr.bPrintReverse = aReverseCB.IsChecked();
- aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
- aAddPrinterAttr.bPrintProspect_RTL = aProspectCB_RTL.IsChecked();
- aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
- aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
- aAddPrinterAttr.bPrintSingleJobs = aSingleJobsCB.IsChecked();
+ aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked();
+ aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked();
+ aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
+ aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked();
+ aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
+ aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
+ aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
POSTITS_NONE;
@@ -508,22 +518,22 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE,
(const SfxPoolItem**)&pAddPrinterAttr ))
{
- aGrfCB.Check( pAddPrinterAttr->bPrintGraphic);
- aTabCB.Check( pAddPrinterAttr->bPrintTable);
- aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
+ aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
+// aTabCB.Check( pAddPrinterAttr->bPrintTable);
+// aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
aCtrlFldCB.Check( pAddPrinterAttr->bPrintControl);
aBackgroundCB.Check( pAddPrinterAttr->bPrintPageBackground);
aBlackFontCB.Check( pAddPrinterAttr->bPrintBlackFont);
aPrintHiddenTextCB.Check( pAddPrinterAttr->bPrintHiddenText);
aPrintTextPlaceholderCB.Check(pAddPrinterAttr->bPrintTextPlaceholder);
- aLeftPageCB.Check( pAddPrinterAttr->bPrintLeftPage);
- aRightPageCB.Check( pAddPrinterAttr->bPrintRightPage);
- aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
+ aLeftPageCB.Check( pAddPrinterAttr->bPrintLeftPages);
+ aRightPageCB.Check( pAddPrinterAttr->bPrintRightPages);
+// aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
aPaperFromSetupCB.Check(pAddPrinterAttr->bPaperFromSetup);
aPrintEmptyPagesCB.Check(pAddPrinterAttr->bPrintEmptyPages);
aProspectCB.Check( pAddPrinterAttr->bPrintProspect);
- aProspectCB_RTL.Check( pAddPrinterAttr->bPrintProspect_RTL);
- aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
+ aProspectCB_RTL.Check( pAddPrinterAttr->bPrintProspectRTL);
+// aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
aNoRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_NONE ) ;
aOnlyRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ONLY ) ;
@@ -2445,7 +2455,7 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin)
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*******************************************************
******************************************************/
/*----------------- OS 11.01.95 -----------------------
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index 41a118614b95..a07c2c154696 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: prtopt.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -69,8 +66,8 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames()
"Page/LeftPage", // 13 not in SW/Web
"Page/RightPage", // 14 not in SW/Web
"EmptyPages", // 15 not in SW/Web
- "Content/PrintPlaceholders", // 16 not in Sw/Web
- "Content/PrintHiddenText" // 17
+ "Content/PrintPlaceholders", // 16 not in Sw/Web
+ "Content/PrintHiddenText" // 17 not in Sw/Web
};
const int nCount = bIsWeb ? 12 : 18;
Sequence<OUString> aNames(nCount);
@@ -92,6 +89,8 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
bPrintPageBackground = !bWeb;
bPrintBlackFont = bWeb;
bPrintTextPlaceholder = bPrintHiddenText = sal_False;
+ if (bWeb)
+ bPrintEmptyPages = sal_False;
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
@@ -119,13 +118,13 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
break;
case 6: bPrintReverse = *(sal_Bool*)pValues[nProp].getValue(); break;
case 7: bPrintProspect = *(sal_Bool*)pValues[nProp].getValue(); break;
- case 8: bPrintProspect_RTL = *(sal_Bool*)pValues[nProp].getValue(); break;
+ case 8: bPrintProspectRTL = *(sal_Bool*)pValues[nProp].getValue(); break;
case 9: bPrintSingleJobs = *(sal_Bool*)pValues[nProp].getValue(); break;
case 10: pValues[nProp] >>= sFaxName; break;
case 11: bPaperFromSetup = *(sal_Bool*)pValues[nProp].getValue(); break;
case 12: bPrintDraw = *(sal_Bool*)pValues[nProp].getValue() ; break;
- case 13: bPrintLeftPage = *(sal_Bool*)pValues[nProp].getValue(); break;
- case 14: bPrintRightPage = *(sal_Bool*)pValues[nProp].getValue(); break;
+ case 13: bPrintLeftPages = *(sal_Bool*)pValues[nProp].getValue(); break;
+ case 14: bPrintRightPages = *(sal_Bool*)pValues[nProp].getValue(); break;
case 15: bPrintEmptyPages = *(sal_Bool*)pValues[nProp].getValue(); break;
case 16: bPrintTextPlaceholder = *(sal_Bool*)pValues[nProp].getValue(); break;
case 17: bPrintHiddenText = *(sal_Bool*)pValues[nProp].getValue(); break;
@@ -133,6 +132,12 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
}
}
}
+
+ // currently there is just one checkbox for print drawings and print graphics
+ // In the UI. (File/Print dialog and Tools/Options/.../Print)
+ // And since print graphics is the only available in Writer and WrtierWeb ...
+
+ bPrintDraw = bPrintGraphic;
}
/* -----------------------------06.09.00 16:50--------------------------------
@@ -143,6 +148,9 @@ SwPrintOptions::~SwPrintOptions()
/* -----------------------------06.09.00 16:43--------------------------------
---------------------------------------------------------------------------*/
+
+void SwPrintOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwPrintOptions::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -164,18 +172,24 @@ void SwPrintOptions::Commit()
case 5: pValues[nProp] <<= (sal_Int32)nPrintPostIts ; break;
case 6: bVal = bPrintReverse ; pValues[nProp].setValue(&bVal, rType); break;
case 7: bVal = bPrintProspect ; pValues[nProp].setValue(&bVal, rType); break;
- case 8: bVal = bPrintProspect_RTL ; pValues[nProp].setValue(&bVal, rType); break;
+ case 8: bVal = bPrintProspectRTL ; pValues[nProp].setValue(&bVal, rType); break;
case 9: bVal = bPrintSingleJobs ; pValues[nProp].setValue(&bVal, rType); break;
case 10: pValues[nProp] <<= sFaxName; break;
case 11: bVal = bPaperFromSetup ; pValues[nProp].setValue(&bVal, rType); break;
case 12: bVal = bPrintDraw ; pValues[nProp].setValue(&bVal, rType); break;
- case 13: bVal = bPrintLeftPage ; pValues[nProp].setValue(&bVal, rType); break;
- case 14: bVal = bPrintRightPage ; pValues[nProp].setValue(&bVal, rType); break;
+ case 13: bVal = bPrintLeftPages ; pValues[nProp].setValue(&bVal, rType); break;
+ case 14: bVal = bPrintRightPages ; pValues[nProp].setValue(&bVal, rType); break;
case 15: bVal = bPrintEmptyPages ; pValues[nProp].setValue(&bVal, rType); break;
case 16: bVal = bPrintTextPlaceholder; pValues[nProp].setValue(&bVal, rType); break;
case 17: bVal = bPrintHiddenText; pValues[nProp].setValue(&bVal, rType); break;
}
}
+
+ // currently there is just one checkbox for print drawings and print graphics
+ // In the UI. (File/Print dialog and Tools/Options/.../Print)
+ // And since print graphics is the only available in Writer and WrtierWeb ...
+ bPrintDraw = bPrintGraphic;
+
PutProperties(aNames, aValues);
}
diff --git a/sw/source/ui/config/redlopt.hrc b/sw/source/ui/config/redlopt.hrc
index 1c92e997fe41..877f23d75c4c 100644
--- a/sw/source/ui/config/redlopt.hrc
+++ b/sw/source/ui/config/redlopt.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: redlopt.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/redlopt.src b/sw/source/ui/config/redlopt.src
index c4ba0a833ee4..4d6816dcec23 100644
--- a/sw/source/ui/config/redlopt.src
+++ b/sw/source/ui/config/redlopt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: redlopt.src,v $
- * $Revision: 1.53 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index bfe68b3d6b3a..40d56b3b6507 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uinums.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,14 +32,14 @@
#include <hintids.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/pathoptions.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/pathoptions.hxx>
#include <tools/stream.hxx>
#ifndef _SFX_INIMGR_HXX
#endif
#include <sfx2/docfile.hxx>
-#include <svtools/itemiter.hxx>
-#include <svx/brshitem.hxx>
+#include <svl/itemiter.hxx>
+#include <editeng/brshitem.hxx>
#include <tools/resid.hxx>
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index 1170f3506b31..85d3886fc79f 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: usrpref.cxx,v $
- * $Revision: 1.39 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <tools/stream.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include "swtypes.hxx"
#include "hintids.hxx"
@@ -427,6 +424,9 @@ void SwLayoutViewConfig::Load()
}
}
}
+
+void SwLayoutViewConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
/* -----------------------------19.01.01 13:07--------------------------------
---------------------------------------------------------------------------*/
@@ -531,6 +531,8 @@ void SwGridConfig::Load()
}
}
+void SwGridConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
/* -----------------------------19.01.01 13:07--------------------------------
---------------------------------------------------------------------------*/
@@ -621,6 +623,9 @@ void SwCursorConfig::Load()
}
}
+
+void SwCursorConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
/*-- 28.09.00 09:55:33---------------------------------------------------
-----------------------------------------------------------------------*/
@@ -654,6 +659,9 @@ void SwWebColorConfig::Commit()
}
PutProperties(aPropNames, aValues);
}
+
+void SwWebColorConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
/*-- 28.09.00 09:55:34---------------------------------------------------
-----------------------------------------------------------------------*/
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 661a73f312ad..73e5d69d7764 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewopt.cxx,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,13 +30,13 @@
#include <svx/htmlmode.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
#endif
-#include <svx/svxenum.hxx>
-#include <svx/svxacorr.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/svxacorr.hxx>
#include <unotools/localedatawrapper.hxx>
#ifndef _REGION_HXX //autogen
#include <vcl/region.hxx>
@@ -58,11 +55,11 @@
#include <crstate.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/accessibilityoptions.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading
#endif
Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY);
@@ -115,7 +112,7 @@ BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
&& bFormView == rOpt.IsFormView()
&& mbViewLayoutBookMode == rOpt.mbViewLayoutBookMode
&& bShowPlaceHolderFields == rOpt.bShowPlaceHolderFields
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
&& bTest1 == rOpt.IsTest1()
&& bTest2 == rOpt.IsTest2()
@@ -246,7 +243,7 @@ SwViewOption::SwViewOption() :
bSelectionInReadonly = SW_MOD()->GetAccessibilityOptions().IsSelectionInReadonly();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
bTest1 = bTest2 = bTest3 = bTest4 =
bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = FALSE;
@@ -281,7 +278,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bTest1 = rVOpt.bTest1 ;
bTest2 = rVOpt.bTest2 ;
bTest3 = rVOpt.bTest3 ;
@@ -321,7 +318,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bTest1 = rVOpt.bTest1 ;
bTest2 = rVOpt.bTest2 ;
bTest3 = rVOpt.bTest3 ;
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 91248fa1e422..6797a2cedf0e 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: addresslistdialog.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -67,8 +64,8 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <swunohelper.hxx>
#include <vcl/waitobj.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/urihelper.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/urihelper.hxx>
#include <addresslistdialog.hrc>
#include <dbui.hrc>
diff --git a/sw/source/ui/dbui/addresslistdialog.hrc b/sw/source/ui/dbui/addresslistdialog.hrc
index 39d1c8809de1..821ddd81b4f0 100644
--- a/sw/source/ui/dbui/addresslistdialog.hrc
+++ b/sw/source/ui/dbui/addresslistdialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: addresslistdialog.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index 1b3c86ce0823..0623df315d39 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: addresslistdialog.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/addresslistdialog.src b/sw/source/ui/dbui/addresslistdialog.src
index 94e179da17ae..38a82e65ea76 100644
--- a/sw/source/ui/dbui/addresslistdialog.src
+++ b/sw/source/ui/dbui/addresslistdialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: addresslistdialog.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 3f7484932010..6c13fee26b9c 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: createaddresslistdialog.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,7 +39,7 @@
#ifndef _SVT_CONTROLDIMS_HRC_
#include <svtools/controldims.hrc>
#endif
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hrc b/sw/source/ui/dbui/createaddresslistdialog.hrc
index 163b67bc6588..d843acbcf63f 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hrc
+++ b/sw/source/ui/dbui/createaddresslistdialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: createaddresslistdialog.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx
index 51197b03952e..b900d7d21ff6 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: createaddresslistdialog.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src
index 7e10679f02af..b43a373cd047 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.src
+++ b/sw/source/ui/dbui/createaddresslistdialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: createaddresslistdialog.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index dd4258f7bae8..f5191fe0fe55 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: customizeaddresslistdialog.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hrc b/sw/source/ui/dbui/customizeaddresslistdialog.hrc
index b190ee1e5e82..8e04f81a07b3 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.hrc
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: customizeaddresslistdialog.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
index a2e0ce35ae17..42298a463cbf 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: customizeaddresslistdialog.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src
index 7f0f74788198..21e32ecb89c4 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.src
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: customizeaddresslistdialog.src,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index cb815a93f1a6..97455d9e2514 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbinsdlg.cxx,v $
- * $Revision: 1.63 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -63,22 +60,22 @@
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <comphelper/processfactory.hxx>
-#include <svx/langitem.hxx>
-#include <svtools/numuno.hxx>
-#include <svtools/stritem.hxx>
+#include <editeng/langitem.hxx>
+#include <svl/numuno.hxx>
+#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#ifndef __SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
#endif
-#include <svtools/style.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/style.hxx>
+#include <svl/zformat.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <sfx2/app.hxx>
-#include <svtools/itemset.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/boxitem.hxx>
+#include <svl/itemset.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/boxitem.hxx>
#include <svx/rulritem.hxx>
#include <swdbtoolsclient.hxx>
#ifndef _SWTABLEREP_HXX //autogen
@@ -1651,6 +1648,8 @@ static rtl::OUString lcl_CreateUniqueName(const Sequence<rtl::OUString>& aNames)
/* -----------------------------05.12.00 15:00--------------------------------
---------------------------------------------------------------------------*/
+void SwInsertDBColAutoPilot::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwInsertDBColAutoPilot::Commit()
{
Sequence <rtl::OUString> aNames = GetNodeNames(rtl::OUString());
diff --git a/sw/source/ui/dbui/dbinsdlg.hrc b/sw/source/ui/dbui/dbinsdlg.hrc
index b1ea954a2974..fd2bdcf3d776 100644
--- a/sw/source/ui/dbui/dbinsdlg.hrc
+++ b/sw/source/ui/dbui/dbinsdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbinsdlg.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbinsdlg.src b/sw/source/ui/dbui/dbinsdlg.src
index 5b0cc5074756..28e045a3a235 100644
--- a/sw/source/ui/dbui/dbinsdlg.src
+++ b/sw/source/ui/dbui/dbinsdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbinsdlg.src,v $
- * $Revision: 1.48 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 603af1c31111..f449ad816c3e 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbmgr.cxx,v $
- * $Revision: 1.132.44.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -63,21 +60,21 @@
#include <pagedesc.hxx>
#include <vcl/lstbox.hxx>
#include <unotools/tempfile.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/urihelper.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/urihelper.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
-#include <sfx2/printer.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/progress.hxx>
#include <sfx2/dispatch.hxx>
-#include <goodies/mailenum.hxx>
+#include <svl/mailenum.hxx>
#include <cmdid.h>
#include <swmodule.hxx>
#include <view.hxx>
@@ -116,11 +113,11 @@
#include <comphelper/property.hxx>
#include <mailmergehelper.hxx>
#include <maildispatcher.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <i18npool/mslangid.hxx>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
-#include <svx/langitem.hxx>
-#include <svtools/numuno.hxx>
+#include <editeng/langitem.hxx>
+#include <svl/numuno.hxx>
#include <unomailmerge.hxx>
#include <sfx2/event.hxx>
@@ -454,80 +451,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
bRet = Merge(&rMergeDesc.rSh); // Mischen
break;
- case DBMGR_MERGE_MAILMERGE: // Serienbrief
- {
- SwView& rView = rMergeDesc.rSh.GetView();
- SfxDispatcher *pDis = rView.GetViewFrame()->GetDispatcher();
- SfxItemSet aPrintArgs( rView.GetPool(),
- SID_SILENT, SID_SILENT, //5528
- SID_ASYNCHRON, SID_ASYNCHRON, //5811
- SID_PRINT_FIRST_PAGE, SID_PRINT_FIRST_PAGE, // 5001
- SID_PRINT_LAST_PAGE, SID_PRINT_LAST_PAGE, // 5002
- SID_PRINT_COPIES, SID_PRINT_COPIES, // 5003
- SID_PRINTER_NAME, SID_PRINTER_NAME, //5322
- SID_SELECTION, SID_SELECTION, //5346
- SID_FILE_NAME, SID_FILE_NAME, // 5507
- SID_PRINT_PAGES, SID_PRINT_PAGES, //6589
- SID_PRINT_COLLATE, SID_PRINT_COLLATE, //6590
- FN_QRY_MERGE, FN_QRY_MERGE,
- 0 );
- aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) );
-
- // !! Currently (Jan-2003) silent is defined by supplying *any*
- // !! item!! (Thus according to OS it would be silent even when
- // !! other items then SID_SILENT would be supplied!)
- // !! Therefore it has to be the 0 pointer when not silent.
- if(IsMergeSilent())
- {
- aPrintArgs.Put( SfxBoolItem(SID_SILENT, TRUE) );
- // #i25686# printing should be done asynchronously to prevent dangling offices
- // when mail merge is called as command line macro
- // #i52629# aynchronous printing should only be done in silent mode - otherwise
- // the printer dialog does not come up
- aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDesc.bPrintAsync ));
- }
- // convert PropertyValues
- const beans::PropertyValue* pPrintOptions = rMergeDesc.aPrintOptions.getConstArray();
- for( sal_Int32 nOption = 0; nOption < rMergeDesc.aPrintOptions.getLength(); ++nOption)
- {
- if( pPrintOptions[nOption].Name.equalsAscii( "CopyCount" ))
- {
- sal_Int16 nCopies = 0;
- if((pPrintOptions[nOption].Value >>= nCopies) && nCopies > 0)
- aPrintArgs.Put( SfxInt16Item( SID_PRINT_COPIES, nCopies ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "FileName" ))
- {
- ::rtl::OUString sFileName;
- if( (pPrintOptions[nOption].Value >>= sFileName) && sFileName.getLength() > 0)
- aPrintArgs.Put( SfxStringItem( SID_FILE_NAME, sFileName ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "Collate" ))
- {
- sal_Bool bCollate = sal_False;
- if( pPrintOptions[nOption].Value >>= bCollate )
- aPrintArgs.Put( SfxBoolItem( SID_PRINT_COLLATE, bCollate ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "Pages" ))
- {
- ::rtl::OUString sPages;
- if( (pPrintOptions[nOption].Value >>= sPages) && sPages.getLength() )
- aPrintArgs.Put( SfxStringItem( SID_PRINT_PAGES, sPages ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "Wait" ))
- {
- sal_Bool bWait = sal_False;
- if( pPrintOptions[nOption].Value >>= bWait )
- aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, !bWait ));
- }
-
- }
- pDis->Execute( SID_PRINTDOC,
- SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
- aPrintArgs );
- }
- break;
-
+ case DBMGR_MERGE_MAILMERGE: // printing merge from 'old' merge dialog or from UNO-component
case DBMGR_MERGE_MAILING:
case DBMGR_MERGE_MAILFILES:
case DBMGR_MERGE_SINGLE_FILE:
@@ -853,323 +777,6 @@ SwNewDBMgr::~SwNewDBMgr()
}
delete pImpl;
}
-/*--------------------------------------------------------------------
- Beschreibung: Serienbrief drucken
- --------------------------------------------------------------------*/
-
-
-BOOL SwNewDBMgr::MergePrint( SwView& rView,
- SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI )
-{
- SwWrtShell* pSh = &rView.GetWrtShell();
- //check if the doc is synchronized and contains at least one linked section
- BOOL bSynchronizedDoc = pSh->IsLabelDoc() && pSh->GetSectionFmtCount() > 1;
- //merge source is already open
- rOpt.nMergeCnt = 0;
- //#i56195# no field update while printing mail merge documents
- rOpt.bUpdateFieldsInPrinting = sal_False;
- if(pImpl->pMergeData)
- {
- if(pImpl->pMergeData->aSelection.getLength())
- rOpt.nMergeCnt = pImpl->pMergeData->aSelection.getLength();
- else if(pImpl->pMergeData->xResultSet.is())
- {
- sal_Int32 nCount;
- if( lcl_getCountFromResultSet( nCount, pImpl->pMergeData->xResultSet ) )
- rOpt.nMergeCnt = (ULONG)nCount;
- }
- }
-
- SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- pModOpt->SetSinglePrintJob(rOpt.IsPrintSingleJobs());
-
- SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false );
- Link aSfxSaveLnk = pPrt->GetEndPrintHdl();
- if( rOpt.IsPrintSingleJobs() )
- pPrt->SetEndPrintHdl( Link() );
-
- BOOL bUserBreak = FALSE,
- bRet = FALSE;
- long nStartRow, nEndRow;
- //calculate number of data sets to be printed
-
- Sequence<PropertyValue> aViewProperties(16);
- PropertyValue* pViewProperties = aViewProperties.getArray();
- pViewProperties[0].Name = C2U("MailMergeCount");
- pViewProperties[0].Value <<= (sal_Int32)rOpt.nMergeCnt;
- pViewProperties[1].Name = C2U("PrintGraphics");
- pViewProperties[1].Value <<= (sal_Bool)rOpt.IsPrintGraphic();
- pViewProperties[2].Name = C2U("PrintTables");
- pViewProperties[2].Value <<= (sal_Bool)rOpt.IsPrintTable();
- pViewProperties[3].Name = C2U("PrintDrawings");
- pViewProperties[3].Value <<= (sal_Bool)rOpt.IsPrintDraw();
- pViewProperties[4].Name = C2U("PrintLeftPages");
- pViewProperties[4].Value <<= (sal_Bool)rOpt.IsPrintLeftPage();
- pViewProperties[5].Name = C2U("PrintRightPages");
- pViewProperties[5].Value <<= (sal_Bool)rOpt.IsPrintRightPage();
- pViewProperties[6].Name = C2U("PrintControls");
- pViewProperties[6].Value <<= (sal_Bool)rOpt.IsPrintControl();
- pViewProperties[7].Name = C2U("PrintReversed");
- pViewProperties[7].Value <<= (sal_Bool)rOpt.IsPrintReverse();
- pViewProperties[8].Name = C2U("PrintPaperFromSetup");
- pViewProperties[8].Value <<= (sal_Bool)rOpt.IsPaperFromSetup();
- pViewProperties[9].Name = C2U("PrintFaxName");
- pViewProperties[9].Value <<= rOpt.GetFaxName();
- pViewProperties[10].Name = C2U("PrintAnnotationMode");
- pViewProperties[10].Value <<= (text::NotePrintMode) rOpt.GetPrintPostIts();
- pViewProperties[11].Name = C2U("PrintProspect");
- pViewProperties[11].Value <<= (sal_Bool)rOpt.IsPrintProspect();
- pViewProperties[12].Name = C2U("PrintPageBackground");
- pViewProperties[12].Value <<= (sal_Bool)rOpt.IsPrintPageBackground();
- pViewProperties[13].Name = C2U("PrintBlackFonts");
- pViewProperties[13].Value <<= (sal_Bool)rOpt.IsPrintBlackFont();
- pViewProperties[14].Name = C2U("IsSinglePrintJob");
- pViewProperties[14].Value <<= (sal_Bool)rOpt.IsPrintSingleJobs();
- pViewProperties[15].Name = C2U("PrintEmptyPages");
- pViewProperties[15].Value <<= (sal_Bool)rOpt.IsPrintEmptyPages();
-
- rView.SetAdditionalPrintOptions(aViewProperties);
- do {
- nStartRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0;
- {
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE), pSh->GetView().GetViewFrame()->GetObjectShell()));
- pSh->ViewShell::UpdateFlds();
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE_FINISHED), pSh->GetView().GetViewFrame()->GetObjectShell()));
- ++rOpt.nMergeAct;
-
- // launch MailMergeEvent if required
- const SwXMailMerge *pEvtSrc = GetMailMergeEvtSrc();
- if (pEvtSrc)
- {
- uno::Reference< XInterface > xRef( (XMailMergeBroadcaster *) pEvtSrc );
- text::MailMergeEvent aEvt( xRef, rView.GetDocShell()->GetModel() );
- pEvtSrc->LaunchMailMergeEvent( aEvt );
- }
-
- rView.SfxViewShell::Print( rProgress, bIsAPI ); // ggf Basic-Macro ausfuehren
- if( rOpt.IsPrintSingleJobs() && bRet )
- {
- //rOpt.bJobStartet = FALSE;
- bRet = FALSE;
- }
-
- bMergeLock = TRUE;
- if(rOpt.IsPrintProspect())
- {
- if( ! pPrt->IsJobActive() )
- {
- pPrt->SetJobValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
- String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
- pPrt->StartJob( rOpt.GetJobName() );
- }
- if( pPrt->IsJobActive() )
- {
- pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() );
- bRet = TRUE;
- }
- }
- else if( pSh->Prt( rOpt, &rProgress ) )
- bRet = TRUE;
- bMergeLock = FALSE;
-
- if( !pPrt->IsJobActive() )
- {
- bUserBreak = TRUE;
- bRet = FALSE;
- break;
- }
- if( !rOpt.IsPrintSingleJobs() )
- {
- String& rJNm = (String&)rOpt.GetJobName();
- rJNm.Erase();
- }
- }
- nEndRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0;
- } while( bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord());
-
- if( rOpt.IsPrintSingleJobs() )
- {
- SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true );
- pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk );
- if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet?
- aSfxSaveLnk.Call( pTmpPrinter );
- }
-
- rOpt.nMergeCnt = 0;
- rOpt.nMergeAct = 0;
-
- nMergeType = DBMGR_INSERT;
-
- SwDocShell* pDocSh = rView.GetDocShell();
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(pDocSh);
-
- while (pTmpFrm) // Alle Views Invalidieren
- {
- SwView *pVw = PTR_CAST(SwView, pTmpFrm->GetViewShell());
- if (pVw)
- pVw->GetEditWin().Invalidate();
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, pDocSh);
- }
-
- return bRet;
-}
-/*-- 21.06.2004 09:08:16---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView,
- SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI )
-{
- SwWrtShell* pSh = &rView.GetWrtShell();
- //check if the doc is synchronized and contains at least one linked section
- //merge source is already open
- rOpt.nMergeCnt = 0;
- rOpt.SetPrintSingleJobs( sal_True );
-
- SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false );
- Link aSfxSaveLnk = pPrt->GetEndPrintHdl();
- if( rOpt.IsPrintSingleJobs() )
- pPrt->SetEndPrintHdl( Link() );
-
- BOOL bUserBreak = FALSE,
- bRet = FALSE;
- //calculate number of data sets to be printed
-
- Sequence<PropertyValue> aViewProperties(16);
- PropertyValue* pViewProperties = aViewProperties.getArray();
- pViewProperties[0].Name = C2U("MailMergeCount");
- pViewProperties[0].Value <<= (sal_Int32)rOpt.nMergeCnt;
- pViewProperties[1].Name = C2U("PrintGraphics");
- pViewProperties[1].Value <<= (sal_Bool)rOpt.IsPrintGraphic();
- pViewProperties[2].Name = C2U("PrintTables");
- pViewProperties[2].Value <<= (sal_Bool)rOpt.IsPrintTable();
- pViewProperties[3].Name = C2U("PrintDrawings");
- pViewProperties[3].Value <<= (sal_Bool)rOpt.IsPrintDraw();
- pViewProperties[4].Name = C2U("PrintLeftPages");
- pViewProperties[4].Value <<= (sal_Bool)rOpt.IsPrintLeftPage();
- pViewProperties[5].Name = C2U("PrintRightPages");
- pViewProperties[5].Value <<= (sal_Bool)rOpt.IsPrintRightPage();
- pViewProperties[6].Name = C2U("PrintControls");
- pViewProperties[6].Value <<= (sal_Bool)rOpt.IsPrintControl();
- pViewProperties[7].Name = C2U("PrintReversed");
- pViewProperties[7].Value <<= (sal_Bool)rOpt.IsPrintReverse();
- pViewProperties[8].Name = C2U("PrintPaperFromSetup");
- pViewProperties[8].Value <<= (sal_Bool)rOpt.IsPaperFromSetup();
- pViewProperties[9].Name = C2U("PrintFaxName");
- pViewProperties[9].Value <<= rOpt.GetFaxName();
- pViewProperties[10].Name = C2U("PrintAnnotationMode");
- pViewProperties[10].Value <<= (text::NotePrintMode) rOpt.GetPrintPostIts();
- pViewProperties[11].Name = C2U("PrintProspect");
- pViewProperties[11].Value <<= (sal_Bool)rOpt.IsPrintProspect();
- pViewProperties[12].Name = C2U("PrintPageBackground");
- pViewProperties[12].Value <<= (sal_Bool)rOpt.IsPrintPageBackground();
- pViewProperties[13].Name = C2U("PrintBlackFonts");
- pViewProperties[13].Value <<= (sal_Bool)rOpt.IsPrintBlackFont();
- pViewProperties[14].Name = C2U("IsSinglePrintJob");
- pViewProperties[14].Value <<= (sal_Bool)rOpt.IsPrintSingleJobs();
- pViewProperties[15].Name = C2U("PrintEmptyPages");
- pViewProperties[15].Value <<= (sal_Bool)rOpt.IsPrintEmptyPages();
-
- rView.SetAdditionalPrintOptions(aViewProperties);
-
- SwMailMergeConfigItem* pConfigItem = rView.GetMailMergeConfigItem();
- DBG_ASSERT(pConfigItem, "mail merge config item is missing");
- if(!pConfigItem)
- return sal_False;
-
- USHORT nDocStart = pConfigItem->GetPrintRangeStart();
- USHORT nDocEnd = pConfigItem->GetPrintRangeEnd();
- DBG_ASSERT(nDocStart < nDocEnd && nDocEnd <= pConfigItem->GetMergedDocumentCount(),
- "merge print settings are not correct");
-
- for( sal_uInt32 nPrintDocument = nDocStart; nPrintDocument < nDocEnd; ++nPrintDocument)
- {
- SwDocMergeInfo& rDocInfo = pConfigItem->GetDocumentMergeInfo(nPrintDocument);
- rOpt.aMulti.SelectAll(FALSE);
- rOpt.aMulti.Select(Range( rDocInfo.nStartPageInTarget, rDocInfo.nEndPageInTarget ), TRUE );
-
- ++rOpt.nMergeAct;
-
- // launch MailMergeEvent if required
- const SwXMailMerge *pEvtSrc = GetMailMergeEvtSrc();
- if (pEvtSrc)
- {
- uno::Reference< XInterface > xRef( (XMailMergeBroadcaster *) pEvtSrc );
- text::MailMergeEvent aEvt( xRef, rView.GetDocShell()->GetModel() );
- pEvtSrc->LaunchMailMergeEvent( aEvt );
- }
-
- String aTmp;
- aTmp += String::CreateFromInt32( rDocInfo.nStartPageInTarget );
- aTmp += '-';
- aTmp += String::CreateFromInt32( rDocInfo.nEndPageInTarget );
-
- Sequence<PropertyValue> aAddViewProperties(1);
- PropertyValue* pAddViewProperties = aAddViewProperties.getArray();
- pAddViewProperties[0].Name = C2U("Pages");
- pAddViewProperties[0].Value <<= ::rtl::OUString( aTmp );
- rView.SetAdditionalPrintOptions(aAddViewProperties);
-
- rView.SfxViewShell::Print( rProgress, bIsAPI ); // ggf Basic-Macro ausfuehren
- if( rOpt.IsPrintSingleJobs() && bRet )
- {
- //rOpt.bJobStartet = FALSE;
- bRet = FALSE;
- }
-
- bMergeLock = TRUE;
- if(rOpt.IsPrintProspect())
- {
- if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() ))
- {
- pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() );
- bRet = TRUE;
- }
- }
- else if( pSh->Prt( rOpt, &rProgress ) )
- bRet = TRUE;
- bMergeLock = FALSE;
-
- if( !pPrt->IsJobActive() )
- {
- bUserBreak = TRUE;
- bRet = FALSE;
- break;
- }
- if( !rOpt.IsPrintSingleJobs() )
- {
- String& rJNm = (String&)rOpt.GetJobName();
- rJNm.Erase();
- }
- }
-
- if( rOpt.IsPrintSingleJobs() )
- {
- SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true );
- pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk );
- if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet?
- aSfxSaveLnk.Call( pTmpPrinter );
- }
-
- rOpt.nMergeCnt = 0;
- rOpt.nMergeAct = 0;
-
- nMergeType = DBMGR_INSERT;
-
- SwDocShell* pDocSh = rView.GetDocShell();
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(pDocSh);
-
- while (pTmpFrm) // Alle Views Invalidieren
- {
- SwView *pVw = PTR_CAST(SwView, pTmpFrm->GetViewShell());
- if (pVw)
- pVw->GetEditWin().Invalidate();
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, pDocSh);
- }
-
- return bRet;
-}
-
-
/*--------------------------------------------------------------------
Beschreibung: Serienbriefe als einzelne Dokumente speichern
@@ -1317,6 +924,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
// in case of creating a single resulting file this has to be created here
SwWrtShell* pTargetShell = 0;
SfxObjectShellRef xTargetDocShell;
+ SwView* pTargetView = 0;
std::auto_ptr< utl::TempFile > aTempFile;
String sModifiedStartingPageDesc;
String sStartingPageDesc;
@@ -1329,7 +937,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
xTargetDocShell->DoInitNew( 0 );
SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE );
- SwView* pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() );
+ pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() );
//initiate SelectShell() to create sub shells
pTargetView->AttrChangedNotify( &pTargetView->GetWrtShell() );
@@ -1650,27 +1258,83 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
// save the single output document
if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile)
{
- DBG_ASSERT( aTempFile.get(), "Temporary file not available" );
- INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
- SfxMedium* pDstMed = new SfxMedium(
- aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
- STREAM_STD_READWRITE, TRUE );
- pDstMed->SetFilter( pStoreToFilter );
- if(pDstMed->GetItemSet())
+ if( rMergeDescriptor.nMergeType != DBMGR_MERGE_MAILMERGE )
{
- if(pStoreToFilterOptions )
- pDstMed->GetItemSet()->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, *pStoreToFilterOptions));
- if(rMergeDescriptor.aSaveToFilterData.getLength())
- pDstMed->GetItemSet()->Put(SfxUsrAnyItem(SID_FILTER_DATA, makeAny(rMergeDescriptor.aSaveToFilterData)));
- }
+ DBG_ASSERT( aTempFile.get(), "Temporary file not available" );
+ INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
+ SfxMedium* pDstMed = new SfxMedium(
+ aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
+ STREAM_STD_READWRITE, TRUE );
+ pDstMed->SetFilter( pStoreToFilter );
+ if(pDstMed->GetItemSet())
+ {
+ if(pStoreToFilterOptions )
+ pDstMed->GetItemSet()->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, *pStoreToFilterOptions));
+ if(rMergeDescriptor.aSaveToFilterData.getLength())
+ pDstMed->GetItemSet()->Put(SfxUsrAnyItem(SID_FILTER_DATA, makeAny(rMergeDescriptor.aSaveToFilterData)));
+ }
- xTargetDocShell->DoSaveAs(*pDstMed);
- xTargetDocShell->DoSaveCompleted(pDstMed);
- if( xTargetDocShell->GetError() )
+ xTargetDocShell->DoSaveAs(*pDstMed);
+ xTargetDocShell->DoSaveCompleted(pDstMed);
+ if( xTargetDocShell->GetError() )
+ {
+ // error message ??
+ ErrorHandler::HandleError( xTargetDocShell->GetError() );
+ bLoop = FALSE;
+ }
+ }
+ else if( pTargetView ) // must be available!
{
- // error message ??
- ErrorHandler::HandleError( xTargetDocShell->GetError() );
- bLoop = FALSE;
+ //print the target document
+ #if OSL_DEBUG_LEVEL > 1
+ sal_Bool _bVal;
+ sal_Int16 _nVal;
+ rtl::OUString _sVal;
+ const beans::PropertyValue* pDbgPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray();
+ for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption)
+ {
+ rtl::OUString aName( pDbgPrintOptions[nOption].Name );
+ uno::Any aVal( pDbgPrintOptions[nOption].Value );
+ aVal >>= _bVal;
+ aVal >>= _nVal;
+ aVal >>= _sVal;
+ }
+ #endif
+ // printing should be done synchronously otherwise the document
+ // might already become invalid during the process
+ uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions );
+ const sal_Int32 nOpts = aOptions.getLength();
+ aOptions.realloc( nOpts + 1 );
+ aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" );
+ aOptions[ nOpts ].Value <<= sal_True ;
+// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) );
+// // #i52629# aynchronous printing should only be done in silent mode - otherwise
+// // the printer dialog does not come up
+// aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync ));
+ // move print options
+ const beans::PropertyValue* pPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray();
+ for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption)
+ {
+ if( pPrintOptions[nOption].Name.equalsAscii( "CopyCount" )
+ ||( pPrintOptions[nOption].Name.equalsAscii( "FileName" ))
+ ||( pPrintOptions[nOption].Name.equalsAscii( "Collate" ))
+ ||( pPrintOptions[nOption].Name.equalsAscii( "Pages" ))
+ ||( pPrintOptions[nOption].Name.equalsAscii( "Wait" )))
+ {
+ aOptions.realloc( nOpts + 1 );
+ aOptions[ nOpts ].Name = pPrintOptions[nOption].Name;
+ aOptions[ nOpts ].Value = pPrintOptions[nOption].Value ;
+ }
+ }
+
+// const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig();
+// if (pModOpt->IsSinglePrintJob())
+// {
+// }
+// else
+// {
+ pTargetView->ExecPrint( aOptions, IsMergeSilent(), rMergeDescriptor.bPrintAsync );
+// }
}
xTargetDocShell->DoClose();
}
@@ -2902,6 +2566,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
SwMergeDescriptor aMergeDesc( pImpl->pMergeDialog->GetMergeType(), pView->GetWrtShell(), aDescriptor );
aMergeDesc.sSaveToFilter = pImpl->pMergeDialog->GetSaveFilter();
+ aMergeDesc.bCreateSingleFile= true;
MergeNew(aMergeDesc);
pWorkDoc->SetNewDBMgr( pWorkDBMgr );
@@ -3255,8 +2920,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pWorkDoc->EmbedAllLinks();
if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds())
rWorkShell.Undo();
- // #i69485# lock fields to prevent access to the result set while calculating layout
- rWorkShell.LockExpFlds();
+ // #i69485# lock fields to prevent access to the result set while calculating layout
+ rWorkShell.LockExpFlds();
// create a layout
rWorkShell.CalcLayout();
rWorkShell.UnlockExpFlds();
@@ -3298,7 +2963,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
if(nDocNo == 1 || bPageStylesWithHeaderFooter)
{
- pTargetView->GetDocShell()->_LoadStyles( *pWorkView->GetDocShell(), sal_True );
+ pTargetView->GetDocShell()->_LoadStyles( *rSourceView.GetDocShell(), sal_True );
}
if(nDocNo > 1)
{
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index f539f8e8b8d6..463e64279e08 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbtablepreviewdialog.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hrc b/sw/source/ui/dbui/dbtablepreviewdialog.hrc
index 86719db70191..645cbe92ab74 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hrc
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbtablepreviewdialog.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
index 8ded61d4aa74..212bb873ca4b 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbtablepreviewdialog.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.src b/sw/source/ui/dbui/dbtablepreviewdialog.src
index 41df437a15cb..a52290db80fb 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.src
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbtablepreviewdialog.src,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index e284096f8f8a..1e0a1faf1cbc 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbtree.cxx,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx
index 5590a46c1674..9dc0c899f574 100644
--- a/sw/source/ui/dbui/dbui.cxx
+++ b/sw/source/ui/dbui/dbui.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbui.cxx,v $
- * $Revision: 1.7.136.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src
index cf6929437b3f..aa84a1b1f997 100644
--- a/sw/source/ui/dbui/dbui.src
+++ b/sw/source/ui/dbui/dbui.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbui.src,v $
- * $Revision: 1.34.66.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/maildispatcher.cxx b/sw/source/ui/dbui/maildispatcher.cxx
index e49c5c68fccb..2203f70c3404 100644
--- a/sw/source/ui/dbui/maildispatcher.cxx
+++ b/sw/source/ui/dbui/maildispatcher.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: maildispatcher.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -110,8 +107,7 @@ namespace /* private */
MailDispatcher::MailDispatcher(uno::Reference<mail::XSmtpService> mailserver) :
mailserver_ (mailserver),
run_(false),
- shutdown_requested_(false),
- bIsInRun(false)
+ shutdown_requested_(false)
{
wakening_call_.reset();
mail_dispatcher_active_.reset();
@@ -206,12 +202,6 @@ bool MailDispatcher::isStarted() const
return run_;
}
-bool MailDispatcher::isRunning() const
-{
- return bIsInRun;
-}
-
-
void MailDispatcher::addListener(::rtl::Reference<IMailDispatcherListener> listener)
{
OSL_PRECOND(!shutdown_requested_, "MailDispatcher thread is shuting down already");
@@ -267,7 +257,6 @@ void MailDispatcher::run()
// signal that the mail dispatcher thread is now alive
mail_dispatcher_active_.set();
- bIsInRun = true;
for(;;)
{
wakening_call_.wait();
@@ -295,7 +284,6 @@ void MailDispatcher::run()
std::for_each(listeners_cloned.begin(), listeners_cloned.end(), GenericEventNotifier(&IMailDispatcherListener::idle, this));
}
} // end for SSH ALI
- bIsInRun = false;
}
/*-- 27.08.2004 12:04:46---------------------------------------------------
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index d70dea638297..758f52840230 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergechildwindow.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mailmergechildwindow.hrc b/sw/source/ui/dbui/mailmergechildwindow.hrc
index ae83766c83ef..9b5931522975 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.hrc
+++ b/sw/source/ui/dbui/mailmergechildwindow.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergechildwindow.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src
index 6d9f0bc49272..3caf5b1a7607 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.src
+++ b/sw/source/ui/dbui/mailmergechildwindow.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergechildwindow.src,v $
- * $Revision: 1.11.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 0423137cc3c3..7cc5d4070891 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergehelper.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 84dba4d979e6..e4903ba83134 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergewizard.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mailmergewizard.hrc b/sw/source/ui/dbui/mailmergewizard.hrc
index 14106184ef13..f6b00013b2fe 100644
--- a/sw/source/ui/dbui/mailmergewizard.hrc
+++ b/sw/source/ui/dbui/mailmergewizard.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergewizard.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mailmergewizard.src b/sw/source/ui/dbui/mailmergewizard.src
index 220c31f029da..d3da4d7c9945 100644
--- a/sw/source/ui/dbui/mailmergewizard.src
+++ b/sw/source/ui/dbui/mailmergewizard.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergewizard.src,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/makefile.mk b/sw/source/ui/dbui/makefile.mk
index 40d6807c2ead..c2477b02ca4a 100644
--- a/sw/source/ui/dbui/makefile.mk
+++ b/sw/source/ui/dbui/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.14 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index a15460737de5..b2d8c790c25d 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmaddressblockpage.cxx,v $
- * $Revision: 1.25 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hrc b/sw/source/ui/dbui/mmaddressblockpage.hrc
index 1b46cfd95f10..8dbae66b94e6 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hrc
+++ b/sw/source/ui/dbui/mmaddressblockpage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmaddressblockpage.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 7d6c3ae81718..b47b71f1a561 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmaddressblockpage.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,7 +40,7 @@
#include <svtools/headbar.hxx>
#include <svtools/svtreebx.hxx>
#include <vcl/combobox.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
class SwMailMergeWizard;
class SwMailMergeConfigItem;
/*-- 13.04.2004 15:50:37---------------------------------------------------
diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src
index 28acb9d48429..238d1cfa1260 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.src
+++ b/sw/source/ui/dbui/mmaddressblockpage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmaddressblockpage.src,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 7438988a88fd..be1ad7d3a43d 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmconfigitem.cxx,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -63,7 +60,7 @@
#include <unomid.h>
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
using namespace utl;
using ::rtl::OUString;
@@ -183,8 +180,8 @@ public:
SwMailMergeConfigItem_Impl();
~SwMailMergeConfigItem_Impl();
- virtual void Commit();
-
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
const Sequence< ::rtl::OUString>
GetAddressBlocks(sal_Bool bConvertToConfig = sal_False) const;
void SetAddressBlocks(
@@ -538,6 +535,8 @@ const Sequence<OUString>& SwMailMergeConfigItem_Impl::GetPropertyNames()
/*-- 15.04.2004 08:48:39---------------------------------------------------
-----------------------------------------------------------------------*/
+void SwMailMergeConfigItem_Impl::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwMailMergeConfigItem_Impl::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 7bef5c752be6..698e12f44882 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmdocselectpage.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#endif
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/new.hxx>
#include <sfx2/docfilt.hxx>
diff --git a/sw/source/ui/dbui/mmdocselectpage.hrc b/sw/source/ui/dbui/mmdocselectpage.hrc
index a81f78d61c63..f3c5698214ff 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hrc
+++ b/sw/source/ui/dbui/mmdocselectpage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmdocselectpage.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index e459a8b36546..2785846b39e8 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmdocselectpage.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmdocselectpage.src b/sw/source/ui/dbui/mmdocselectpage.src
index 91e3f445fc43..9bc2077c6619 100644
--- a/sw/source/ui/dbui/mmdocselectpage.src
+++ b/sw/source/ui/dbui/mmdocselectpage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmdocselectpage.src,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 03bd61021306..c7613055d6ab 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmgreetingspage.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmgreetingspage.hrc b/sw/source/ui/dbui/mmgreetingspage.hrc
index bf7ea71f83ef..422d04983e49 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hrc
+++ b/sw/source/ui/dbui/mmgreetingspage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmgreetingspage.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index cc71c09ee771..1756f78a29d8 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmgreetingspage.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src
index 4db1887f1958..a9447034d749 100644
--- a/sw/source/ui/dbui/mmgreetingspage.src
+++ b/sw/source/ui/dbui/mmgreetingspage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmgreetingspage.src,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index ddb37e3c8eeb..366eb23e9352 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmlayoutpage.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,12 +39,10 @@
#include <unotools/tempfile.hxx>
#include <uitool.hxx>
#include <svx/dlgutil.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swundo.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/docfilt.hxx>
#include <com/sun/star/text/XParagraphCursor.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
@@ -56,9 +51,7 @@
#include <fldbas.hxx>
#include <poolfmt.hxx>
#include <unotxdoc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <doc.hxx>
#include <wrtsh.hxx>
#include <fmtsrnd.hxx>
@@ -66,8 +59,8 @@
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
-#include <svx/boxitem.hxx>
-#include <svtools/urihelper.hxx>
+#include <editeng/boxitem.hxx>
+#include <svl/urihelper.hxx>
#include <shellio.hxx>
#include <osl/file.hxx>
#include <unoprnms.hxx>
@@ -325,7 +318,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
0 );
- aSet.Put(SwFmtAnchor(FLY_PAGE, 1));
+ aSet.Put(SwFmtAnchor(FLY_AT_PAGE, 1));
if(bAlignLeft)
aSet.Put(SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ));
else
diff --git a/sw/source/ui/dbui/mmlayoutpage.hrc b/sw/source/ui/dbui/mmlayoutpage.hrc
index bf0100b32de6..a54ba58fa025 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hrc
+++ b/sw/source/ui/dbui/mmlayoutpage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmlayoutpage.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index bb1e012c857b..0a4569c71437 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmlayoutpage.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmlayoutpage.src b/sw/source/ui/dbui/mmlayoutpage.src
index 4c30916ef908..8e012674719d 100644
--- a/sw/source/ui/dbui/mmlayoutpage.src
+++ b/sw/source/ui/dbui/mmlayoutpage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmlayoutpage.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx
index d6083d1fc712..bb58496effd3 100644
--- a/sw/source/ui/dbui/mmmergepage.cxx
+++ b/sw/source/ui/dbui/mmmergepage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmmergepage.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,9 +39,9 @@
#endif
#include <dbui.hrc>
#include <mmmergepage.hrc>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <swabstdlg.hxx>
/*-- 02.04.2004 16:38:45---------------------------------------------------
diff --git a/sw/source/ui/dbui/mmmergepage.hrc b/sw/source/ui/dbui/mmmergepage.hrc
index e01c4ab46b85..bf9c730bf743 100644
--- a/sw/source/ui/dbui/mmmergepage.hrc
+++ b/sw/source/ui/dbui/mmmergepage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmmergepage.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx
index da6f008b5b6d..ad3d51260bb2 100644
--- a/sw/source/ui/dbui/mmmergepage.hxx
+++ b/sw/source/ui/dbui/mmmergepage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmmergepage.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmmergepage.src b/sw/source/ui/dbui/mmmergepage.src
index 068a51f57a04..d2f55bceb978 100644
--- a/sw/source/ui/dbui/mmmergepage.src
+++ b/sw/source/ui/dbui/mmmergepage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmmergepage.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index eb1f75d57979..a9d1b4a0e2ae 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputpage.cxx,v $
- * $Revision: 1.23.136.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,10 +48,10 @@
#include <IDocumentDeviceAccess.hxx>
#endif
#include <hintids.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svx/langitem.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/stritem.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/langitem.hxx>
+#include <svl/itemset.hxx>
+#include <svl/stritem.hxx>
#include <svtools/ehdl.hxx>
#include <svtools/sfxecode.hxx>
#include <vcl/msgbox.hxx>
@@ -68,7 +65,7 @@
//#include <sfx2/docfilt.hxx>
//#endif
#include <tools/urlobj.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#ifndef _VCL_PRINT_HXX
#include <vcl/print.hxx>
#endif
@@ -90,7 +87,7 @@
#include <swunohelper.hxx>
#include <vos/mutex.hxx>
#include <shellio.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <sfx2/event.hxx>
#include <swevent.hxx>
#include <mmoutputpage.hrc>
@@ -991,6 +988,13 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
nEnd = rConfigItem.GetMergedDocumentCount();
}
rConfigItem.SetPrintRange( (USHORT)nBegin, (USHORT)nEnd );
+ SwDocMergeInfo& rStartInfo = rConfigItem.GetDocumentMergeInfo(nBegin);
+ SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1);
+
+ rtl::OUString sPages(rtl::OUString::valueOf( rStartInfo.nStartPageInTarget ));
+ sPages += rtl::OUString::createFromAscii( " - ");
+ sPages += rtl::OUString::valueOf( rEndInfo.nEndPageInTarget );
+
SwWrtShell& rSh = pTargetView->GetWrtShell();
pTargetView->SetMailMergeConfigItem(&rConfigItem, 0, sal_False);
if(m_pTempPrinter)
@@ -1002,11 +1006,17 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell();
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh));
rSh.GetNewDBMgr()->SetMergeType( DBMGR_MERGE_DOCUMENTS );
- SfxDispatcher *pDis = pTargetView->GetViewFrame()->GetDispatcher();
+ //SfxDispatcher *pDis = pTargetView->GetViewFrame()->GetDispatcher();
SfxBoolItem aMergeSilent(SID_SILENT, sal_False);
m_pWizard->enableButtons(WZB_CANCEL, sal_False);
- pDis->Execute(SID_PRINTDOCDIRECT,
- SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aMergeSilent, 0L);
+
+ uno::Sequence < beans::PropertyValue > aProps( 2 );
+ aProps[0]. Name = rtl::OUString::createFromAscii("MonitorVisible");
+ aProps[0].Value <<= sal_True;
+ aProps[1]. Name = rtl::OUString::createFromAscii("Pages");
+ aProps[1]. Value <<= sPages;
+
+ pTargetView->ExecPrint( aProps, false, true );
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh));
pTargetView->SetMailMergeConfigItem(0, 0, sal_False);
diff --git a/sw/source/ui/dbui/mmoutputpage.hrc b/sw/source/ui/dbui/mmoutputpage.hrc
index d4130b17adb8..f8daf2734b0c 100644
--- a/sw/source/ui/dbui/mmoutputpage.hrc
+++ b/sw/source/ui/dbui/mmoutputpage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputpage.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index 6a02a8482416..c48d6d210c4f 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputpage.hxx,v $
- * $Revision: 1.10.136.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src
index d044767785bc..efe84e34bfe9 100644
--- a/sw/source/ui/dbui/mmoutputpage.src
+++ b/sw/source/ui/dbui/mmoutputpage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputpage.src,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 88aa3ba496ff..8d229b94c06c 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputtypepage.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmoutputtypepage.hrc b/sw/source/ui/dbui/mmoutputtypepage.hrc
index b57344e7caaf..6deff71251b9 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.hrc
+++ b/sw/source/ui/dbui/mmoutputtypepage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputtypepage.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx
index b268f152f790..9db02409cd1c 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.hxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputtypepage.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmoutputtypepage.src b/sw/source/ui/dbui/mmoutputtypepage.src
index e1a8167a22d1..3c776ff8fb59 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.src
+++ b/sw/source/ui/dbui/mmoutputtypepage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmoutputtypepage.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index c8c7de0aeca5..a8650c4b37c9 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmpreparemergepage.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hrc b/sw/source/ui/dbui/mmpreparemergepage.hrc
index d2958128f4c2..958df827749b 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hrc
+++ b/sw/source/ui/dbui/mmpreparemergepage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmpreparemergepage.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index 56765ff13c71..90298711dd88 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmpreparemergepage.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/mmpreparemergepage.src b/sw/source/ui/dbui/mmpreparemergepage.src
index 984c72550727..eac858b1b814 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.src
+++ b/sw/source/ui/dbui/mmpreparemergepage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmpreparemergepage.src,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 96b87c93779e..6cb7b87336c8 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selectdbtabledialog.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hrc b/sw/source/ui/dbui/selectdbtabledialog.hrc
index 3fcb2d1ee491..24ed1183f97b 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hrc
+++ b/sw/source/ui/dbui/selectdbtabledialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selectdbtabledialog.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx
index 868668b08d6c..25b23f692a4c 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selectdbtabledialog.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/selectdbtabledialog.src b/sw/source/ui/dbui/selectdbtabledialog.src
index 8a08c4c16e8b..271201463fef 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.src
+++ b/sw/source/ui/dbui/selectdbtabledialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selectdbtabledialog.src,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index 354495884c1e..ca50ee02d593 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdbtoolsclient.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 8dca8ef1abf0..8bf658d504b0 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwSpellDialogChildWindow.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,41 +27,41 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <SwSpellDialogChildWindow.hxx>
#include <vcl/msgbox.hxx>
-#include <svx/svxacorr.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/svxacorr.hxx>
+#include <editeng/acorrcfg.hxx>
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
#endif
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <wrtsh.hxx>
#include <sfx2/printer.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svdview.hxx>
#include <svx/svditer.hxx>
#include <svx/svdogrp.hxx>
-#include <svtools/linguprops.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/linguprops.hxx>
+#include <unotools/lingucfg.hxx>
#include <doc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <docary.hxx>
#include <frmfmt.hxx>
#include <dcontact.hxx>
#include <edtwin.hxx>
#include <pam.hxx>
#include <drawbase.hxx>
-#include <unoobj.hxx>
+#include <unotextrange.hxx>
#ifndef _DIALOG_HXX
#include <dialog.hrc>
#endif
#include <cmdid.h>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
@@ -258,8 +255,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
//mark the start position only if not at start of doc
if(!pWrtShell->IsStartOfDoc())
{
- m_pSpellState->m_xStartRange = SwXTextRange::CreateTextRangeFromPosition(
- pWrtShell->GetDoc(), *pCrsr->Start(), pCrsr->End());
+ m_pSpellState->m_xStartRange =
+ SwXTextRange::CreateXTextRange(
+ *pWrtShell->GetDoc(),
+ *pCrsr->Start(), pCrsr->End());
}
pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, FALSE );
}
@@ -390,7 +389,8 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
if(RET_YES == nRet)
{
SwUnoInternalPaM aPam(*pWrtShell->GetDoc());
- if(SwXTextRange::XTextRangeToSwPaM(aPam, m_pSpellState->m_xStartRange))
+ if (::sw::XTextRangeToSwPaM(aPam,
+ m_pSpellState->m_xStartRange))
{
pWrtShell->SetSelection(aPam);
pWrtShell->SpellStart(DOCPOS_START, DOCPOS_CURR, DOCPOS_START);
diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx
index 18787c51cdfb..54955c286a02 100644
--- a/sw/source/ui/dialog/abstract.cxx
+++ b/sw/source/ui/dialog/abstract.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: abstract.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/abstract.hrc b/sw/source/ui/dialog/abstract.hrc
index ea8af3684eac..c36d02ee1b1f 100644
--- a/sw/source/ui/dialog/abstract.hrc
+++ b/sw/source/ui/dialog/abstract.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: abstract.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/abstract.src b/sw/source/ui/dialog/abstract.src
index 9666f845bc1a..87f7bfb9174c 100644
--- a/sw/source/ui/dialog/abstract.src
+++ b/sw/source/ui/dialog/abstract.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: abstract.src,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx
index 342946d357cd..f168d0684a81 100644
--- a/sw/source/ui/dialog/addrdlg.cxx
+++ b/sw/source/ui/dialog/addrdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: addrdlg.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 585151383893..355e68bd5c58 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ascfldlg.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,16 +34,16 @@
#include <rtl/textenc.h>
#include <i18npool/mslangid.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <fontcfg.hxx>
#include <swmodule.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <sfx2/printer.hxx>
-#include <svx/flstitem.hxx>
+#include <editeng/flstitem.hxx>
#include <svx/dlgutil.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/langitem.hxx>
-#include <svx/scripttypeitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/scripttypeitem.hxx>
#include <swtypes.hxx>
#include <ascfldlg.hxx>
#include <shellio.hxx>
diff --git a/sw/source/ui/dialog/ascfldlg.hrc b/sw/source/ui/dialog/ascfldlg.hrc
index beffb41de5ba..b96cdc39b57a 100644
--- a/sw/source/ui/dialog/ascfldlg.hrc
+++ b/sw/source/ui/dialog/ascfldlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ascfldlg.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/ascfldlg.src b/sw/source/ui/dialog/ascfldlg.src
index 735f407f1154..6ef0ea42b656 100644
--- a/sw/source/ui/dialog/ascfldlg.src
+++ b/sw/source/ui/dialog/ascfldlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ascfldlg.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/dialog.src b/sw/source/ui/dialog/dialog.src
index 5f323732dfd5..26b615bff7b2 100644
--- a/sw/source/ui/dialog/dialog.src
+++ b/sw/source/ui/dialog/dialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dialog.src,v $
- * $Revision: 1.30.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 68e7bc55330d..40f0fddf98f8 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docstdlg.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/docstdlg.hrc b/sw/source/ui/dialog/docstdlg.hrc
index e49b6580e46a..5084ea58dbdb 100644
--- a/sw/source/ui/dialog/docstdlg.hrc
+++ b/sw/source/ui/dialog/docstdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docstdlg.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/docstdlg.src b/sw/source/ui/dialog/docstdlg.src
index bcf6297c41a8..4384acbe3fe9 100644
--- a/sw/source/ui/dialog/docstdlg.src
+++ b/sw/source/ui/dialog/docstdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docstdlg.src,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 0c052223abcf..2f78c22a83ab 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macassgn.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,7 +36,7 @@
#include "hintids.hxx"
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/htmlmode.hxx>
#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk
index ce90d6a3a6e6..54b7784946e8 100644
--- a/sw/source/ui/dialog/makefile.mk
+++ b/sw/source/ui/dialog/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.22 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 47936697a20d..ef9e8f4f85de 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: regionsw.cxx,v $
- * $Revision: 1.40 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,39 +31,25 @@
#include <hintids.hxx>
#include <uitool.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/PasswordHelper.hxx>
-#ifndef _MSGBOX_HXX //autogen
+#include <svl/urihelper.hxx>
+#include <svl/PasswordHelper.hxx>
#include <vcl/msgbox.hxx>
-#endif
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include <sot/formats.hxx>
-#ifndef _PASSWD_HXX //autogen
#include <sfx2/passwd.hxx>
-#endif
#include <sfx2/docfilt.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/linkmgr.hxx>
-#ifndef _SVX_SIZEITEM_HXX //autogen
-
-#include <svx/sizeitem.hxx>
-#endif
-
-#include <svx/htmlcfg.hxx>
+#include <editeng/sizeitem.hxx>
+#include <svtools/htmlcfg.hxx>
#include <section.hxx>
#include <docary.hxx>
#include <regionsw.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <swundo.hxx> // fuer Undo-Ids
@@ -74,22 +57,11 @@
#include <fmtfsize.hxx>
#include <swunodef.hxx>
#include <shellio.hxx>
-
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _REGIONSW_HRC
#include <regionsw.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <sfx2/bindings.hxx>
#include <svx/htmlmode.hxx>
#include <svx/dlgutil.hxx>
@@ -118,7 +90,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
if (!pSet || pSet->Count()==0)
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
@@ -154,7 +126,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
{
SwFmtCol aCol;
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue();
@@ -232,7 +204,7 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect )
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
0);
SwRect aRect;
- pThis->CalcBoundRect(aRect, FLY_IN_CNTNT);
+ pThis->CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
diff --git a/sw/source/ui/dialog/regionsw.hrc b/sw/source/ui/dialog/regionsw.hrc
index ece2d5aaf7ad..0535ed46a630 100644
--- a/sw/source/ui/dialog/regionsw.hrc
+++ b/sw/source/ui/dialog/regionsw.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: regionsw.hrc,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src
index d78e1fd02ef9..f2af8dca3b0d 100644
--- a/sw/source/ui/dialog/regionsw.src
+++ b/sw/source/ui/dialog/regionsw.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: regionsw.src,v $
- * $Revision: 1.59 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index 3269ed8cd306..a39c1866b717 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swabstdlg.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/swdialmgr.cxx b/sw/source/ui/dialog/swdialmgr.cxx
index 2a761edc24a5..308411358efa 100644
--- a/sw/source/ui/dialog/swdialmgr.cxx
+++ b/sw/source/ui/dialog/swdialmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdialmgr.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index ab2a1d8e3d3c..bdc3a320dcd6 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdlgfact.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#endif
#include "swdlgfact.hxx"
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
#endif
@@ -1698,7 +1695,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
break;
case RID_SW_TP_OPTTEST_PAGE :
case TP_OPTTEST_PAGE :
-#ifndef PRODUCT
+#ifdef DBG_UTIL
pRet = SwTestTabPage::Create;
#endif
break;
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index da66ceb23db4..462c571a06fa 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdlgfact.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index 39101c825a3b..3957a233f5e2 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuiexp.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/swwrtshitem.cxx b/sw/source/ui/dialog/swwrtshitem.cxx
index 3a490f8d6da4..f9015e3a0387 100644
--- a/sw/source/ui/dialog/swwrtshitem.cxx
+++ b/sw/source/ui/dialog/swwrtshitem.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swwrtshitem.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 9626f5104db9..c1e6df5edbf5 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uiregionsw.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,12 +33,12 @@
#include <hintids.hxx>
#include <regionsw.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/PasswordHelper.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/PasswordHelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/passwd.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/request.hxx>
@@ -49,8 +46,8 @@
#include <sfx2/linkmgr.hxx>
#include <sfx2/docinsert.hxx>
#include <sfx2/filedlghelper.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/htmlcfg.hxx>
+#include <editeng/sizeitem.hxx>
+#include <svtools/htmlcfg.hxx>
#include <comphelper/storagehelper.hxx>
#include <uitool.hxx>
@@ -1480,14 +1477,16 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
uno::Reference < embed::XStorage > xStg;
if( rMedium.IsStorage() && (xStg = rMedium.GetStorage()).is() )
{
- SvStringsDtor aArr( 10, 10 );
+ SvStrings aArr( 10, 10 );
sal_uInt32 nFormat = SotStorage::GetFormatID( xStg );
if ( nFormat == SOT_FORMATSTR_ID_STARWRITER_60 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_60 ||
nFormat == SOT_FORMATSTR_ID_STARWRITER_8 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_8)
- SwGetReaderXML()->GetSectionList( rMedium, (SvStrings&) aArr );
+ SwGetReaderXML()->GetSectionList( rMedium, aArr );
for( USHORT n = 0; n < aArr.Count(); ++n )
rBox.InsertEntry( *aArr[ n ] );
+
+ aArr.DeleteAndDestroy(0, aArr.Count());
}
}
/* -----------------21.05.99 10:16-------------------
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index c5dbe60dd2f7..4af058eeae1f 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wordcountdialog.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/wordcountdialog.hrc b/sw/source/ui/dialog/wordcountdialog.hrc
index bc42ea4c40b5..00749412ac97 100644
--- a/sw/source/ui/dialog/wordcountdialog.hrc
+++ b/sw/source/ui/dialog/wordcountdialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wordcountdialog.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dialog/wordcountdialog.src b/sw/source/ui/dialog/wordcountdialog.src
index 64b53be629dd..454a6c050b34 100644
--- a/sw/source/ui/dialog/wordcountdialog.src
+++ b/sw/source/ui/dialog/wordcountdialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wordcountdialog.src,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src
index 4c201bec02b9..8ecccb5395cb 100644
--- a/sw/source/ui/dochdl/dochdl.src
+++ b/sw/source/ui/dochdl/dochdl.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dochdl.src,v $
- * $Revision: 1.48.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 8d716d6420a9..5cb1df8a9ebb 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gloshdl.cxx,v $
- * $Revision: 1.32.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,8 +30,8 @@
#include <hintids.hxx>
-#include <svx/wghtitem.hxx>
-#include <svx/adjitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/adjitem.hxx>
#ifndef __RSC //autogen
#include <tools/errinf.hxx>
#endif
@@ -44,12 +41,12 @@
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/docfile.hxx>
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/svstdarr.hxx>
+#include <svl/urihelper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <poolfmt.hxx>
#include <fmtcol.hxx>
@@ -82,7 +79,7 @@
#include <vcl/lstbox.hxx>
#endif
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include "swabstdlg.hxx"
#include <misc.hrc>
diff --git a/sw/source/ui/dochdl/makefile.mk b/sw/source/ui/dochdl/makefile.mk
index 73974c4646a8..48400052f5c5 100644
--- a/sw/source/ui/dochdl/makefile.mk
+++ b/sw/source/ui/dochdl/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.9 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx
index d4d6e48e139c..79c18bb96e54 100644
--- a/sw/source/ui/dochdl/selglos.cxx
+++ b/sw/source/ui/dochdl/selglos.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selglos.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dochdl/selglos.hrc b/sw/source/ui/dochdl/selglos.hrc
index aad5fe804081..175ee09abe1b 100644
--- a/sw/source/ui/dochdl/selglos.hrc
+++ b/sw/source/ui/dochdl/selglos.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selglos.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src
index d674d0915d1a..1464b77bd7fc 100644
--- a/sw/source/ui/dochdl/selglos.src
+++ b/sw/source/ui/dochdl/selglos.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selglos.src,v $
- * $Revision: 1.28 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index f3dc55f26f4d..a49141e896d9 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdtflvr.cxx,v $
- * $Revision: 1.120 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -53,20 +50,14 @@
#include <osl/endian.h>
#include <sfx2/linkmgr.hxx>
#include <tools/urlobj.hxx>
-#ifndef _WRKWIN_HXX
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svtools/imap.hxx>
#include <sot/storage.hxx>
-#ifndef _GRAPH_HXX
#include <vcl/graph.hxx>
-#endif
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svx/svdmodel.hxx>
#include <svx/xexch.hxx>
#include <svx/xmlexchg.hxx>
@@ -75,19 +66,19 @@
#include <sfx2/mieclip.hxx>
#include <svx/svdetc.hxx>
#include <svx/xoutbmp.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/urlbmk.hxx>
#include <svtools/htmlout.hxx>
#include <svx/hlnkitem.hxx>
#include <svtools/inetimg.hxx>
-#include <svx/paperinf.hxx>
+#include <editeng/paperinf.hxx>
#include <svx/fmview.hxx>
-#include <svx/impgrf.hxx>
-#include <svx/scripttypeitem.hxx>
+#include <editeng/scripttypeitem.hxx>
#include <sfx2/docfilt.hxx>
#include <svtools/imapobj.hxx>
#include <sfx2/docfile.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/streamwrap.hxx>
+#include <svtools/filter.hxx>
#include <svx/unomodel.hxx>
#include <fmturl.hxx>
@@ -107,15 +98,9 @@
#include <swcont.hxx>
#include <wrtsh.hxx>
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
#include <fldbas.hxx> //DDE
#include <swundo.hxx> // fuer Undo-Ids
#include <pam.hxx>
@@ -126,25 +111,19 @@
#include <vcl/sound.hxx>
#include <swerror.h>
#include <SwCapObjType.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _DOCHDL_HRC
#include <dochdl.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc> // #111827#
-#endif
#include <sot/stg.hxx>
// #108584#
#include <svx/svditer.hxx>
// #108584#
-#include <svx/eeitem.hxx>
+#include <editeng/eeitem.hxx>
// #108584#
-#include <svx/fhgtitem.hxx>
+#include <editeng/fhgtitem.hxx>
// #108584#
#include <svx/svdpage.hxx>
@@ -154,9 +133,7 @@
#include <swcrsr.hxx>
#include <SwRewriter.hxx>
#include <undobj.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
#include <swserv.hxx>
@@ -2003,8 +1980,8 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
//!!! auf FileSystem abpruefen - nur dann ist es sinnvoll die
// Grafiken zu testen !!!!
Graphic aGrf;
- GraphicFilter *pFlt = ::GetGrfFilter();
- nRet = GRFILTER_OK == ::LoadGraphic( sURL, aEmptyStr, aGrf, pFlt );
+ GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter();
+ nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( sURL, aEmptyStr, aGrf, pFlt );
if( nRet )
{
switch( nAction )
@@ -2352,8 +2329,8 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
//!!! auf FileSystem abpruefen - nur dann ist es sinnvoll die
// Grafiken zu testen !!!!
- GraphicFilter *pFlt = ::GetGrfFilter();
- nRet = GRFILTER_OK == ::LoadGraphic( aBkmk.GetURL(), aEmptyStr,
+ GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter();
+ nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( aBkmk.GetURL(), aEmptyStr,
aGrf, pFlt );
if( !nRet && SW_PASTESDR_SETATTR == nAction &&
SOT_FORMAT_FILE == nFmt &&
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 6bea77137ac6..25adc5006c4d 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -2,14 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: PostItMgr.cxx,v $
- *
- * $Revision: 1.12.34.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -67,17 +63,17 @@
#include <sfx2/request.hxx>
#include <sfx2/event.hxx>
-#include <sfx2/srchitem.hxx>
+#include <svl/srchitem.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/languageoptions.hxx>
#include <svtools/langtab.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <svx/svdview.hxx>
-#include <svx/eeitem.hxx>
-#include <svx/langitem.hxx>
-#include <svx/outliner.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/outliner.hxx>
#include <i18npool/mslangid.hxx>
#include <i18npool/lang.h>
@@ -1941,9 +1937,14 @@ void SwPostItMgr::AssureStdModeAtShell()
{
mpWrtShell->UnSelectFrm();
mpWrtShell->LeaveSelFrmMode();
+ mpWrtShell->GetView().LeaveDrawCreate();
mpWrtShell->EnterStdMode();
mpWrtShell->DrawSelChanged();
mpView->StopShellTimer();
}
}
+
+void SwNoteProps::Commit() {}
+void SwNoteProps::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src
index 1088baa7a8b7..17f06e8a0037 100644
--- a/sw/source/ui/docvw/access.src
+++ b/sw/source/ui/docvw/access.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: access.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc
index afb599e64c6c..d0a696c4dd99 100644
--- a/sw/source/ui/docvw/docvw.hrc
+++ b/sw/source/ui/docvw/docvw.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docvw.hrc,v $
- * $Revision: 1.11.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src
index 0220d9d9eddf..aa9c8de1176c 100644
--- a/sw/source/ui/docvw/docvw.src
+++ b/sw/source/ui/docvw/docvw.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docvw.src,v $
- * $Revision: 1.52.140.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index 43efb040670f..94e131b06407 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: edtdd.cxx,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#include <svx/svdview.hxx>
-#include <svx/outliner.hxx>
+#include <editeng/outliner.hxx>
//#ifndef _SVDVMARK_HXX //autogen
//#include <svx/svdvmark.hxx>
//#endif
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 7d8e38443ca0..3801d72186e8 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: edtwin.cxx,v $
- * $Revision: 1.164 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -48,45 +45,38 @@
#include <vcl/msgbox.hxx>
#include <vcl/cmdevt.h>
#include <sot/storage.hxx>
-#include <svtools/macitem.hxx>
-#include <svtools/securityoptions.hxx>
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
+#include <svl/macitem.hxx>
+#include <unotools/securityoptions.hxx>
#include <basic/sbxvar.hxx>
-#endif
-#include <svtools/ctloptions.hxx>
+#include <svl/ctloptions.hxx>
#include <basic/sbx.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
-#ifndef _SFX_CLIENTSH_HXX
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/ipclient.hxx>
-#endif
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/ptitem.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/langitem.hxx>
+#include <svl/ptitem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/htmlmode.hxx>
#include <svx/svdview.hxx>
-//#ifndef _SVDVMARK_HXX //autogen
-//#include <svx/svdvmark.hxx>
-//#endif
#include <svx/svdhdl.hxx>
#include <svx/svdoutl.hxx>
-#include <svx/editeng.hxx>
-#include <svx/svxacorr.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svx/flditem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/wghtitem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/postitem.hxx>
-#include <svx/protitem.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/svxacorr.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/flditem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/protitem.hxx>
#include <unotools/charclass.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include <SwSmartTagMgr.hxx>
#include <edtwin.hxx>
#include <view.hxx>
@@ -128,12 +118,8 @@
#include <breakit.hxx>
#include <checkit.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _DOCVW_HRC
#include <docvw.hrc>
#endif
@@ -156,7 +142,7 @@
#include "postit.hxx"
//JP 11.10.2001: enable test code for bug fix 91313
-#if !defined( PRODUCT ) && (OSL_DEBUG_LEVEL > 1)
+#if defined(DBG_UTIL) && (OSL_DEBUG_LEVEL > 1)
//#define TEST_FOR_BUG91313
#endif
@@ -1019,7 +1005,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
default: ASSERT( TRUE, "ChangeFly: Unknown direction." );
}
BOOL bSet = FALSE;
- if( FLY_IN_CNTNT == eAnchorId && ( nDir % 2 ) )
+ if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 ))
{
long aDiff = aTmp.Top() - aRefPoint.Y();
if( aDiff > 0 )
@@ -1064,7 +1050,8 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
aSet.Put( aVert );
bSet = TRUE;
}
- if( bWeb && FLY_AT_CNTNT == eAnchorId && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ) )
+ if (bWeb && (FLY_AT_PARA == eAnchorId)
+ && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ))
{
SwFmtHoriOrient aHori( (SwFmtHoriOrient&)aSet.Get(RES_HORI_ORIENT) );
sal_Int16 eNew;
@@ -1091,11 +1078,13 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
rSh.StartAllAction();
if( bSet )
rSh.SetFlyFrmAttr( aSet );
- BOOL bSetPos = FLY_IN_CNTNT != eAnchorId;
+ BOOL bSetPos = (FLY_AS_CHAR != eAnchorId);
if(bSetPos && bWeb)
{
- if(FLY_PAGE != eAnchorId)
+ if (FLY_AT_PAGE != eAnchorId)
+ {
bSetPos = FALSE;
+ }
else
{
bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ?
@@ -1185,7 +1174,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
BOOL bDummy;
const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy );
const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
- const bool bMoveAllowed = !bHoriMove || rSh.GetAnchorId() != FLY_IN_CNTNT;
+ const bool bMoveAllowed =
+ !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
if ( bMoveAllowed )
{
// <--
@@ -1503,7 +1493,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
case KS_CheckKey:
eKeyState = KS_KeyToView; // default weiter zur View
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// JP 19.01.99: zum Umschalten des Cursor Verhaltens in ReadOnly
// Bereichen
@@ -2285,7 +2275,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
else if( !aKeyEvent.GetRepeat() && pACorr && bIsAutoCorrectChar &&
pACfg->IsAutoFmtByInput() &&
pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- ChgFractionSymbol | ChgOrdinalNumber |
+ ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr |
Autocorrect ) &&
'\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh &&
@@ -2317,7 +2307,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
if( pACorr && pACfg->IsAutoFmtByInput() &&
pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- ChgFractionSymbol | ChgOrdinalNumber |
+ ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr |
Autocorrect ) &&
!rSh.HasReadonlySel() )
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index 13f832acfccf..d605ef993457 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: edtwin2.cxx,v $
- * $Revision: 1.31.130.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,26 +31,26 @@
#include <hintids.hxx>
#include <doc.hxx>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#include <stdio.h>
#endif
#ifndef _HELP_HXX //autogen
#include <vcl/help.hxx>
#endif
-#include <svtools/stritem.hxx>
-#include <svtools/securityoptions.hxx>
+#include <svl/stritem.hxx>
+#include <unotools/securityoptions.hxx>
#include <tools/urlobj.hxx>
#include <txtrfmrk.hxx>
#include <fmtrfmrk.hxx>
-#include <svx/flditem.hxx>
-#include <svtools/urihelper.hxx>
+#include <editeng/flditem.hxx>
+#include <svl/urihelper.hxx>
#include <svx/svdotext.hxx>
#ifndef _OUTLINER_HXX //autogen
#define _EEITEMID_HXX
-#include <svx/outliner.hxx>
+#include <editeng/outliner.hxx>
#endif
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/svdview.hxx>
#include <svx/svdpagv.hxx>
#include <swmodule.hxx>
@@ -162,7 +159,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
SwContentAtPos::SW_TOXMARK |
SwContentAtPos::SW_REFMARK |
SwContentAtPos::SW_SMARTTAG |
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwContentAtPos::SW_TABLEBOXVALUE |
( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
#endif
@@ -176,7 +173,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "= " ));
sTxt += ((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
break;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
case SwContentAtPos::SW_TABLEBOXVALUE:
{
sTxt = UniString(
diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx
index 4e1cae03ea03..c2d7492cb066 100644
--- a/sw/source/ui/docvw/edtwin3.cxx
+++ b/sw/source/ui/docvw/edtwin3.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: edtwin3.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,7 +46,7 @@
#include "docsh.hxx"
#include "pagedesc.hxx" // Aktuelles Seitenformat
#include <frmatr.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/frmdiritem.hxx>
/*--------------------------------------------------------------------
diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk
index 0ca95000b53e..c3644c83f267 100644
--- a/sw/source/ui/docvw/makefile.mk
+++ b/sw/source/ui/docvw/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx
index e693f87e7a35..b5a8ea2edba8 100644
--- a/sw/source/ui/docvw/postit.cxx
+++ b/sw/source/ui/docvw/postit.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: postit.cxx,v $
- * $Revision: 1.8.42.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,36 +40,36 @@
#include <tools/poly.hxx> // Polygon
-#include <svx/postitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/eeitem.hxx>
-#include <svx/fhgtitem.hxx>
-#include <svx/bulitem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/shdditem.hxx>
-#include <svx/wghtitem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/flditem.hxx>
-#include <svx/frmdir.hxx>
-#include <svx/frmdiritem.hxx>
-#include <svx/langitem.hxx>
-#include <svx/adjitem.hxx>
-#include <svx/editview.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/bulitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/shdditem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/flditem.hxx>
+#include <editeng/frmdir.hxx>
+#include <editeng/frmdiritem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/editview.hxx>
#include <svx/svdview.hxx>
#include <svx/sdrpaintwindow.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
-#include <svx/editstat.hxx> //EditEngine flags
-#include <svx/outliner.hxx>
-#include <svx/editeng.hxx>
-#include <svx/editobj.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/editstat.hxx> //EditEngine flags
+#include <editeng/outliner.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editobj.hxx>
+#include <editeng/unolingu.hxx>
#include <svtools/langtab.hxx>
-#include <svtools/slstitm.hxx>
-#include <svtools/securityoptions.hxx>
-#include <svtools/useroptions.hxx>
-#include <svtools/languageoptions.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/slstitm.hxx>
+#include <unotools/securityoptions.hxx>
+#include <unotools/useroptions.hxx>
+#include <svl/languageoptions.hxx>
+#include <svl/zforlist.hxx>
#include <svtools/svmedit.hxx>
#include <linguistic/lngprops.hxx>
@@ -1953,7 +1950,7 @@ private:
ShadowState maShadowState;
protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(
+ virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
public:
@@ -1977,7 +1974,7 @@ public:
DeclPrimitrive2DIDBlock()
};
-drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLocalDecomposition(
+drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::create2DDecomposition(
const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const
{
// get logic sizes in object coordinate system
@@ -2140,7 +2137,7 @@ private:
bool mbLineSolid : 1;
protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(
+ virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
public:
@@ -2179,7 +2176,7 @@ public:
DeclPrimitrive2DIDBlock()
};
-drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLocalDecomposition(
+drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::create2DDecomposition(
const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const
{
drawinglayer::primitive2d::Primitive2DSequence aRetval;
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index 50776ef80f11..0e3ab86c71a7 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: romenu.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,9 +34,9 @@
#include <vcl/graph.hxx>
#include <vcl/msgbox.hxx>
#include <sot/formats.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/pathoptions.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <unotools/pathoptions.hxx>
#include <svtools/filter.hxx>
#include <svtools/imap.hxx>
#include <svtools/inetimg.hxx>
@@ -47,9 +44,8 @@
#include <sfx2/docfile.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/xoutbmp.hxx>
-#include <svx/impgrf.hxx>
#include <svx/gallery.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/brshitem.hxx>
#include <swunodef.hxx>
@@ -408,7 +404,7 @@ String SwReadOnlyPopup::SaveGraphic( USHORT nId )
if ( pItem->GetGraphicLink() )
sGrfName = *pItem->GetGraphicLink();
((SvxBrushItem*)pItem)->SetDoneLink( Link() );
- const Graphic *pGrf = pItem->GetGraphic( rView.GetDocShell() );
+ const Graphic *pGrf = pItem->GetGraphic();
if ( pGrf )
{
aGraphic = *pGrf;
@@ -442,7 +438,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
aURL.SetSmartURL( aName );
aDlgHelper.SetFileName( aURL.GetName() );
- GraphicFilter& rGF = *GetGrfFilter();
+ GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter();
const USHORT nCount = rGF.GetExportFormatCount();
String aExt( aURL.GetExtension() );
diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx
index b325c0361614..2d60689c6854 100644
--- a/sw/source/ui/docvw/romenu.hxx
+++ b/sw/source/ui/docvw/romenu.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: romenu.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 19ba5aefdf25..55a0cb47e296 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srcedtw.cxx,v $
- * $Revision: 1.21.252.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,9 +46,9 @@
#include <sfx2/app.hxx>
#include <svtools/htmltokn.h>
#include <svtools/txtattr.hxx>
-#include <svtools/sourceviewconfig.hxx>
+#include <unotools/sourceviewconfig.hxx>
#include <svtools/colorcfg.hxx>
-#include <svx/flstitem.hxx>
+#include <editeng/flstitem.hxx>
#include <vcl/metric.hxx>
#include <svtools/ctrltool.hxx>
#include <tools/time.hxx>
@@ -248,7 +245,7 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
pVScrollbar(0),
pSrcView(pParentView),
- pSourceViewConfig(new svt::SourceViewConfig),
+ pSourceViewConfig(new utl::SourceViewConfig),
nCurTextWidth(0),
nStartLine(USHRT_MAX),
@@ -258,14 +255,14 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
{
SetHelpId(HID_SOURCE_EDITWIN);
CreateTextEngine();
- StartListening(*pSourceViewConfig);
+ pSourceViewConfig->AddListener(this);
}
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
SwSrcEditWindow::~SwSrcEditWindow()
{
- EndListening(*pSourceViewConfig);
+ pSourceViewConfig->RemoveListener(this);
delete pSourceViewConfig;
aSyntaxIdleTimer.Stop();
if ( pTextEngine )
@@ -819,7 +816,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
--------------------------------------------------*/
-void SwSrcEditWindow::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if ( rHint.ISA( TextHint ) )
{
@@ -842,7 +839,11 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DoDelayedSyntaxHighlight( (USHORT)rTextHint.GetValue() );
}
}
- else if(&rBC == pSourceViewConfig)
+}
+
+void SwSrcEditWindow::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal_uInt32 )
+{
+ if( pBrdCst == pSourceViewConfig)
SetFont();
}
diff --git a/sw/source/ui/envelp/envelp.src b/sw/source/ui/envelp/envelp.src
index 9b308240c0dc..0381ad81d249 100644
--- a/sw/source/ui/envelp/envelp.src
+++ b/sw/source/ui/envelp/envelp.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envelp.src,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index f6fb3f596a35..cfb5ad8f4afd 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envfmt.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -44,13 +41,13 @@
#define _SVSTDARR_LONGSSORT
#define _SVSTDARR_LONGS
-#include <svtools/svstdarr.hxx>
-#include <svx/paperinf.hxx>
+#include <svl/svstdarr.hxx>
+#include <editeng/paperinf.hxx>
#ifndef _SVX_TSTPITEM_HXX //autogen
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#endif
-#include <svx/lrspitem.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/brshitem.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
diff --git a/sw/source/ui/envelp/envfmt.hrc b/sw/source/ui/envelp/envfmt.hrc
index 2b7d83705098..fb15678cacee 100644
--- a/sw/source/ui/envelp/envfmt.hrc
+++ b/sw/source/ui/envelp/envfmt.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envfmt.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 16d77e4bccd2..f8508bb7e69a 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envfmt.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <svtools/stdctrl.hxx>
#ifndef _FIELD_HXX //autogen
diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src
index ff9e0417bdba..ae0693205b87 100644
--- a/sw/source/ui/envelp/envfmt.src
+++ b/sw/source/ui/envelp/envfmt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envfmt.src,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index fa1744ca1ae5..298e5cb7611e 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envimg.cxx,v $
- * $Revision: 1.13.176.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,9 +33,9 @@
#include <tools/stream.hxx>
#include <tools/resid.hxx>
#include <sfx2/app.hxx>
-#include <svx/paperinf.hxx>
+#include <editeng/paperinf.hxx>
#include <com/sun/star/uno/Sequence.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <tools/shl.hxx>
#include <swmodule.hxx>
#include <errhdl.hxx>
@@ -293,6 +290,9 @@ void SwEnvCfgItem::Commit()
}
PutProperties(aNames, aValues);
}
+
+void SwEnvCfgItem::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
/* -----------------------------26.09.00 14:04--------------------------------
---------------------------------------------------------------------------*/
diff --git a/sw/source/ui/envelp/envlop.hrc b/sw/source/ui/envelp/envlop.hrc
index b8b7e70bc57a..43f51d3a48df 100644
--- a/sw/source/ui/envelp/envlop.hrc
+++ b/sw/source/ui/envelp/envlop.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envlop.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src
index f5a5bbde2dc4..c85b6cd1a7ab 100644
--- a/sw/source/ui/envelp/envlop.src
+++ b/sw/source/ui/envelp/envlop.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envlop.src,v $
- * $Revision: 1.38 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 07e0d60972aa..279ce515c1d9 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envlop1.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index c54911294912..22690e95abff 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envprt.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envprt.hrc b/sw/source/ui/envelp/envprt.hrc
index a1505d855132..902416e80764 100644
--- a/sw/source/ui/envelp/envprt.hrc
+++ b/sw/source/ui/envelp/envprt.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envprt.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index c69ccc2b5e85..4c2c14fb5cd6 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envprt.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src
index f15a13d9f733..f671c9506dc6 100644
--- a/sw/source/ui/envelp/envprt.src
+++ b/sw/source/ui/envelp/envprt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envprt.src,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/label.hrc b/sw/source/ui/envelp/label.hrc
index 67b74eb4322f..3817ff92def4 100644
--- a/sw/source/ui/envelp/label.hrc
+++ b/sw/source/ui/envelp/label.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: label.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src
index f2f10723bd9d..40d9560deee7 100644
--- a/sw/source/ui/envelp/label.src
+++ b/sw/source/ui/envelp/label.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: label.src,v $
- * $Revision: 1.59 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index bc86c4719c4b..162a6a5cea4f 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: label1.cxx,v $
- * $Revision: 1.38 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index 76a971c60db6..7b906c0ae6bf 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labelcfg.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -65,6 +62,9 @@ void SwLabelConfig::Commit()
{
// the config item is not writable yet
}
+
+void SwLabelConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
/* -----------------------------15.01.01 11:42--------------------------------
---------------------------------------------------------------------------*/
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 5c32abede88a..22e281cfcef7 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labelexp.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,7 +40,7 @@
#include <labfmt.hxx>
#include <unotools.hxx>
#include <unoatxt.hxx>
-#include <unoobj.hxx>
+#include <unomid.h>
#include <unoprnms.hxx>
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 575895a35b73..c39daed1729e 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labfmt.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labfmt.hrc b/sw/source/ui/envelp/labfmt.hrc
index aa681e36ab24..ae6786dce3a9 100644
--- a/sw/source/ui/envelp/labfmt.hrc
+++ b/sw/source/ui/envelp/labfmt.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labfmt.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 98a7599c2c63..ebe7ab46dc81 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labfmt.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src
index ed338672ccc3..890df1220250 100644
--- a/sw/source/ui/envelp/labfmt.src
+++ b/sw/source/ui/envelp/labfmt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labfmt.src,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx
index 6406861f114b..0be179372ca5 100644
--- a/sw/source/ui/envelp/labimg.cxx
+++ b/sw/source/ui/envelp/labimg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labimg.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,7 +35,7 @@
#endif
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <tools/shl.hxx>
#include <swmodule.hxx>
#include "labimg.hxx"
@@ -410,6 +407,8 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
/* -----------------------------25.09.00 16:26--------------------------------
---------------------------------------------------------------------------*/
+void SwLabCfgItem::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
void SwLabCfgItem::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
diff --git a/sw/source/ui/envelp/labimp.hxx b/sw/source/ui/envelp/labimp.hxx
index 794e374005c2..5176394e8249 100644
--- a/sw/source/ui/envelp/labimp.hxx
+++ b/sw/source/ui/envelp/labimp.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labimp.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index de5197af2622..633e40a5d146 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labprt.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <svtools/prnsetup.hxx>
-#include <svtools/cmdoptions.hxx>
+#include <unotools/cmdoptions.hxx>
#include <vcl/print.hxx>
#include <wrtsh.hxx>
#include <label.hxx>
@@ -137,7 +134,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
if ( bEnable )
aColField.GrabFocus();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( pButton == &aPageButton, "NewButton?" );
#endif
diff --git a/sw/source/ui/envelp/labprt.hrc b/sw/source/ui/envelp/labprt.hrc
index 8662571b94d9..07453cb01e89 100644
--- a/sw/source/ui/envelp/labprt.hrc
+++ b/sw/source/ui/envelp/labprt.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labprt.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index df85772c453a..1f8ff491423d 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labprt.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src
index 2c922fb0921a..6ace6002d7f6 100644
--- a/sw/source/ui/envelp/labprt.src
+++ b/sw/source/ui/envelp/labprt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labprt.src,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index fd9caec98c24..ae553ee89a19 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmrge.cxx,v $
- * $Revision: 1.39 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,9 +35,9 @@
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/pathoptions.hxx>
-#include <goodies/mailenum.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/mailenum.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include <helpid.h>
@@ -227,6 +224,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
m_aDialogSize( GetSizePixel() )
{
FreeResource();
+ aSingleJobsCB.Show(sal_False); // not supported in since cws printerpullpages anymore
//task #97066# mailing of form letters is currently not supported
aMailingRB.Show(FALSE);
aSubjectFT.Show(FALSE);
@@ -347,7 +345,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
pModOpt = SW_MOD()->GetModuleConfig();
- aSingleJobsCB.Check(pModOpt->IsSinglePrintJob());
+ //aSingleJobsCB.Check(pModOpt->IsSinglePrintJob());// not supported in since cws printerpullpages anymore
sal_Int16 nMailingMode(pModOpt->GetMailingFormats());
aFormatSwCB.Check((nMailingMode & TXTFORMAT_OFFICE) != 0);
@@ -872,7 +870,7 @@ IMPL_LINK( SwMailMergeDlg, AttachFileHdl, PushButton *, EMPTYARG )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- AbstractSvxMultiFileDialog* pFileDlg = pFact->CreateSvxMultiFileDialog( this, RID_SVXDLG_MULTIPATH);
+ AbstractSvxMultiFileDialog* pFileDlg = pFact->CreateSvxMultiFileDialog( this );
DBG_ASSERT(pFileDlg, "Dialogdiet fail!");
pFileDlg->SetFiles(aAttachED.GetText());
pFileDlg->SetHelpId(HID_FILEDLG_MAILMRGE2);
@@ -941,4 +939,3 @@ SwMailMergeFieldConnectionsDlg::~SwMailMergeFieldConnectionsDlg()
{
}
-
diff --git a/sw/source/ui/envelp/mailmrge.hrc b/sw/source/ui/envelp/mailmrge.hrc
index 60d957870b8e..f03c42663fe6 100644
--- a/sw/source/ui/envelp/mailmrge.hrc
+++ b/sw/source/ui/envelp/mailmrge.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmrge.hrc,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src
index 0d9cbc5a46ea..ec6888e2c0e1 100644
--- a/sw/source/ui/envelp/mailmrge.src
+++ b/sw/source/ui/envelp/mailmrge.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmrge.src,v $
- * $Revision: 1.44 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/makefile.mk b/sw/source/ui/envelp/makefile.mk
index 5e5105d3d48e..3010601b0ac2 100644
--- a/sw/source/ui/envelp/makefile.mk
+++ b/sw/source/ui/envelp/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index 18f1d0b929c9..2bfcc7e27cae 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuilabimp.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx
index 8da7e0945ea1..a0e7c0ac659e 100644
--- a/sw/source/ui/envelp/syncbtn.cxx
+++ b/sw/source/ui/envelp/syncbtn.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: syncbtn.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 08c05450bf72..68ce692f6a32 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DropDownFieldDialog.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.hrc b/sw/source/ui/fldui/DropDownFieldDialog.hrc
index a29e8f9042da..dc63ae58e5ac 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.hrc
+++ b/sw/source/ui/fldui/DropDownFieldDialog.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DropDownFieldDialog.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.src b/sw/source/ui/fldui/DropDownFieldDialog.src
index 9bc20c33907c..407ee199a8ef 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.src
+++ b/sw/source/ui/fldui/DropDownFieldDialog.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DropDownFieldDialog.src,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx
index 823cbc304e70..38910327754e 100644
--- a/sw/source/ui/fldui/FldRefTreeListBox.cxx
+++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FldRefTreeListBox.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/FldRefTreeListBox.hxx b/sw/source/ui/fldui/FldRefTreeListBox.hxx
index 796393e372dd..92df954c8ddd 100644
--- a/sw/source/ui/fldui/FldRefTreeListBox.hxx
+++ b/sw/source/ui/fldui/FldRefTreeListBox.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: FldRefTreeListBox.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 70638a83f163..7d607b803536 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: changedb.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/changedb.hrc b/sw/source/ui/fldui/changedb.hrc
index ebd513ab23fe..7bccd2fa9363 100644
--- a/sw/source/ui/fldui/changedb.hrc
+++ b/sw/source/ui/fldui/changedb.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: changedb.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/changedb.src b/sw/source/ui/fldui/changedb.src
index afeecd1163ec..babf0b5bba13 100644
--- a/sw/source/ui/fldui/changedb.src
+++ b/sw/source/ui/fldui/changedb.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: changedb.src,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index b8278b00f988..3c67cdb6afe7 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddb.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index bc1225e6795b..2472031777a1 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddb.hxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/flddb.src b/sw/source/ui/fldui/flddb.src
index 1597b9d1f5a0..ce9f3dd8a09a 100644
--- a/sw/source/ui/fldui/flddb.src
+++ b/sw/source/ui/fldui/flddb.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddb.src,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index e368340314fc..07ab852e199e 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddinf.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,15 +35,12 @@
#include <sfx2/request.hxx>
#include <sfx2/frame.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <swtypes.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <fldbas.hxx>
#include <docufld.hxx>
#include <wrtsh.hxx>
@@ -63,13 +57,16 @@
#ifndef _VIEW_HXX
#include <view.hxx>
#endif
-#include <svtools/zformat.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/Time.hpp>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/Date.hpp>
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
using namespace nsSwDocInfoSubType;
-
+using namespace com::sun::star;
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
@@ -103,7 +100,7 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, FALSE );
if ( pItem )
- pItem->GetValue() >>= aPropertyNames;
+ pItem->GetValue() >>= xCustomPropertySet;
}
/*--------------------------------------------------------------------
@@ -168,24 +165,31 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
{
if (DI_CUSTOM == i)
{
- if (aPropertyNames.getLength() )
+ if(xCustomPropertySet.is() )
{
+ uno::Reference< beans::XPropertySetInfo > xSetInfo = xCustomPropertySet->getPropertySetInfo();
+ const uno::Sequence< beans::Property > rProperties = xSetInfo->getProperties();
+// uno::Sequence< ::rtl::OUString > aPropertyNames(rProperties.getLength());
+// for (sal_Int32 i = 0; i < rProperties.getLength(); ++i) {
+// aPropertyNames[i] = rProperties[i].Name;
+// }
//if ( !IsFldEdit() )
+ if( rProperties.getLength() )
{
pInfo = aTypeTLB.InsertEntry( String(SW_RES( STR_CUSTOM )) );
pInfo->SetUserData(reinterpret_cast<void*>(USHRT_MAX));
- }
- for (sal_Int32 n=0; n<aPropertyNames.getLength(); n++)
- {
- rtl::OUString sEntry = aPropertyNames[n];
- pEntry = aTypeTLB.InsertEntry(sEntry, pInfo);
- if(m_sOldCustomFieldName.equals( sEntry ))
+ for (sal_Int32 n=0; n < rProperties.getLength(); n++)
{
- pSelEntry = pEntry;
- aTypeTLB.Expand( pInfo );
+ rtl::OUString sEntry = rProperties[n].Name;
+ pEntry = aTypeTLB.InsertEntry(sEntry, pInfo);
+ if(m_sOldCustomFieldName.equals( sEntry ))
+ {
+ pSelEntry = pEntry;
+ aTypeTLB.Expand( pInfo );
+ }
+ pEntry->SetUserData(reinterpret_cast<void*>(i));
}
- pEntry->SetUserData(reinterpret_cast<void*>(i));
}
}
}
@@ -263,12 +267,12 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
{
USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
USHORT nPos = aSelectionLB.GetSelectEntryPos();
USHORT nExtSubType;
+ USHORT nNewType = 0;
if (nSubType != DI_EDIT)
{
@@ -279,7 +283,33 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
aFormatLB.Clear();
aFormatLB.Enable(FALSE);
aFormatFT.Enable(FALSE);
- return 0;
+ if( nSubType == DI_CUSTOM )
+ {
+ //find out which type the custom field has - for a start set to DATE format
+ ::rtl::OUString sName = aTypeTLB.GetEntryText(pSelEntry);
+ try
+ {
+ uno::Any aVal = xCustomPropertySet->getPropertyValue( sName );
+ const uno::Type& rValueType = aVal.getValueType();
+ if( rValueType == ::getCppuType( (util::DateTime*)0 ))
+ {
+ nNewType = NUMBERFORMAT_DATETIME;
+ }
+ else if( rValueType == ::getCppuType( (util::Date*)0 ))
+ {
+ nNewType = NUMBERFORMAT_DATE;
+ }
+ else if( rValueType == ::getCppuType( (util::Time*)0 ))
+ {
+ nNewType = NUMBERFORMAT_TIME;
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ }
+ }
+ else
+ return 0;
}
nPos = 0;
}
@@ -290,7 +320,6 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
nExtSubType = DI_SUB_TIME;
USHORT nOldType = 0;
- USHORT nNewType = 0;
BOOL bEnable = FALSE;
BOOL bOneArea = FALSE;
@@ -312,7 +341,6 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
bOneArea = TRUE;
break;
}
-
if (!nNewType)
{
aFormatLB.Clear();
@@ -334,7 +362,7 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
if (IsFldEdit())
{
nPos = aSelectionLB.GetSelectEntryPos();
- if (nPos != LISTBOX_ENTRY_NOTFOUND)
+ if (nPos != LISTBOX_ENTRY_NOTFOUND )
{
nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
@@ -346,7 +374,6 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
SwWrtShell *pSh = GetWrtShell();
if(pSh)
{
-
SvNumberFormatter* pFormatter = pSh->GetNumberFormatter();
LanguageType eLang = aFormatLB.GetCurLanguage();
if (nNewType == NUMBERFORMAT_DATE)
@@ -358,6 +385,10 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
aFormatLB.SetDefFormat(nFormat);
}
}
+ else if( (nSubType == DI_CUSTOM) && (nNewType != 0) )
+ {
+ aFormatLB.SetDefFormat(nFormat);
+ }
}
aFormatLB.Enable(bEnable);
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 2b72b1aec33a..20f9ebf3b786 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddinf.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,15 +30,16 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/group.hxx>
#include <svtools/svtreebx.hxx>
#include "numfmtlb.hxx"
#include "fldpage.hxx"
+namespace com{namespace sun{ namespace star{ namespace beans{
+ class XPropertySet;
+}}}}
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
@@ -57,7 +55,7 @@ class SwFldDokInfPage : public SwFldPage
CheckBox aFixedCB;
SvLBoxEntry* pSelEntry;
- com::sun::star::uno::Sequence < ::rtl::OUString > aPropertyNames;
+ com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > xCustomPropertySet;
String aInfoStr;
diff --git a/sw/source/ui/fldui/flddinf.src b/sw/source/ui/fldui/flddinf.src
index ce8f3bb2bcfe..8a3e86c4548b 100644
--- a/sw/source/ui/fldui/flddinf.src
+++ b/sw/source/ui/fldui/flddinf.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddinf.src,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index f2c22682690a..12d71b6f4577 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddok.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -56,7 +53,7 @@
#include <view.hxx>
#endif
#include <wrtsh.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#include <index.hrc>
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index bfe352a0c79b..bd46111c0b8e 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddok.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/flddok.src b/sw/source/ui/fldui/flddok.src
index a4305841cc68..f566ab716362 100644
--- a/sw/source/ui/fldui/flddok.src
+++ b/sw/source/ui/fldui/flddok.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: flddok.src,v $
- * $Revision: 1.25 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index c0ee8f2e0a98..47c97f34ce99 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldedt.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -226,15 +223,15 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup)
uno::Reference< beans::XPropertySet > xUDProps(
xDocProps->getUserDefinedProperties(),
uno::UNO_QUERY_THROW);
- uno::Reference< beans::XPropertySetInfo > xSetInfo
- = xUDProps->getPropertySetInfo();
- const uno::Sequence< beans::Property > props
- = xSetInfo->getProperties();
- uno::Sequence< ::rtl::OUString > names(props.getLength());
- for (sal_Int32 i = 0; i < props.getLength(); ++i) {
- names[i] = props[i].Name;
- }
- pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(names) ) );
+// uno::Reference< beans::XPropertySetInfo > xSetInfo
+// = xUDProps->getPropertySetInfo();
+// const uno::Sequence< beans::Property > props
+// = xSetInfo->getProperties();
+// uno::Sequence< ::rtl::OUString > names(props.getLength());
+// for (sal_Int32 i = 0; i < props.getLength(); ++i) {
+// names[i] = props[i].Name;
+// }
+ pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) );
pTabPage = SwFldDokInfPage::Create(this, *pSet);
nHelpId = HID_EDIT_FLD_DOKINF;
break;
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 8603497ecaca..ae05a35681a7 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldfunc.cxx,v $
- * $Revision: 1.22.214.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index fd658dd3a9bc..7a63385a5935 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldfunc.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldfunc.src b/sw/source/ui/fldui/fldfunc.src
index 4744d2ef8c02..312299fac02d 100644
--- a/sw/source/ui/fldui/fldfunc.src
+++ b/sw/source/ui/fldui/fldfunc.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldfunc.src,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index dfb7823a1216..3499c8875093 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldmgr.cxx,v $
- * $Revision: 1.53 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <cmdid.h>
#include <hintids.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
@@ -45,21 +42,21 @@
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
#include <comphelper/processfactory.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <unotools/localedatawrapper.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/app.hxx>
#include <basic/basmgr.hxx>
-#include <svx/langitem.hxx>
-#include <svtools/macitem.hxx>
+#include <editeng/langitem.hxx>
+#include <svl/macitem.hxx>
#include <basic/sbmod.hxx>
#include <fmtrfmrk.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbx.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <vcl/mnemonic.hxx>
#include <view.hxx>
#include <wrtsh.hxx> // Actives Fenster
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index a13f2d6b5806..39a6a98d764b 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldpage.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <vcl/lstbox.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/request.hxx>
#include <svx/htmlmode.hxx>
#include <dbfld.hxx>
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 928ecfd479bb..f2dc85e07f7c 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldpage.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index b288d51cf520..1c7ff9e09564 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldref.cxx,v $
- * $Revision: 1.12.214.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index 81db5669c2f7..0facb24bf823 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldref.hxx,v $
- * $Revision: 1.4.214.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldref.src b/sw/source/ui/fldui/fldref.src
index 0efa0e62c84f..847c9358db69 100644
--- a/sw/source/ui/fldui/fldref.src
+++ b/sw/source/ui/fldui/fldref.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldref.src,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 0de17286fcad..308bc379d4f4 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldtdlg.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -48,47 +45,23 @@
#include <vcl/msgbox.hxx>
#include <svx/htmlmode.hxx>
#include <viewopt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <fldwrap.hxx>
-#ifndef _FLDDB_HXX
#include <flddb.hxx>
-#endif
-#ifndef _FLDDINF_HXX
#include <flddinf.hxx>
-#endif
-#ifndef _FLDVAR_HXX
#include <fldvar.hxx>
-#endif
-#ifndef _FLDDOK_HXX
#include <flddok.hxx>
-#endif
-#ifndef _FLDFUNC_HXX
#include <fldfunc.hxx>
-#endif
-#ifndef _FLDREF_HXX
#include <fldref.hxx>
-#endif
#include <wrtsh.hxx>
#include <view.hxx>
-#ifndef _FLDTDLG_HXX
#include <fldtdlg.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
@@ -245,15 +218,7 @@ SfxItemSet* SwFldDlg::CreateInputItemSet( USHORT nID )
uno::Reference< beans::XPropertySet > xUDProps(
xDocProps->getUserDefinedProperties(),
uno::UNO_QUERY_THROW);
- uno::Reference< beans::XPropertySetInfo > xSetInfo
- = xUDProps->getPropertySetInfo();
- const uno::Sequence< beans::Property > props
- = xSetInfo->getProperties();
- uno::Sequence< ::rtl::OUString > names(props.getLength());
- for (sal_Int32 i = 0; i < props.getLength(); ++i) {
- names[i] = props[i].Name;
- }
- pISet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(names) ) );
+ pISet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) );
return pISet;
}
else
diff --git a/sw/source/ui/fldui/fldtdlg.hrc b/sw/source/ui/fldui/fldtdlg.hrc
index 18c1bec70211..221b943779c0 100644
--- a/sw/source/ui/fldui/fldtdlg.hrc
+++ b/sw/source/ui/fldui/fldtdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldtdlg.hrc,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldtdlg.src b/sw/source/ui/fldui/fldtdlg.src
index fbf5b5d1f082..3034146466e3 100644
--- a/sw/source/ui/fldui/fldtdlg.src
+++ b/sw/source/ui/fldui/fldtdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldtdlg.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldui.src b/sw/source/ui/fldui/fldui.src
index 23c96443cb85..7fb6a2e730c8 100644
--- a/sw/source/ui/fldui/fldui.src
+++ b/sw/source/ui/fldui/fldui.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldui.src,v $
- * $Revision: 1.57 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index fac8f7943317..6aee7bba2cf3 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldvar.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -52,7 +49,7 @@
#include <fldvar.hxx>
#endif
#include <calc.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index cd3a65cce71a..dd4665198589 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldvar.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldvar.src b/sw/source/ui/fldui/fldvar.src
index 9718eab6abc0..7405a2956849 100644
--- a/sw/source/ui/fldui/fldvar.src
+++ b/sw/source/ui/fldui/fldvar.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldvar.src,v $
- * $Revision: 1.28 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/fldwrap.cxx b/sw/source/ui/fldui/fldwrap.cxx
index 8740dac27391..18f291d5b6e6 100644
--- a/sw/source/ui/fldui/fldwrap.cxx
+++ b/sw/source/ui/fldui/fldwrap.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldwrap.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index e77054a3e9b8..46c05c4ac63b 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inpdlg.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,7 +40,7 @@
#include <vcl/msgbox.hxx>
#endif
#include <unotools/charclass.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <wrtsh.hxx>
#include <fldbas.hxx>
#include <expfld.hxx>
diff --git a/sw/source/ui/fldui/inpdlg.hrc b/sw/source/ui/fldui/inpdlg.hrc
index 5b07b5cf5c04..bbd04c092010 100644
--- a/sw/source/ui/fldui/inpdlg.hrc
+++ b/sw/source/ui/fldui/inpdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inpdlg.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/inpdlg.src b/sw/source/ui/fldui/inpdlg.src
index c151c6b9c3d0..8b60525dfe5c 100644
--- a/sw/source/ui/fldui/inpdlg.src
+++ b/sw/source/ui/fldui/inpdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inpdlg.src,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 14cc6e4f540e..443bc075b7db 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: javaedit.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,7 +43,7 @@
#include <vcl/msgbox.hxx>
#endif
#include <vcl/svapp.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#ifndef _VIEW_HXX
#include <view.hxx>
#endif
diff --git a/sw/source/ui/fldui/javaedit.hrc b/sw/source/ui/fldui/javaedit.hrc
index ed0832084380..d7448936d4cb 100644
--- a/sw/source/ui/fldui/javaedit.hrc
+++ b/sw/source/ui/fldui/javaedit.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: javaedit.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src
index b6f1c6f84a14..45dbf468e7ae 100644
--- a/sw/source/ui/fldui/javaedit.src
+++ b/sw/source/ui/fldui/javaedit.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: javaedit.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fldui/makefile.mk b/sw/source/ui/fldui/makefile.mk
index a94fdaef17e7..ee9dbff9cf7e 100644
--- a/sw/source/ui/fldui/makefile.mk
+++ b/sw/source/ui/fldui/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.11 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -80,6 +76,7 @@ SLOFILES = \
EXCEPTIONSFILES = \
$(SLO)$/fldtdlg.obj \
$(SLO)$/fldedt.obj \
+ $(SLO)$/flddinf.obj \
$(SLO)$/xfldui.obj
LIB1TARGET = $(SLB)$/$(TARGET).lib
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index a295226eff01..a86a78943711 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: xfldui.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fmtui/fmtui.src b/sw/source/ui/fmtui/fmtui.src
index 841a378dd9b4..63067902178f 100644
--- a/sw/source/ui/fmtui/fmtui.src
+++ b/sw/source/ui/fmtui/fmtui.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmtui.src,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fmtui/makefile.mk b/sw/source/ui/fmtui/makefile.mk
index 208608c1f93b..37ad48df008e 100644
--- a/sw/source/ui/fmtui/makefile.mk
+++ b/sw/source/ui/fmtui/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 4c6f35341e30..6f62f65c6b87 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tmpdlg.cxx,v $
- * $Revision: 1.25 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -40,15 +37,15 @@
#ifndef _SVSTDARR_STRINGSSORTDTOR
#define _SVSTDARR_STRINGSSORTDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <vcl/msgbox.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/hdft2.hxx>
-#include <svx/flstitem.hxx>
+#include <editeng/flstitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/htmlcfg.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svtools/htmlcfg.hxx>
+#include <svl/cjkoptions.hxx>
#include <numpara.hxx>
#include <fmtclds.hxx>
#include <swtypes.hxx>
@@ -95,11 +92,11 @@
#endif
#include <SwStyleNameMapper.hxx>
#include <svx/svxids.hrc>
-#include <svtools/stritem.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/slstitm.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/slstitm.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include <svx/flagsdef.hxx>
diff --git a/sw/source/ui/fmtui/tmpdlg.src b/sw/source/ui/fmtui/tmpdlg.src
index d038a59ace20..da2479717373 100644
--- a/sw/source/ui/fmtui/tmpdlg.src
+++ b/sw/source/ui/fmtui/tmpdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tmpdlg.src,v $
- * $Revision: 1.52 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index 4b7a12868328..2cdc9fb014f0 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: colex.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,13 +36,13 @@
#include <algorithm>
-#include <svtools/eitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/sizeitem.hxx>
+#include <svl/eitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <svx/pageitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/graph.hxx>
#include <tgrditem.hxx>
diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx
index 06af4061fe83..0e18946af778 100644
--- a/sw/source/ui/frmdlg/colmgr.cxx
+++ b/sw/source/ui/frmdlg/colmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: colmgr.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
#include "hintids.hxx"
-#include <svx/lrspitem.hxx>
+#include <editeng/lrspitem.hxx>
#include "frmmgr.hxx"
#include "frmfmt.hxx"
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index a9df9762ad92..eb067cc61c71 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: column.cxx,v $
- * $Revision: 1.37 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,12 +36,12 @@
#include "hintids.hxx"
#include <svx/htmlmode.hxx>
-#include <svx/borderline.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/sizeitem.hxx>
-#include "svx/frmdiritem.hxx"
-#include <svtools/ctloptions.hxx>
+#include <editeng/borderline.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/sizeitem.hxx>
+#include "editeng/frmdiritem.hxx"
+#include <svl/ctloptions.hxx>
#include <sfx2/dispatch.hxx>
#include <vcl/msgbox.hxx>
#include <swmodule.hxx>
@@ -125,7 +122,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
FreeResource();
SwRect aRect;
- rWrtShell.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rWrtShell.CalcBoundRect(aRect, FLY_AS_CHAR);
nSelectionWidth = aRect.Width();
diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc
index e9792891150c..dd8b81e0c91a 100644
--- a/sw/source/ui/frmdlg/column.hrc
+++ b/sw/source/ui/frmdlg/column.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: column.hrc,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src
index 336b100fd72e..7f260501cbbe 100644
--- a/sw/source/ui/frmdlg/column.src
+++ b/sw/source/ui/frmdlg/column.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: column.src,v $
- * $Revision: 1.55 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 09e06684f4b8..5e620ce6955c 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cption.cxx,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/cption.hrc b/sw/source/ui/frmdlg/cption.hrc
index 869d7b15d5f8..1487171f0c01 100644
--- a/sw/source/ui/frmdlg/cption.hrc
+++ b/sw/source/ui/frmdlg/cption.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cption.hrc,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src
index c113f745a8bd..34c11633f815 100644
--- a/sw/source/ui/frmdlg/cption.src
+++ b/sw/source/ui/frmdlg/cption.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cption.src,v $
- * $Revision: 1.44 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index c4b463baa297..42b1fb1bed5f 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmdlg.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index bd1e98b37b9e..302baebd0362 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmmgr.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,19 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "cmdid.h"
#include "hintids.hxx"
-
-#include <svtools/stritem.hxx>
-#include <svx/protitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/opaqitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/shaditem.hxx>
+#include <svl/stritem.hxx>
+#include <editeng/protitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/opaqitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/shaditem.hxx>
#include <svx/swframevalidation.hxx>
#include <fmtclds.hxx>
#include "wrtsh.hxx"
@@ -212,11 +206,11 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
const Size &rSize,
BOOL bAbs )
{
- ASSERT( eAnchorType == FLY_PAGE ||
- eAnchorType == FLY_AT_CNTNT ||
- eAnchorType == FLY_AUTO_CNTNT ||
- eAnchorType == FLY_AT_FLY ||
- eAnchorType == FLY_IN_CNTNT, "Rahmentyp nicht erlaubt" );
+ ASSERT( eAnchorType == FLY_AT_PAGE ||
+ eAnchorType == FLY_AT_PARA ||
+ eAnchorType == FLY_AT_CHAR ||
+ eAnchorType == FLY_AT_FLY ||
+ eAnchorType == FLY_AS_CHAR, "invalid frame type" );
if ( bAbs )
SetAbsPos( rPos );
@@ -238,8 +232,8 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) );
- if( FLY_PAGE == eId || FLY_AT_CNTNT == eId || FLY_AUTO_CNTNT == eId
- || FLY_AT_FLY == eId )
+ if ((FLY_AT_PAGE == eId) || (FLY_AT_PARA == eId) || (FLY_AT_CHAR == eId)
+ || (FLY_AT_FLY == eId))
{
SwFmtVertOrient aVertOrient( GetVertOrient() );
SwFmtHoriOrient aHoriOrient( GetHoriOrient() );
@@ -319,7 +313,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nWidth = rVal.nHeight;
rVal.nHeight = nTmp;
}
- if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY )
+ if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY))
{
// MinimalPosition
rVal.nMinHPos = aBoundRect.Left();
@@ -369,8 +363,8 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
}
// OD 12.11.2003 #i22341# - handle to character anchored objects vertical
// aligned at character or top of line in a special case
- else if ( eAnchorType == FLY_AT_CNTNT ||
- ( eAnchorType == FLY_AUTO_CNTNT &&
+ else if ((eAnchorType == FLY_AT_PARA) ||
+ ((eAnchorType == FLY_AT_CHAR) &&
!(rVal.nVRelOrient == text::RelOrientation::CHAR) &&
!(rVal.nVRelOrient == text::RelOrientation::TEXT_LINE) ) )
{
@@ -437,7 +431,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
// vertical aligned at character or top of line.
// Note: (1) positive vertical values are positions above the top of line
// (2) negative vertical values are positions below the top of line
- else if ( eAnchorType == FLY_AUTO_CNTNT &&
+ else if ( (eAnchorType == FLY_AT_CHAR) &&
( rVal.nVRelOrient == text::RelOrientation::CHAR ||
rVal.nVRelOrient == text::RelOrientation::TEXT_LINE ) )
{
@@ -484,7 +478,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nMaxHeight = aBoundRect.Height();
}
}
- else if ( eAnchorType == FLY_IN_CNTNT )
+ else if ( eAnchorType == FLY_AS_CHAR )
{
rVal.nMinHPos = 0;
rVal.nMaxHPos = 0;
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index dc9fe2d1bf2e..5bff86b1a4c7 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmpage.cxx,v $
- * $Revision: 1.67 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,26 +34,21 @@
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <hintids.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/stritem.hxx>
-#include <svx/impgrf.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/stritem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/opaqitem.hxx>
-#include <svx/protitem.hxx>
-#include <svx/prntitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/opaqitem.hxx>
+#include <editeng/protitem.hxx>
+#include <editeng/prntitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <svx/swframevalidation.hxx>
#include <sot/clsids.hxx>
@@ -68,9 +60,7 @@
#include <wrtsh.hxx>
#include <swmodule.hxx>
#include <uitool.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <viewopt.hxx>
#include <frmatr.hxx>
#include <frmdlg.hxx>
@@ -83,17 +73,14 @@
// OD 19.09.2003 #i18732#
#include <fmtfollowtextflow.hxx>
-#ifndef _FRMUI_HRC
#include <frmui.hrc>
-#endif
-#ifndef _FRMPAGE_HRC
#include <frmpage.hrc>
-#endif
#include <sfx2/filedlghelper.hxx>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
+#include <svtools/filter.hxx>
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -881,10 +868,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
// Allgemeiner Initialisierungteil
switch(rAnchor.GetAnchorId())
{
- case FLY_PAGE: aAnchorAtPageRB.Check(); break;
- case FLY_AT_CNTNT: aAnchorAtParaRB.Check(); break;
- case FLY_AUTO_CNTNT: aAnchorAtCharRB.Check(); break;
- case FLY_IN_CNTNT: aAnchorAsCharRB.Check(); break;
+ case FLY_AT_PAGE: aAnchorAtPageRB.Check(); break;
+ case FLY_AT_PARA: aAnchorAtParaRB.Check(); break;
+ case FLY_AT_CHAR: aAnchorAtCharRB.Check(); break;
+ case FLY_AS_CHAR: aAnchorAsCharRB.Check(); break;
case FLY_AT_FLY: aAnchorAtFrameRB.Check();break;
default:; //prevent warning
}
@@ -911,7 +898,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
}
if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))
{
- if(GetAnchor() == FLY_PAGE)
+ if (GetAnchor() == FLY_AT_PAGE)
{
aAnchorAtParaRB.Check();
}
@@ -1048,8 +1035,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
// Vertikale Position
// fuer zeichengebundene Rahmen Offset umrechenen
SwTwips nY = static_cast< SwTwips >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP)));
- if (eAnchorId == FLY_IN_CNTNT)
+ if (eAnchorId == FLY_AS_CHAR)
+ {
nY *= -1;
+ }
aVertOrient.SetPos( nY );
}
pOldItem = GetOldItem(rSet, FN_VERT_ORIENT);
@@ -1188,7 +1177,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
}
BOOL bEnable = TRUE;
- if ( eId == FLY_PAGE )
+ if ( eId == FLY_AT_PAGE )
{
pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap;
pHMap = bHtmlMode ? aHPageHtmlMap : aHPageMap;
@@ -1200,7 +1189,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pVMap = bHtmlMode ? aVFlyHtmlMap : aVFrameMap;
pHMap = bHtmlMode ? aHFlyHtmlMap : aHFrameMap;
}
- else if ( eId == FLY_AT_CNTNT )
+ else if ( eId == FLY_AT_PARA )
{
if(bHtmlMode)
{
@@ -1213,7 +1202,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pHMap = aHParaMap;
}
}
- else if ( eId == FLY_AUTO_CNTNT )
+ else if ( eId == FLY_AT_CHAR )
{
if(bHtmlMode)
{
@@ -1226,7 +1215,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pHMap = aHCharMap;
}
}
- else if ( eId == FLY_IN_CNTNT )
+ else if ( eId == FLY_AS_CHAR )
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
pHMap = 0;
@@ -1257,7 +1246,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
FillRelLB(pVMap, nMapPos, nV, nVRel, aVertRelationLB, aVertRelationFT);
// Edits init
- bEnable = nH == text::HoriOrientation::NONE && eId != FLY_IN_CNTNT;//#61359# warum nicht in Formaten&& !bFormat;
+ bEnable = nH == text::HoriOrientation::NONE && eId != FLY_AS_CHAR;
if (!bEnable)
{
aAtHorzPosED.SetValue( 0, FUNIT_TWIP );
@@ -1281,7 +1270,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
}
else
{
- if ( eId == FLY_IN_CNTNT )
+ if ( eId == FLY_AS_CHAR )
{
if ( nY == LONG_MAX )
nY = 0;
@@ -1608,15 +1597,23 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
RndStdIds SwFrmPage::GetAnchor()
{
- RndStdIds nRet = FLY_PAGE;
+ RndStdIds nRet = FLY_AT_PAGE;
if(aAnchorAtParaRB.IsChecked())
- nRet = FLY_AT_CNTNT;
+ {
+ nRet = FLY_AT_PARA;
+ }
else if(aAnchorAtCharRB.IsChecked())
- nRet = FLY_AUTO_CNTNT;
+ {
+ nRet = FLY_AT_CHAR;
+ }
else if(aAnchorAsCharRB.IsChecked())
- nRet = FLY_IN_CNTNT;
+ {
+ nRet = FLY_AS_CHAR;
+ }
else if(aAnchorAtFrameRB.IsChecked())
+ {
nRet = FLY_AT_FLY;
+ }
return nRet;
}
@@ -1818,8 +1815,10 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( aVal.nHPos != nAtHorzPosVal )
aAtHorzPosED.SetValue(aAtHorzPosED.Normalize(aVal.nHPos), FUNIT_TWIP);
- SwTwips nUpperOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nUpperBorder : 0;
- SwTwips nLowerOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nLowerBorder : 0;
+ const SwTwips nUpperOffset = (aVal.nAnchorType == FLY_AS_CHAR)
+ ? nUpperBorder : 0;
+ const SwTwips nLowerOffset = (aVal.nAnchorType == FLY_AS_CHAR)
+ ? nLowerBorder : 0;
aAtVertPosED.SetMin(aAtVertPosED.Normalize(aVal.nMinVPos + nLowerOffset + nUpperOffset), FUNIT_TWIP);
aAtVertPosED.SetMax(aAtVertPosED.Normalize(aVal.nMaxVPos), FUNIT_TWIP);
@@ -1905,7 +1904,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
// Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten
if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS &&
- FLY_AUTO_CNTNT == (RndStdIds)GetAnchor())
+ (FLY_AT_CHAR == GetAnchor()))
{
BOOL bSet = FALSE;
if(bHori)
@@ -1977,7 +1976,7 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
else
bAtVertPosModified = TRUE;
- if(bHtmlMode && FLY_AUTO_CNTNT == (RndStdIds)GetAnchor()) // wieder Sonderbehandlung
+ if (bHtmlMode && (FLY_AT_CHAR == GetAnchor()))
{
if(bHori)
{
@@ -2219,7 +2218,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
nOldV = rVert.GetVertOrient(),
nOldVRel = rVert.GetRelationOrient();
- if (eAnchorId == FLY_PAGE)
+ if (eAnchorId == FLY_AT_PAGE)
{
if (nOldHRel == text::RelOrientation::FRAME)
nOldHRel = text::RelOrientation::PAGE_FRAME;
@@ -2551,7 +2550,7 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
aBmpWin.MirrorVert(FALSE);
Graphic aGraphic;
- ::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic );
+ GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic );
aBmpWin.SetGraphic(aGraphic);
BOOL bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
diff --git a/sw/source/ui/frmdlg/frmpage.hrc b/sw/source/ui/frmdlg/frmpage.hrc
index 6b8efb1dd1f6..044d2fdd4e05 100644
--- a/sw/source/ui/frmdlg/frmpage.hrc
+++ b/sw/source/ui/frmdlg/frmpage.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmpage.hrc,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src
index eb1e06090a08..20a2d1702a46 100644
--- a/sw/source/ui/frmdlg/frmpage.src
+++ b/sw/source/ui/frmdlg/frmpage.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmpage.src,v $
- * $Revision: 1.67.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/frmui.src b/sw/source/ui/frmdlg/frmui.src
index 119aa181732e..5e3abb1286e4 100644
--- a/sw/source/ui/frmdlg/frmui.src
+++ b/sw/source/ui/frmdlg/frmui.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmui.src,v $
- * $Revision: 1.39 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/makefile.mk b/sw/source/ui/frmdlg/makefile.mk
index 10493732fb02..a7addb0b9493 100644
--- a/sw/source/ui/frmdlg/makefile.mk
+++ b/sw/source/ui/frmdlg/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.15 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx
index 634096c74676..9b2de83e8f59 100644
--- a/sw/source/ui/frmdlg/pattern.cxx
+++ b/sw/source/ui/frmdlg/pattern.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pattern.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/pattern.hrc b/sw/source/ui/frmdlg/pattern.hrc
index a7ccd89666e9..f9eabe9bb3c5 100644
--- a/sw/source/ui/frmdlg/pattern.hrc
+++ b/sw/source/ui/frmdlg/pattern.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pattern.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
index fe1733b34fcc..2add324b61ee 100644
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ b/sw/source/ui/frmdlg/uiborder.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uiborder.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,10 +35,10 @@
#include <svx/svxdlg.hxx>
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svx/flagsdef.hxx>
#include <sfx2/tabdlg.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include "swtypes.hxx"
#include "uiborder.hxx"
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index b3828797fc07..b313ebd530eb 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrap.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,15 +33,14 @@
#endif
-
#include "hintids.hxx"
#include <vcl/graph.hxx>
#include <svx/htmlmode.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/intitem.hxx>
-#include <svx/opaqitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/lrspitem.hxx>
+#include <svl/intitem.hxx>
+#include <editeng/opaqitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/lrspitem.hxx>
// OD 18.09.2003 #i18732#
#include <fmtfollowtextflow.hxx>
#include <svx/swframevalidation.hxx>
@@ -141,7 +137,7 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
aWrapIL (SW_RES(IL_WRAP)),
aWrapILH (SW_RES(ILH_WRAP)),
- nAnchorId(FLY_AT_CNTNT),
+ nAnchorId(FLY_AT_PARA),
nHtmlMode(0),
pWrtSh(0),
@@ -254,10 +250,15 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- if ( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) && nSur != SURROUND_NONE )
+ if (((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
+ && (nSur != SURROUND_NONE))
+ {
aWrapAnchorOnlyCB.Check( rSurround.IsAnchorOnly() );
+ }
else
+ {
aWrapAnchorOnlyCB.Enable( FALSE );
+ }
BOOL bContour = rSurround.IsContour();
aWrapOutlineCB.Check( bContour );
@@ -452,7 +453,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Anchor
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- BOOL bEnable = nAnchorId != FLY_IN_CNTNT;
+ BOOL bEnable = (nAnchorId != FLY_AS_CHAR);
if (!bDrawMode)
{
@@ -521,7 +522,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
}
else
{
- if (aVal.nAnchorType == FLY_IN_CNTNT)
+ if (aVal.nAnchorType == FLY_AS_CHAR)
{
nLeft = nRight;
@@ -566,7 +567,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
aWrapOutlineCB.Hide();
- BOOL bAllHtmlModes = (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) &&
+ const bool bAllHtmlModes =
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE );
aWrapOutsideCB.Hide();
@@ -574,17 +576,26 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aWrapTransparentCB.Enable( FALSE );
- aNoWrapRB.Enable( FLY_AT_CNTNT == nAnchorId );
+ aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId );
aWrapParallelRB.Enable( FALSE );
- aWrapLeftRB .Enable( FLY_AT_CNTNT == nAnchorId ||
- (FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::RIGHT && eHRelOrient == text::RelOrientation::PRINT_AREA));
- aWrapRightRB .Enable( FLY_AT_CNTNT == nAnchorId ||
- ( FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::LEFT && eHRelOrient == text::RelOrientation::PRINT_AREA));
-
- aWrapThroughRB.Enable( (FLY_PAGE == nAnchorId ||
- (FLY_AUTO_CNTNT == nAnchorId && eHRelOrient != text::RelOrientation::PRINT_AREA) || FLY_AT_CNTNT == nAnchorId )
- && bSomeAbsPos &&
- eHOrient != text::HoriOrientation::RIGHT);
+ aWrapLeftRB .Enable
+ ( (FLY_AT_PARA == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHOrient == text::HoriOrientation::RIGHT)
+ && (eHRelOrient == text::RelOrientation::PRINT_AREA)));
+ aWrapRightRB .Enable
+ ( (FLY_AT_PARA == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHOrient == text::HoriOrientation::LEFT)
+ && (eHRelOrient == text::RelOrientation::PRINT_AREA)));
+
+ aWrapThroughRB.Enable
+ ( ( (FLY_AT_PAGE == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHRelOrient != text::RelOrientation::PRINT_AREA))
+ || (FLY_AT_PARA == nAnchorId))
+ && bSomeAbsPos
+ && (eHOrient != text::HoriOrientation::RIGHT));
if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled())
{
if(aWrapThroughRB.IsEnabled())
@@ -624,7 +635,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aIdealWrapRB.Enable( bEnable );
aWrapThroughRB.Enable( bEnable );
aWrapParallelRB.Enable( bEnable );
- aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT)
+ aWrapAnchorOnlyCB.Enable(
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
&& nSur != SURROUND_NONE );
}
ContourHdl(0);
@@ -693,10 +705,11 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
{
BOOL bWrapThrough = (pBtn == &aWrapThroughRB);
aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode );
- bWrapThrough |= ( nAnchorId == FLY_IN_CNTNT );
+ bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB);
aWrapOutsideCB.Enable( !bWrapThrough && aWrapOutlineCB.IsChecked() );
- aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) &&
+ aWrapAnchorOnlyCB.Enable(
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
(pBtn != &aNoWrapRB) );
ContourHdl(0);
diff --git a/sw/source/ui/frmdlg/wrap.hrc b/sw/source/ui/frmdlg/wrap.hrc
index a074d2e0cee3..be19dbe702c2 100644
--- a/sw/source/ui/frmdlg/wrap.hrc
+++ b/sw/source/ui/frmdlg/wrap.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrap.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src
index 5421aa8c02ce..bd779308178d 100644
--- a/sw/source/ui/frmdlg/wrap.src
+++ b/sw/source/ui/frmdlg/wrap.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrap.src,v $
- * $Revision: 1.38 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/globdoc/globdoc.cxx b/sw/source/ui/globdoc/globdoc.cxx
index ae2c98507bbe..a4572f0a16da 100644
--- a/sw/source/ui/globdoc/globdoc.cxx
+++ b/sw/source/ui/globdoc/globdoc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: globdoc.cxx,v $
- * $Revision: 1.16.146.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
#include <sot/clsids.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <unomid.h>
diff --git a/sw/source/ui/globdoc/globdoc.src b/sw/source/ui/globdoc/globdoc.src
index d88ec5c276d5..80cd202da1d3 100644
--- a/sw/source/ui/globdoc/globdoc.src
+++ b/sw/source/ui/globdoc/globdoc.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: globdoc.src,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/globdoc/makefile.mk b/sw/source/ui/globdoc/makefile.mk
index 2a63b210da37..d75eb7af8807 100644
--- a/sw/source/ui/globdoc/makefile.mk
+++ b/sw/source/ui/globdoc/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/DropDownFieldDialog.hxx b/sw/source/ui/inc/DropDownFieldDialog.hxx
index 663e6078bacc..26b01ae4accb 100644
--- a/sw/source/ui/inc/DropDownFieldDialog.hxx
+++ b/sw/source/ui/inc/DropDownFieldDialog.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: DropDownFieldDialog.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index ae79a41343fe..3ab86b3469d7 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwSpellDialogChildWindow.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/SwXFilterOptions.hxx b/sw/source/ui/inc/SwXFilterOptions.hxx
index a8d4486187ba..c1dcc3676447 100644
--- a/sw/source/ui/inc/SwXFilterOptions.hxx
+++ b/sw/source/ui/inc/SwXFilterOptions.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwXFilterOptions.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/abstract.hxx b/sw/source/ui/inc/abstract.hxx
index d00ea25b8b3f..6700212aa0c3 100644
--- a/sw/source/ui/inc/abstract.hxx
+++ b/sw/source/ui/inc/abstract.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: abstract.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/actctrl.hxx b/sw/source/ui/inc/actctrl.hxx
index 789d6883c29a..d1e9a3d82907 100644
--- a/sw/source/ui/inc/actctrl.hxx
+++ b/sw/source/ui/inc/actctrl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: actctrl.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/addrdlg.hxx b/sw/source/ui/inc/addrdlg.hxx
index f36405c03142..9e8370d1e2fc 100644
--- a/sw/source/ui/inc/addrdlg.hxx
+++ b/sw/source/ui/inc/addrdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: addrdlg.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/annotsh.hxx b/sw/source/ui/inc/annotsh.hxx
index e6498ec24ce6..979e1374e004 100755
--- a/sw/source/ui/inc/annotsh.hxx
+++ b/sw/source/ui/inc/annotsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: annotsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc
index fcca0b6ceaf7..edf7014a4e4f 100644
--- a/sw/source/ui/inc/app.hrc
+++ b/sw/source/ui/inc/app.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: app.hrc,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/ascfldlg.hxx b/sw/source/ui/inc/ascfldlg.hxx
index 0ddc2bdf3841..18eb19228fee 100644
--- a/sw/source/ui/inc/ascfldlg.hxx
+++ b/sw/source/ui/inc/ascfldlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ascfldlg.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/autoedit.hxx b/sw/source/ui/inc/autoedit.hxx
index c92451dfee88..535bc04bf9ca 100644
--- a/sw/source/ui/inc/autoedit.hxx
+++ b/sw/source/ui/inc/autoedit.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: autoedit.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/barcfg.hxx b/sw/source/ui/inc/barcfg.hxx
index 05b92671ba77..6b88039eddbe 100644
--- a/sw/source/ui/inc/barcfg.hxx
+++ b/sw/source/ui/inc/barcfg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: barcfg.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,7 +38,8 @@ public:
SwToolbarConfigItem( sal_Bool bWeb );
~SwToolbarConfigItem();
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
void SetTopToolbar( sal_Int32 nSelType, sal_Int32 nBarId );
};
diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx
index b5ecd678d380..8c8b6eb98b7a 100644
--- a/sw/source/ui/inc/basesh.hxx
+++ b/sw/source/ui/inc/basesh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: basesh.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,7 +36,7 @@
#include <vcl/timer.hxx>
#include <sfx2/module.hxx>
#include <sfx2/shell.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <mdiexp.hxx>
diff --git a/sw/source/ui/inc/beziersh.hxx b/sw/source/ui/inc/beziersh.hxx
index aabfdbb0d44e..c9c88adb441e 100644
--- a/sw/source/ui/inc/beziersh.hxx
+++ b/sw/source/ui/inc/beziersh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: beziersh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/bmpwin.hxx b/sw/source/ui/inc/bmpwin.hxx
index 51ebeb4f6530..e09ae625534d 100644
--- a/sw/source/ui/inc/bmpwin.hxx
+++ b/sw/source/ui/inc/bmpwin.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bmpwin.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/bookctrl.hxx b/sw/source/ui/inc/bookctrl.hxx
index c4e598b482cf..a41fb5262e64 100644
--- a/sw/source/ui/inc/bookctrl.hxx
+++ b/sw/source/ui/inc/bookctrl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bookctrl.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index 8bd83c4ad4b0..29c3173787a9 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bookmark.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx
index d8a69f91cd27..447afd8ca567 100644
--- a/sw/source/ui/inc/break.hxx
+++ b/sw/source/ui/inc/break.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: break.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx
index e540ec2320fb..c56f70364596 100644
--- a/sw/source/ui/inc/caption.hxx
+++ b/sw/source/ui/inc/caption.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: caption.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/cfgdesc.hxx b/sw/source/ui/inc/cfgdesc.hxx
index f3216ef8cba0..81732b05c208 100644
--- a/sw/source/ui/inc/cfgdesc.hxx
+++ b/sw/source/ui/inc/cfgdesc.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cfgdesc.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/cfgid.h b/sw/source/ui/inc/cfgid.h
index 74929517c22f..71f061e7b094 100644
--- a/sw/source/ui/inc/cfgid.h
+++ b/sw/source/ui/inc/cfgid.h
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cfgid.h,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx
index 620d3ac52b23..d80df8672cfd 100644
--- a/sw/source/ui/inc/cfgitems.hxx
+++ b/sw/source/ui/inc/cfgitems.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cfgitems.hxx,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,7 @@
#define _CFGITEMS_HXX
#include <tools/color.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include "swdllapi.h"
#include <printdata.hxx>
@@ -39,7 +36,7 @@
class SwWriterApp;
class SwModule;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
class SwTestTabPage;
#endif
class SwAddPrinterTabPage;
@@ -155,15 +152,15 @@ public:
BOOL IsPrintProspect() const { return bPrintProspect; }
- BOOL IsPrintProspect_RTL() const { return bPrintProspect_RTL; }
+ BOOL IsPrintProspectRTL() const { return bPrintProspectRTL; }
void SetPrintProspect(BOOL bFlag ){ bPrintProspect = bFlag; }
- void SetPrintProspect_RTL(BOOL bFlag ){ bPrintProspect_RTL = bFlag; }
+ void SetPrintProspectRTL(BOOL bFlag ){ bPrintProspectRTL = bFlag; }
BOOL IsPrintGraphic () const { return bPrintGraphic; }
BOOL IsPrintTable () const { return bPrintTable; }
BOOL IsPrintDraw () const { return bPrintDraw; }
BOOL IsPrintControl () const { return bPrintControl; }
- BOOL IsPrintLeftPage () const { return bPrintLeftPage; }
- BOOL IsPrintRightPage() const { return bPrintRightPage; }
+ BOOL IsPrintLeftPage () const { return bPrintLeftPages; }
+ BOOL IsPrintRightPage() const { return bPrintRightPages; }
BOOL IsPrintReverse () const { return bPrintReverse; }
BOOL IsPaperFromSetup() const { return bPaperFromSetup; }
BOOL IsPrintEmptyPages() const { return bPrintEmptyPages; }
@@ -207,7 +204,7 @@ public:
void SetOn( BOOL bFlag ) { bOn = bFlag; }
};
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*--------OS 12.01.95 -----------------------------------
Item fuer Einstellungsdialog - Testeinstellungen
--------------------------------------------------------- */
diff --git a/sw/source/ui/inc/changedb.hxx b/sw/source/ui/inc/changedb.hxx
index 235648b91e9f..210f81907cc5 100644
--- a/sw/source/ui/inc/changedb.hxx
+++ b/sw/source/ui/inc/changedb.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: changedb.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/chartins.hxx b/sw/source/ui/inc/chartins.hxx
index 60be4d4eb159..15050f946227 100644
--- a/sw/source/ui/inc/chartins.hxx
+++ b/sw/source/ui/inc/chartins.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chartins.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/chldwrap.hxx b/sw/source/ui/inc/chldwrap.hxx
index 97f76163e183..67009b0a8d2f 100644
--- a/sw/source/ui/inc/chldwrap.hxx
+++ b/sw/source/ui/inc/chldwrap.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chldwrap.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx
index 29604cd0aa8a..85248baeed8b 100644
--- a/sw/source/ui/inc/chrdlg.hxx
+++ b/sw/source/ui/inc/chrdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chrdlg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx
index 21592624d130..852a2f705c68 100644
--- a/sw/source/ui/inc/cnttab.hxx
+++ b/sw/source/ui/inc/cnttab.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cnttab.hxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx
index eca121c4e556..39778f503d2a 100644
--- a/sw/source/ui/inc/colex.hxx
+++ b/sw/source/ui/inc/colex.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: colex.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,7 @@
#define _COLEX_HXX
#include <svx/pagectrl.hxx>
-#include <svx/paperinf.hxx>
+#include <editeng/paperinf.hxx>
#include "swdllapi.h"
#include <fmtclds.hxx>
#include "frmatr.hxx"
diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx
index ece605098232..641c48e9bb66 100644
--- a/sw/source/ui/inc/colmgr.hxx
+++ b/sw/source/ui/inc/colmgr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: colmgr.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index a8e6597cf757..1cc6ecf33cb9 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: column.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/conarc.hxx b/sw/source/ui/inc/conarc.hxx
index bb89d8c06960..4b8d01f8d5c3 100644
--- a/sw/source/ui/inc/conarc.hxx
+++ b/sw/source/ui/inc/conarc.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conarc.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/concustomshape.hxx b/sw/source/ui/inc/concustomshape.hxx
index 087dd0f827ad..5ff08952f28d 100644
--- a/sw/source/ui/inc/concustomshape.hxx
+++ b/sw/source/ui/inc/concustomshape.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: concustomshape.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx
index d2f9ba162008..bce44192ae68 100644
--- a/sw/source/ui/inc/condedit.hxx
+++ b/sw/source/ui/inc/condedit.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: condedit.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/conform.hxx b/sw/source/ui/inc/conform.hxx
index 0b8cdf590767..1117da12dc25 100644
--- a/sw/source/ui/inc/conform.hxx
+++ b/sw/source/ui/inc/conform.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conform.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/conpoly.hxx b/sw/source/ui/inc/conpoly.hxx
index 97ecb039fecc..7fc528fd4d93 100644
--- a/sw/source/ui/inc/conpoly.hxx
+++ b/sw/source/ui/inc/conpoly.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conpoly.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx
index e432d6204ae1..3490aa4d9faa 100644
--- a/sw/source/ui/inc/conrect.hxx
+++ b/sw/source/ui/inc/conrect.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conrect.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx
index 7990214d0616..bfcd31dcba87 100644
--- a/sw/source/ui/inc/content.hxx
+++ b/sw/source/ui/inc/content.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: content.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index 3ce4bb5ff9d5..d3a84b0bdb78 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conttree.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/convert.hxx b/sw/source/ui/inc/convert.hxx
index 6e550b4c9607..fc1879bc4f2d 100644
--- a/sw/source/ui/inc/convert.hxx
+++ b/sw/source/ui/inc/convert.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: convert.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/cption.hxx b/sw/source/ui/inc/cption.hxx
index a1b83c9829b1..edb8590d5c8f 100644
--- a/sw/source/ui/inc/cption.hxx
+++ b/sw/source/ui/inc/cption.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cption.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/dbconfig.hxx b/sw/source/ui/inc/dbconfig.hxx
index 9661472115f3..2e82249b84b9 100644
--- a/sw/source/ui/inc/dbconfig.hxx
+++ b/sw/source/ui/inc/dbconfig.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbconfig.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,6 +46,8 @@ public:
void Load();
const SwDBData& GetAddressSource();
const SwDBData& GetBibliographySource();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
};
#endif
diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx
index 20a3e9f5e51a..c0a530de9f3a 100644
--- a/sw/source/ui/inc/dbinsdlg.hxx
+++ b/sw/source/ui/inc/dbinsdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbinsdlg.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,7 +44,7 @@
#include <vcl/lstbox.hxx>
#include <svtools/svmedit.hxx>
#include <sfx2/basedlgs.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <unotools/configitem.hxx>
#include <numfmtlb.hxx>
#include <swdbdata.hxx>
@@ -165,8 +162,8 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
DECL_LINK( HeaderHdl, Button* );
BOOL SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, BOOL bInsField );
-
-
+ using SfxModalDialog::Notify;
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
void Load();
diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx
index d7f4112f9fdb..d6c81e2e5ce8 100644
--- a/sw/source/ui/inc/dbtree.hxx
+++ b/sw/source/ui/inc/dbtree.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbtree.hxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/dbui.hxx b/sw/source/ui/inc/dbui.hxx
index 6f8ba6e42665..2c8e9cdf02c7 100644
--- a/sw/source/ui/inc/dbui.hxx
+++ b/sw/source/ui/inc/dbui.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dbui.hxx,v $
- * $Revision: 1.5.136.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/dialmgr.hxx b/sw/source/ui/inc/dialmgr.hxx
index 3ba9ce6e0177..ebd9731c5e0a 100644
--- a/sw/source/ui/inc/dialmgr.hxx
+++ b/sw/source/ui/inc/dialmgr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dialmgr.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/docfnote.hxx b/sw/source/ui/inc/docfnote.hxx
index 10ad5b6f53a5..b3ffde863596 100644
--- a/sw/source/ui/inc/docfnote.hxx
+++ b/sw/source/ui/inc/docfnote.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docfnote.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx
index 0ecb9d76bd34..f269693975cc 100644
--- a/sw/source/ui/inc/docstdlg.hxx
+++ b/sw/source/ui/inc/docstdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docstdlg.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/drawbase.hxx b/sw/source/ui/inc/drawbase.hxx
index 1a585960fd0b..783bd730a86d 100644
--- a/sw/source/ui/inc/drawbase.hxx
+++ b/sw/source/ui/inc/drawbase.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drawbase.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/drawsh.hxx b/sw/source/ui/inc/drawsh.hxx
index 657dd8a2caab..deb0849d66a0 100644
--- a/sw/source/ui/inc/drawsh.hxx
+++ b/sw/source/ui/inc/drawsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drawsh.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/drformsh.hxx b/sw/source/ui/inc/drformsh.hxx
index 8476b92b8433..8648742b1f99 100644
--- a/sw/source/ui/inc/drformsh.hxx
+++ b/sw/source/ui/inc/drformsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drformsh.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx
index 8eb374753990..50140443f726 100644
--- a/sw/source/ui/inc/drpcps.hxx
+++ b/sw/source/ui/inc/drpcps.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drpcps.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/drwbassh.hxx b/sw/source/ui/inc/drwbassh.hxx
index 95eff6eeea60..dcdd1c1b427d 100644
--- a/sw/source/ui/inc/drwbassh.hxx
+++ b/sw/source/ui/inc/drwbassh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drwbassh.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/drwtxtsh.hxx b/sw/source/ui/inc/drwtxtsh.hxx
index e66fae112f90..79aebc4e016a 100644
--- a/sw/source/ui/inc/drwtxtsh.hxx
+++ b/sw/source/ui/inc/drwtxtsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drwtxtsh.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/dselect.hxx b/sw/source/ui/inc/dselect.hxx
index b2302eef2006..37d3d84832bb 100644
--- a/sw/source/ui/inc/dselect.hxx
+++ b/sw/source/ui/inc/dselect.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dselect.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index 2b39b928bca6..b70a3f75aa96 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: edtwin.hxx,v $
- * $Revision: 1.32 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,7 +35,7 @@
#include <swevent.hxx>
#define _SVSTDARR_STRINGSISORTDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
class SwWrtShell;
class SwView;
diff --git a/sw/source/ui/inc/envimg.hxx b/sw/source/ui/inc/envimg.hxx
index ce7d3ffcc927..a7cb66199100 100644
--- a/sw/source/ui/inc/envimg.hxx
+++ b/sw/source/ui/inc/envimg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envimg.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,7 +27,7 @@
#ifndef _ENVIMG_HXX
#define _ENVIMG_HXX
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include <unotools/configitem.hxx>
#include "swdllapi.h"
@@ -97,6 +94,7 @@ public:
SwEnvItem& GetItem() {return aEnvItem;}
virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
};
#endif
diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx
index b7874370bb09..b7ae315a9beb 100644
--- a/sw/source/ui/inc/envlop.hxx
+++ b/sw/source/ui/inc/envlop.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: envlop.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx
index 0253ed88dce1..cb27672de865 100644
--- a/sw/source/ui/inc/fldedt.hxx
+++ b/sw/source/ui/inc/fldedt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldedt.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx
index 6919e636fc58..33070131ae58 100644
--- a/sw/source/ui/inc/fldmgr.hxx
+++ b/sw/source/ui/inc/fldmgr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldmgr.hxx,v $
- * $Revision: 1.16.214.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,7 @@
#define _FLDMGR_HXX
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <tools/string.hxx>
#include "swdllapi.h"
diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx
index de61d652ef9d..cacc2e0a6183 100644
--- a/sw/source/ui/inc/fldtdlg.hxx
+++ b/sw/source/ui/inc/fldtdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldtdlg.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/fldwrap.hxx b/sw/source/ui/inc/fldwrap.hxx
index 051d0341d76e..12ed8743ccfd 100644
--- a/sw/source/ui/inc/fldwrap.hxx
+++ b/sw/source/ui/inc/fldwrap.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fldwrap.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx
index 1f5eed01b371..71cbdf3ad5d2 100644
--- a/sw/source/ui/inc/fontcfg.hxx
+++ b/sw/source/ui/inc/fontcfg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fontcfg.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -87,6 +84,7 @@ public:
~SwStdFontConfig();
virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
const String& GetFontStandard(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_STANDARD + FONT_PER_GROUP * nFontGroup];}
const String& GetFontOutline(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_OUTLINE + FONT_PER_GROUP * nFontGroup];}
diff --git a/sw/source/ui/inc/formatclipboard.hxx b/sw/source/ui/inc/formatclipboard.hxx
index 4eabd66b606c..ca35d7b5f8ab 100644
--- a/sw/source/ui/inc/formatclipboard.hxx
+++ b/sw/source/ui/inc/formatclipboard.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: formatclipboard.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,9 +31,9 @@
// header for class SwWrtShell
#include <wrtsh.hxx>
// header for class SfxItemSet
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
// header for class SfxStyleSheetBasePool
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
//-----------------------------------------------------------------------------
/** This class acts as data container and execution class for the format paintbrush feature in writer.
diff --git a/sw/source/ui/inc/formedt.hxx b/sw/source/ui/inc/formedt.hxx
index e8b8011ec434..c039fe512599 100644
--- a/sw/source/ui/inc/formedt.hxx
+++ b/sw/source/ui/inc/formedt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: formedt.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx
index fe2701849538..5776cc9f3dd8 100644
--- a/sw/source/ui/inc/frmdlg.hxx
+++ b/sw/source/ui/inc/frmdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmdlg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx
index 4223960dfca5..9664c484b0f3 100644
--- a/sw/source/ui/inc/frmmgr.hxx
+++ b/sw/source/ui/inc/frmmgr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmmgr.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,7 @@
#include "swtypes.hxx"
#include "frmatr.hxx"
-#include <svx/svxenum.hxx>
+#include <editeng/svxenum.hxx>
#include <tools/gen.hxx>
#include <fmtfsize.hxx>
#include <fmtsrnd.hxx>
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index c30b1bcf8488..219f6c37a308 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmpage.hxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/frmsh.hxx b/sw/source/ui/inc/frmsh.hxx
index db2534448e93..d4f4c546acf1 100644
--- a/sw/source/ui/inc/frmsh.hxx
+++ b/sw/source/ui/inc/frmsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmsh.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/frmui.hrc b/sw/source/ui/inc/frmui.hrc
index 8f9e3dc6dd2a..4c71fff51b40 100644
--- a/sw/source/ui/inc/frmui.hrc
+++ b/sw/source/ui/inc/frmui.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmui.hrc,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/globals.h b/sw/source/ui/inc/globals.h
index 0dc77444a486..46a2fba86397 100644
--- a/sw/source/ui/inc/globals.h
+++ b/sw/source/ui/inc/globals.h
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: globals.h,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/globdoc.hrc b/sw/source/ui/inc/globdoc.hrc
index 1b69ed78f71c..cf06e4de05ca 100644
--- a/sw/source/ui/inc/globdoc.hrc
+++ b/sw/source/ui/inc/globdoc.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: globdoc.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx
index 9c2582b6bf4a..c96e4177027b 100644
--- a/sw/source/ui/inc/glosbib.hxx
+++ b/sw/source/ui/inc/glosbib.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glosbib.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/glosdoc.hxx b/sw/source/ui/inc/glosdoc.hxx
index eef305546754..1436c7fe8db9 100644
--- a/sw/source/ui/inc/glosdoc.hxx
+++ b/sw/source/ui/inc/glosdoc.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glosdoc.hxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,7 @@
#define _GLOSDOC_HXX
#include <tools/string.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <com/sun/star/text/XAutoTextGroup.hpp>
class SwTextBlocks;
diff --git a/sw/source/ui/inc/gloshdl.hxx b/sw/source/ui/inc/gloshdl.hxx
index 07f31a7ff676..df9e610f4b9a 100644
--- a/sw/source/ui/inc/gloshdl.hxx
+++ b/sw/source/ui/inc/gloshdl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gloshdl.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx
index 085b5fa703fd..52654c84b865 100644
--- a/sw/source/ui/inc/gloslst.hxx
+++ b/sw/source/ui/inc/gloslst.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gloslst.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#include <tools/datetime.hxx>
#include <tools/string.hxx>
#include <vcl/timer.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
class SwGlossaries;
class SvStringsISortDtor;
diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx
index 09f1c2a399ab..3c6ce003ca8f 100644
--- a/sw/source/ui/inc/glossary.hxx
+++ b/sw/source/ui/inc/glossary.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glossary.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/glshell.hxx b/sw/source/ui/inc/glshell.hxx
index 985010a0e8bd..ac97aa7a7f70 100644
--- a/sw/source/ui/inc/glshell.hxx
+++ b/sw/source/ui/inc/glshell.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glshell.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/grfsh.hxx b/sw/source/ui/inc/grfsh.hxx
index 0b3c7e340bb3..f8448ae9bc68 100644
--- a/sw/source/ui/inc/grfsh.hxx
+++ b/sw/source/ui/inc/grfsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: grfsh.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/hidfunc.h b/sw/source/ui/inc/hidfunc.h
index b2b961a882d4..d5cff23e616b 100644
--- a/sw/source/ui/inc/hidfunc.h
+++ b/sw/source/ui/inc/hidfunc.h
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hidfunc.h,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/hyp.hxx b/sw/source/ui/inc/hyp.hxx
index d1413e947c5f..330507024f3c 100644
--- a/sw/source/ui/inc/hyp.hxx
+++ b/sw/source/ui/inc/hyp.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hyp.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,7 @@
#define _HYP_HXX
#include <tools/link.hxx>
-#include <svx/splwrap.hxx>
+#include <editeng/splwrap.hxx>
#include <com/sun/star/linguistic2/XHyphenator.hpp>
class SwView;
diff --git a/sw/source/ui/inc/idxmrk.hxx b/sw/source/ui/inc/idxmrk.hxx
index f3a3608acaff..6d569bb798dd 100644
--- a/sw/source/ui/inc/idxmrk.hxx
+++ b/sw/source/ui/inc/idxmrk.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: idxmrk.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/imaildsplistener.hxx b/sw/source/ui/inc/imaildsplistener.hxx
index 8c50163a8cd4..9cb7d11f2684 100644
--- a/sw/source/ui/inc/imaildsplistener.hxx
+++ b/sw/source/ui/inc/imaildsplistener.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: imaildsplistener.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx
index a29fcb56c2fe..0a81e53f6149 100644
--- a/sw/source/ui/inc/initui.hxx
+++ b/sw/source/ui/inc/initui.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: initui.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/inpdlg.hxx b/sw/source/ui/inc/inpdlg.hxx
index ad48409044a9..f0c2f13cc6bc 100644
--- a/sw/source/ui/inc/inpdlg.hxx
+++ b/sw/source/ui/inc/inpdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inpdlg.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/inputwin.hxx b/sw/source/ui/inc/inputwin.hxx
index b856aae4781e..8693572d167f 100644
--- a/sw/source/ui/inc/inputwin.hxx
+++ b/sw/source/ui/inc/inputwin.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inputwin.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx
index 450b3b9bab81..c9c51301a100 100644
--- a/sw/source/ui/inc/insfnote.hxx
+++ b/sw/source/ui/inc/insfnote.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insfnote.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx
index e949b79e8a2a..316a161d6c06 100644
--- a/sw/source/ui/inc/insrule.hxx
+++ b/sw/source/ui/inc/insrule.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insrule.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index d4890c6bc8df..e48eece78a9f 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: instable.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx
index 055849f40e8e..6fecb6c82b30 100644
--- a/sw/source/ui/inc/javaedit.hxx
+++ b/sw/source/ui/inc/javaedit.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: javaedit.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx
index 2fecfbf4dcb2..0717ef2b6bd2 100644
--- a/sw/source/ui/inc/label.hxx
+++ b/sw/source/ui/inc/label.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: label.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <sfx2/tabdlg.hxx>
#include <com/sun/star/frame/XModel.hpp>
diff --git a/sw/source/ui/inc/labelcfg.hxx b/sw/source/ui/inc/labelcfg.hxx
index 10b55fca21e4..ab01d365bbe1 100644
--- a/sw/source/ui/inc/labelcfg.hxx
+++ b/sw/source/ui/inc/labelcfg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labelcfg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,7 +43,8 @@ public:
SwLabelConfig();
virtual ~SwLabelConfig();
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
void FillLabels(const rtl::OUString& rManufacturer, SwLabRecs& rLabArr);
const com::sun::star::uno::Sequence<rtl::OUString>&
diff --git a/sw/source/ui/inc/labimg.hxx b/sw/source/ui/inc/labimg.hxx
index 1a0adf19d735..cb435bd38925 100644
--- a/sw/source/ui/inc/labimg.hxx
+++ b/sw/source/ui/inc/labimg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: labimg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,7 @@
#ifndef _LABIMG_HXX
#define _LABIMG_HXX
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include <unotools/configitem.hxx>
#include "swdllapi.h"
@@ -126,7 +123,8 @@ public:
SwLabItem& GetItem() {return aItem;}
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
};
#endif
diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx
index 751cff109eee..0d05c930284a 100755
--- a/sw/source/ui/inc/langhelper.hxx
+++ b/sw/source/ui/inc/langhelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: langhelper.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx
index 2e9f4f309d52..62da2e1925ef 100644
--- a/sw/source/ui/inc/linenum.hxx
+++ b/sw/source/ui/inc/linenum.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: linenum.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/listsh.hxx b/sw/source/ui/inc/listsh.hxx
index 58aa3f437381..61fea6ece214 100644
--- a/sw/source/ui/inc/listsh.hxx
+++ b/sw/source/ui/inc/listsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: listsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/macassgn.hxx b/sw/source/ui/inc/macassgn.hxx
index 7bc67ab98e93..6093a2a8cb51 100644
--- a/sw/source/ui/inc/macassgn.hxx
+++ b/sw/source/ui/inc/macassgn.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macassgn.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/mailconfigpage.hxx b/sw/source/ui/inc/mailconfigpage.hxx
index aaf3c9db65cf..e2717ebb17fa 100644
--- a/sw/source/ui/inc/mailconfigpage.hxx
+++ b/sw/source/ui/inc/mailconfigpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailconfigpage.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/maildispatcher.hxx b/sw/source/ui/inc/maildispatcher.hxx
index 4a0ad7239116..bc8afb829fdf 100644
--- a/sw/source/ui/inc/maildispatcher.hxx
+++ b/sw/source/ui/inc/maildispatcher.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: maildispatcher.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -131,7 +128,6 @@ public:
/** returns if the thread is still running
*/
using osl::Thread::isRunning;
- bool isRunning() const;
/** returns if shutdown has already been called
*/
@@ -167,7 +163,6 @@ private:
::rtl::Reference<MailDispatcher> m_xSelfReference;
bool run_;
bool shutdown_requested_;
- bool bIsInRun;
};
#endif // INCLUDED_MAILDISPATCHER_HXX
diff --git a/sw/source/ui/inc/mailmergechildwindow.hxx b/sw/source/ui/inc/mailmergechildwindow.hxx
index 1b4828c21879..21afff7aa8bb 100644
--- a/sw/source/ui/inc/mailmergechildwindow.hxx
+++ b/sw/source/ui/inc/mailmergechildwindow.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergechildwindow.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/mailmergehelper.hxx b/sw/source/ui/inc/mailmergehelper.hxx
index 50f01496a767..954ce643d8e9 100644
--- a/sw/source/ui/inc/mailmergehelper.hxx
+++ b/sw/source/ui/inc/mailmergehelper.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergehelper.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/mailmergewizard.hxx b/sw/source/ui/inc/mailmergewizard.hxx
index 320e0be021fe..7a582693b013 100644
--- a/sw/source/ui/inc/mailmergewizard.hxx
+++ b/sw/source/ui/inc/mailmergewizard.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmergewizard.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx
index a4be36e07d5f..e1f9f355c96a 100644
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mailmrge.hxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/makefile.mk b/sw/source/ui/inc/makefile.mk
index bd301b452ca1..cb9b968dcc06 100644
--- a/sw/source/ui/inc/makefile.mk
+++ b/sw/source/ui/inc/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/mediash.hxx b/sw/source/ui/inc/mediash.hxx
index b71219e07c10..035c03656119 100644
--- a/sw/source/ui/inc/mediash.hxx
+++ b/sw/source/ui/inc/mediash.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mediash.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/mergetbl.hxx b/sw/source/ui/inc/mergetbl.hxx
index 984ab9fa2866..44916f5d3b1d 100644
--- a/sw/source/ui/inc/mergetbl.hxx
+++ b/sw/source/ui/inc/mergetbl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mergetbl.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc
index 941745c9dd98..f7c7cfcde9a0 100644
--- a/sw/source/ui/inc/misc.hrc
+++ b/sw/source/ui/inc/misc.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: misc.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx
index 7b1517c392a1..33454896627d 100644
--- a/sw/source/ui/inc/mmconfigitem.hxx
+++ b/sw/source/ui/inc/mmconfigitem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mmconfigitem.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/multmrk.hxx b/sw/source/ui/inc/multmrk.hxx
index d8c7067458a7..7d5dae802e01 100644
--- a/sw/source/ui/inc/multmrk.hxx
+++ b/sw/source/ui/inc/multmrk.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multmrk.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/navicfg.hxx b/sw/source/ui/inc/navicfg.hxx
index 124758a773b1..de400eca916e 100644
--- a/sw/source/ui/inc/navicfg.hxx
+++ b/sw/source/ui/inc/navicfg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navicfg.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,7 +47,8 @@ public:
SwNavigationConfig();
~SwNavigationConfig();
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
sal_Int32 GetRootType()const {return nRootType;}
void SetRootType(sal_Int32 nSet){
diff --git a/sw/source/ui/inc/navicont.hxx b/sw/source/ui/inc/navicont.hxx
index 8f145dfddeec..124309057953 100644
--- a/sw/source/ui/inc/navicont.hxx
+++ b/sw/source/ui/inc/navicont.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navicont.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx
index 479ed1329ea8..b2b457bdd5d4 100644
--- a/sw/source/ui/inc/navipi.hxx
+++ b/sw/source/ui/inc/navipi.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navipi.hxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
#endif
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <svtools/transfer.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/ctrlitem.hxx>
diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx
index 44545bcc04e5..2233f9609fe4 100644
--- a/sw/source/ui/inc/num.hxx
+++ b/sw/source/ui/inc/num.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: num.hxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx
index d82637aca5e0..d70bbc9cc74c 100644
--- a/sw/source/ui/inc/numberingtypelistbox.hxx
+++ b/sw/source/ui/inc/numberingtypelistbox.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numberingtypelistbox.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx
index 1a768d98fac2..50d762dc4419 100644
--- a/sw/source/ui/inc/numfmtlb.hxx
+++ b/sw/source/ui/inc/numfmtlb.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numfmtlb.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,7 @@
#define _SWNUMFMTLB_HXX
#include <vcl/lstbox.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "swdllapi.h"
class SwView;
diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx
index 69034bed122f..f8d748c4473c 100644
--- a/sw/source/ui/inc/numpara.hxx
+++ b/sw/source/ui/inc/numpara.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numpara.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx
index edee4c8c9783..3ee9a2316103 100644
--- a/sw/source/ui/inc/numprevw.hxx
+++ b/sw/source/ui/inc/numprevw.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numprevw.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/olesh.hxx b/sw/source/ui/inc/olesh.hxx
index 4a8a6ba688d7..32a413300f36 100644
--- a/sw/source/ui/inc/olesh.hxx
+++ b/sw/source/ui/inc/olesh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: olesh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index 0985c3bdc4da..3bc0eb02d3b6 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: olmenu.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx
index b72f9f8d21e9..34de97517fd2 100644
--- a/sw/source/ui/inc/optcomp.hxx
+++ b/sw/source/ui/inc/optcomp.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optcomp.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#include <svtools/compatibility.hxx>
+#include <unotools/compatibility.hxx>
#include <svx/checklbx.hxx>
// class SwCompatibilityOptPage ------------------------------------------
diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx
index 9b954557e7e9..abe43c00f0a3 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optload.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index 592c581f4aa3..d05e68588b2d 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: optpage.hxx,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -119,8 +116,8 @@ class SwAddPrinterTabPage : public SfxTabPage
{
FixedLine aFL1;
CheckBox aGrfCB;
- CheckBox aTabCB;
- CheckBox aDrawCB;
+// CheckBox aTabCB;
+// CheckBox aDrawCB;
CheckBox aCtrlFldCB;
CheckBox aBackgroundCB;
CheckBox aBlackFontCB;
@@ -132,7 +129,7 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aFL2;
CheckBox aLeftPageCB;
CheckBox aRightPageCB;
- CheckBox aReverseCB;
+// CheckBox aReverseCB;
CheckBox aProspectCB;
CheckBox aProspectCB_RTL;
@@ -145,7 +142,7 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aFL3;
FixedLine aFL4;
CheckBox aPrintEmptyPagesCB;
- CheckBox aSingleJobsCB;
+// CheckBox aSingleJobsCB;
CheckBox aPaperFromSetupCB;
FixedText aFaxFT;
ListBox aFaxLB;
@@ -466,7 +463,7 @@ public:
TabPage Testeinstellungen fuer SW
--------------------------------------------------------- */
-#ifndef PRODUCT
+#ifdef DBG_UTIL
class SwTestTabPage : public SfxTabPage
{
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index 3d535d8641f9..65f57636c02d 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: outline.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/pardlg.hxx b/sw/source/ui/inc/pardlg.hxx
index 9a40349ea935..3946300dc248 100644
--- a/sw/source/ui/inc/pardlg.hxx
+++ b/sw/source/ui/inc/pardlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pardlg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/pattern.hxx b/sw/source/ui/inc/pattern.hxx
index 0cdc16fa9bcf..2ee7cb079afd 100644
--- a/sw/source/ui/inc/pattern.hxx
+++ b/sw/source/ui/inc/pattern.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pattern.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx
index 9e227865ba68..31bb0c68fc22 100644
--- a/sw/source/ui/inc/pgfnote.hxx
+++ b/sw/source/ui/inc/pgfnote.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pgfnote.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/pggrid.hxx b/sw/source/ui/inc/pggrid.hxx
index 4577b9a0ac04..92ba2fa2ebd4 100644
--- a/sw/source/ui/inc/pggrid.hxx
+++ b/sw/source/ui/inc/pggrid.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pggrid.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/popbox.hxx b/sw/source/ui/inc/popbox.hxx
index a5a1734965dc..bc9fa1855287 100644
--- a/sw/source/ui/inc/popbox.hxx
+++ b/sw/source/ui/inc/popbox.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: popbox.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/popup.hrc b/sw/source/ui/inc/popup.hrc
index ea891a982273..62f210938a36 100644
--- a/sw/source/ui/inc/popup.hrc
+++ b/sw/source/ui/inc/popup.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: popup.hrc,v $
- * $Revision: 1.6.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/prcntfld.hxx b/sw/source/ui/inc/prcntfld.hxx
index aa1407e7ba27..e506f31de708 100644
--- a/sw/source/ui/inc/prcntfld.hxx
+++ b/sw/source/ui/inc/prcntfld.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: prcntfld.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/prtopt.hxx b/sw/source/ui/inc/prtopt.hxx
index 7fa3d66dd6cc..75f0520e35e8 100644
--- a/sw/source/ui/inc/prtopt.hxx
+++ b/sw/source/ui/inc/prtopt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: prtopt.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,7 +39,8 @@ public:
SwPrintOptions(sal_Bool bWeb);
virtual ~SwPrintOptions();
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void doSetModified( ) { bModified = sal_True; SetModified();}
SwPrintOptions& operator=(const SwPrintData& rData)
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index bcb96a26cb3d..d0d8f2cb804a 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pview.hxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -222,8 +219,6 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = TRUE );
- SW_DLLPRIVATE virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI,
- PrintDialog *pPrintDialog = 0 );
SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent,
diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index 9325aa7ae640..152c17387072 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: redlndlg.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,9 +32,9 @@
#include <tools/datetime.hxx>
#include <vcl/msgbox.hxx>
#ifndef _SVSTDARR_HXX
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/basedlgs.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index f5dbec86d1ef..40ba9d3d0a15 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: regionsw.hxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,7 +38,7 @@
#include <svtools/svtreebx.hxx>
#include <sfx2/basedlgs.hxx>
#include <sfx2/tabdlg.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/brshitem.hxx>
#include <condedit.hxx>
#include <section.hxx>
@@ -49,10 +46,10 @@
#include <fmtftntx.hxx>
#include <fmtclbl.hxx>
#include <numberingtypelistbox.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <vcl/image.hxx>
#include <svx/paraprev.hxx>
-#include <svx/lrspitem.hxx>
+#include <editeng/lrspitem.hxx>
class SwWrtShell;
diff --git a/sw/source/ui/inc/ribbar.hrc b/sw/source/ui/inc/ribbar.hrc
index d5d37ad1c50b..45c494b6f136 100644
--- a/sw/source/ui/inc/ribbar.hrc
+++ b/sw/source/ui/inc/ribbar.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ribbar.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/rowht.hxx b/sw/source/ui/inc/rowht.hxx
index df004eb3012f..e4b497246cd7 100644
--- a/sw/source/ui/inc/rowht.hxx
+++ b/sw/source/ui/inc/rowht.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: rowht.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/scroll.hxx b/sw/source/ui/inc/scroll.hxx
index 13c4aec24da4..80c57767fbe2 100644
--- a/sw/source/ui/inc/scroll.hxx
+++ b/sw/source/ui/inc/scroll.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: scroll.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/selglos.hxx b/sw/source/ui/inc/selglos.hxx
index d1d9a5664edc..1fa693691086 100644
--- a/sw/source/ui/inc/selglos.hxx
+++ b/sw/source/ui/inc/selglos.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: selglos.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/sharedconnection.hxx b/sw/source/ui/inc/sharedconnection.hxx
index cce1126560cb..cbb6f41d17ad 100644
--- a/sw/source/ui/inc/sharedconnection.hxx
+++ b/sw/source/ui/inc/sharedconnection.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sharedconnection.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/shdwcrsr.hxx b/sw/source/ui/inc/shdwcrsr.hxx
index 674bfac89a19..fc95e36de5e7 100644
--- a/sw/source/ui/inc/shdwcrsr.hxx
+++ b/sw/source/ui/inc/shdwcrsr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shdwcrsr.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/shells.hrc b/sw/source/ui/inc/shells.hrc
index 1abacfe3ff50..2058b6432ed8 100644
--- a/sw/source/ui/inc/shells.hrc
+++ b/sw/source/ui/inc/shells.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shells.hrc,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx
index 0fb791cfa399..9d96d6ac3a9d 100644
--- a/sw/source/ui/inc/split.hxx
+++ b/sw/source/ui/inc/split.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: split.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx
index 2fb84b2bc9a4..3e21b347651a 100644
--- a/sw/source/ui/inc/splittbl.hxx
+++ b/sw/source/ui/inc/splittbl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splittbl.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx
index 9dbb5ba6fe31..c23ee997852d 100644
--- a/sw/source/ui/inc/srcedtw.hxx
+++ b/sw/source/ui/inc/srcedtw.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srcedtw.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,8 @@
#define _SRCEDTW_HXX
#include <vcl/window.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
+#include <unotools/options.hxx>
#include <vcl/timer.hxx>
#ifndef _TABLE_HXX //autogen
@@ -46,6 +44,11 @@ class TextEngine;
class ExtTextView;
class DataChangedEvent;
+namespace utl
+{
+ class SourceViewConfig;
+}
+
class TextViewOutWin : public Window
{
ExtTextView* pTextView;
@@ -69,7 +72,7 @@ public:
//------------------------------------------------------------
namespace svt{ class SourceViewConfig;}
-class SwSrcEditWindow : public Window, public SfxListener
+class SwSrcEditWindow : public Window, public SfxListener, public utl::ConfigurationListener
{
private:
ExtTextView* pTextView;
@@ -80,7 +83,7 @@ private:
*pVScrollbar;
SwSrcView* pSrcView;
- svt::SourceViewConfig* pSourceViewConfig;
+ utl::SourceViewConfig* pSourceViewConfig;
long nCurTextWidth;
USHORT nStartLine;
@@ -114,6 +117,7 @@ protected:
void DoSyntaxHighlight( USHORT nPara );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
DECL_LINK(ScrollHdl, ScrollBar*);
diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx
index 996aab82b446..574696f1fd27 100644
--- a/sw/source/ui/inc/srcview.hxx
+++ b/sw/source/ui/inc/srcview.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srcview.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -28,10 +25,12 @@
*
************************************************************************/
#ifndef _SRCVIEW_HXX
-#define _SRCIEW_HXX
+#define _SRCVIEW_HXX
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
+#include <vcl/outdev.hxx>
+
#include "srcedtw.hxx"
#include "shellid.hxx"
@@ -92,11 +91,11 @@ public:
void Load(SwDocShell* pDocShell);
- virtual USHORT SetPrinter( SfxPrinter* pNew,
- USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
+ virtual USHORT SetPrinter( SfxPrinter* pNew, USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
+
void SourceSaved() {bSourceSaved = TRUE;}
BOOL HasSourceSaved() const {return bSourceSaved;}
diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx
index cf46ee5d69ea..09d91cf64195 100644
--- a/sw/source/ui/inc/srtdlg.hxx
+++ b/sw/source/ui/inc/srtdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srtdlg.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/stmenu.hxx b/sw/source/ui/inc/stmenu.hxx
index 5deec3ee36b2..a761d60a12ed 100644
--- a/sw/source/ui/inc/stmenu.hxx
+++ b/sw/source/ui/inc/stmenu.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: stmenu.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx
index 824a5751fbdb..f9d5dd049b1d 100644
--- a/sw/source/ui/inc/swcont.hxx
+++ b/sw/source/ui/inc/swcont.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swcont.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index d2a5a2ed4d2b..84b3309f70bc 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdtflvr.hxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index c774faca9d79..0c31a9ab977f 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swlbox.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,7 +27,7 @@
#ifndef _SWLBOX_HXX
#define _SWLBOX_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc
index 6a5fb48bf655..3128f741be30 100644
--- a/sw/source/ui/inc/swmn_tmpl.hrc
+++ b/sw/source/ui/inc/swmn_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swmn_tmpl.hrc,v $
- * $Revision: 1.15.210.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
index 57906960887e..c3af65d764ff 100644
--- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
+++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swmodalredlineacceptdlg.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx
index 77819b8ea8da..16f3d56852e6 100644
--- a/sw/source/ui/inc/swrenamexnameddlg.hxx
+++ b/sw/source/ui/inc/swrenamexnameddlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swrenamexnameddlg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx
index a8de070e0b20..20af27911317 100644
--- a/sw/source/ui/inc/swtablerep.hxx
+++ b/sw/source/ui/inc/swtablerep.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swtablerep.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx
index 1a5e8da8944a..5079d9ebda08 100644
--- a/sw/source/ui/inc/swuiccoll.hxx
+++ b/sw/source/ui/inc/swuiccoll.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuiccoll.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 7f7ec6cbebef..8c7160433837 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuicnttab.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx
index 9555bb6e1383..037aac07fe16 100644
--- a/sw/source/ui/inc/swuiidxmrk.hxx
+++ b/sw/source/ui/inc/swuiidxmrk.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuiidxmrk.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx
index 9a6e9766783d..d9460f62ad65 100644
--- a/sw/source/ui/inc/swuipardlg.hxx
+++ b/sw/source/ui/inc/swuipardlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuipardlg.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swvset.hxx b/sw/source/ui/inc/swvset.hxx
index 34d9a48c6ad6..4e6b2a46f856 100644
--- a/sw/source/ui/inc/swvset.hxx
+++ b/sw/source/ui/inc/swvset.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swvset.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/swwrtshitem.hxx b/sw/source/ui/inc/swwrtshitem.hxx
index cf46f3ea6ef3..3e33c3722f6b 100644
--- a/sw/source/ui/inc/swwrtshitem.hxx
+++ b/sw/source/ui/inc/swwrtshitem.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swwrtshitem.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -29,7 +26,7 @@
************************************************************************/
#ifndef _SW_WRTSHELLITEM_HXX
#define _SW_WRTSHELLITEM_HXX
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include "swdllapi.h"
class SwWrtShell;
diff --git a/sw/source/ui/inc/syncbtn.hxx b/sw/source/ui/inc/syncbtn.hxx
index 5a8efab02973..0ae8c7009426 100644
--- a/sw/source/ui/inc/syncbtn.hxx
+++ b/sw/source/ui/inc/syncbtn.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: syncbtn.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/table.hrc b/sw/source/ui/inc/table.hrc
index 0903a95453ad..076028925804 100644
--- a/sw/source/ui/inc/table.hrc
+++ b/sw/source/ui/inc/table.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: table.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tabledlg.hxx b/sw/source/ui/inc/tabledlg.hxx
index d4023e256a50..497d16449774 100644
--- a/sw/source/ui/inc/tabledlg.hxx
+++ b/sw/source/ui/inc/tabledlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabledlg.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tablemgr.hxx b/sw/source/ui/inc/tablemgr.hxx
index db46edf92e27..4256d4069fe2 100644
--- a/sw/source/ui/inc/tablemgr.hxx
+++ b/sw/source/ui/inc/tablemgr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tablemgr.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tabsh.hxx b/sw/source/ui/inc/tabsh.hxx
index be08d2fef071..3e3c1304b1ee 100644
--- a/sw/source/ui/inc/tabsh.hxx
+++ b/sw/source/ui/inc/tabsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabsh.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx
index 7c09d18ac470..9c35450eb208 100644
--- a/sw/source/ui/inc/tautofmt.hxx
+++ b/sw/source/ui/inc/tautofmt.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tautofmt.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tblctrl.hxx b/sw/source/ui/inc/tblctrl.hxx
index cbb73904a2eb..f46103098278 100644
--- a/sw/source/ui/inc/tblctrl.hxx
+++ b/sw/source/ui/inc/tblctrl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tblctrl.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tblnumfm.hxx b/sw/source/ui/inc/tblnumfm.hxx
index 2dc2f838e255..b6118f3943fe 100644
--- a/sw/source/ui/inc/tblnumfm.hxx
+++ b/sw/source/ui/inc/tblnumfm.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tblnumfm.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tbxanchr.hxx b/sw/source/ui/inc/tbxanchr.hxx
index 284fa592978f..a2c378f15198 100644
--- a/sw/source/ui/inc/tbxanchr.hxx
+++ b/sw/source/ui/inc/tbxanchr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tbxanchr.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tbxmgr.hxx b/sw/source/ui/inc/tbxmgr.hxx
index b19ccc15c65b..43798be42de1 100644
--- a/sw/source/ui/inc/tbxmgr.hxx
+++ b/sw/source/ui/inc/tbxmgr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tbxmgr.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx
index fddcfad1522c..dbf42d86d085 100644
--- a/sw/source/ui/inc/textcontrolcombo.hxx
+++ b/sw/source/ui/inc/textcontrolcombo.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textcontrolcombo.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx
index 73a173e9aad1..d4ec7b99ed25 100644
--- a/sw/source/ui/inc/textsh.hxx
+++ b/sw/source/ui/inc/textsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textsh.hxx,v $
- * $Revision: 1.16.188.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tmpdlg.hxx b/sw/source/ui/inc/tmpdlg.hxx
index ecb2af4c0ce2..7971a6607915 100644
--- a/sw/source/ui/inc/tmpdlg.hxx
+++ b/sw/source/ui/inc/tmpdlg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tmpdlg.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/tmplctrl.hxx b/sw/source/ui/inc/tmplctrl.hxx
index 474904a77fa1..206645d7fe83 100644
--- a/sw/source/ui/inc/tmplctrl.hxx
+++ b/sw/source/ui/inc/tmplctrl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tmplctrl.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox_tmpl.hrc
index f17ebbfb8958..73ab3059d705 100644
--- a/sw/source/ui/inc/toolbox_tmpl.hrc
+++ b/sw/source/ui/inc/toolbox_tmpl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: toolbox_tmpl.hrc,v $
- * $Revision: 1.5.210.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/toxmgr.hxx b/sw/source/ui/inc/toxmgr.hxx
index c55b5dbb8488..38cc1e5398b3 100644
--- a/sw/source/ui/inc/toxmgr.hxx
+++ b/sw/source/ui/inc/toxmgr.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: toxmgr.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx
index 1a031be57d83..a7688ac343ac 100644
--- a/sw/source/ui/inc/uiborder.hxx
+++ b/sw/source/ui/inc/uiborder.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uiborder.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/uiitems.hxx b/sw/source/ui/inc/uiitems.hxx
index 1f94219fa71d..d559a9ea3fb9 100644
--- a/sw/source/ui/inc/uiitems.hxx
+++ b/sw/source/ui/inc/uiitems.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uiitems.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,7 +27,7 @@
#ifndef _UIITEMS_HXX
#define _UIITEMS_HXX
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include "swdllapi.h"
#include "cmdid.h"
#include "pagedesc.hxx"
diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx
index 72b30c753cc3..5ba9d6f4dfc1 100644
--- a/sw/source/ui/inc/uinums.hxx
+++ b/sw/source/ui/inc/uinums.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uinums.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,7 +27,7 @@
#ifndef _UINUMS_HXX
#define _UINUMS_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <numrule.hxx>
#include "swdllapi.h"
diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx
index c0fce9c8fe6a..e48f78f9aa96 100644
--- a/sw/source/ui/inc/uitool.hxx
+++ b/sw/source/ui/inc/uitool.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uitool.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx
index d23da67e4209..9c22b44ad868 100644
--- a/sw/source/ui/inc/uivwimp.hxx
+++ b/sw/source/ui/inc/uivwimp.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uivwimp.hxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/unodispatch.hxx b/sw/source/ui/inc/unodispatch.hxx
index cbe8da08636e..884d647725e5 100644
--- a/sw/source/ui/inc/unodispatch.hxx
+++ b/sw/source/ui/inc/unodispatch.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unodispatch.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx
index 0378bc173b8a..6399e2acba9e 100644
--- a/sw/source/ui/inc/unotools.hxx
+++ b/sw/source/ui/inc/unotools.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unotools.hxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 4db18720cf87..91cf8823e124 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unotxvw.hxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,7 +44,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/datatransfer/XTransferableSupplier.hpp>
#include <cppuhelper/implbase8.hxx> // helper for implementations
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include "calbck.hxx"
#include "TextCursorHelper.hxx"
#include <comphelper/uno3.hxx>
@@ -109,7 +106,7 @@ public:
virtual void SAL_CALL removeSelectionChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener > & xListener) throw( ::com::sun::star::uno::RuntimeException );
// XFormLayerAccess
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isFormDesignMode( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setFormDesignMode( ::sal_Bool DesignMode ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx
index 812873626ced..7864bf135934 100644
--- a/sw/source/ui/inc/usrpref.hxx
+++ b/sw/source/ui/inc/usrpref.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: usrpref.hxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -71,6 +68,7 @@ class SwLayoutViewConfig : public utl::ConfigItem
SwLayoutViewConfig(BOOL bWeb, SwMasterUsrPref& rParent);
~SwLayoutViewConfig();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
void Load();
void SetModified(){ConfigItem::SetModified();}
@@ -88,7 +86,8 @@ class SwGridConfig : public utl::ConfigItem
SwGridConfig(BOOL bWeb, SwMasterUsrPref& rParent);
~SwGridConfig();
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
void Load();
void SetModified(){ConfigItem::SetModified();}
};
@@ -104,7 +103,8 @@ class SwCursorConfig : public utl::ConfigItem
SwCursorConfig(SwMasterUsrPref& rParent);
~SwCursorConfig();
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
void Load();
void SetModified(){ConfigItem::SetModified();}
};
@@ -120,7 +120,8 @@ class SwWebColorConfig : public utl::ConfigItem
SwWebColorConfig(SwMasterUsrPref& rParent);
~SwWebColorConfig();
- virtual void Commit();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
void Load();
void SetModified(){ConfigItem::SetModified();}
};
diff --git a/sw/source/ui/inc/utlui.hrc b/sw/source/ui/inc/utlui.hrc
index a2018f0b50a7..aa7dab24054a 100644
--- a/sw/source/ui/inc/utlui.hrc
+++ b/sw/source/ui/inc/utlui.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: utlui.hrc,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 7ddfc2775299..f243202a01ac 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view.hxx,v $
- * $Revision: 1.60 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,12 +29,13 @@
#include <vcl/timer.hxx>
#include <vcl/field.hxx>
+#include <svtools/htmlcfg.hxx>
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell)
-#include <svx/svxenum.hxx>
+#include <editeng/svxenum.hxx>
#include <svx/zoomitem.hxx>
-#include <svx/editstat.hxx>
+#include <editeng/editstat.hxx>
#include "swdllapi.h"
#include <swtypes.hxx>
#include <shellid.hxx>
@@ -88,7 +86,7 @@ class SwPrtOptions;
class SwTransferable;
class SwMailMergeConfigItem;
class SwTxtNode; // #i23726#
-struct SwPrintData;
+class SwPrintData;
class SwFormatClipboard;
struct SwConversionArgs;
class Graphic;
@@ -197,6 +195,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
static SearchAttrItemList* pReplList;
+ SvxHtmlOptions aHTMLOpt;
Timer aTimer; //Fuer verzoegerte ChgLnks waehrend
//einer Aktion
String aPageStr; //Statusanzeige, aktuelle Seite
@@ -306,6 +305,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer * );
SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
+ SW_DLLPRIVATE DECL_LINK( HtmlOptionsHdl, void * );
inline long GetXScroll() const;
inline long GetYScroll() const;
@@ -424,8 +424,6 @@ public:
virtual USHORT SetPrinter( SfxPrinter* pNew,
USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog,
- BOOL bSilent, BOOL bIsAPI );
ShellModes GetShellMode();
com::sun::star::view::XSelectionSupplier* GetUNOObject();
@@ -632,10 +630,6 @@ public:
//apply Accessiblity options
void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
- // get print options (SwPrtOptions)
- static void MakeOptions( PrintDialog* pDlg, SwPrtOptions& rOpts,
- BOOL* pPrtProspect, BOOL* pPrtProspect_RTL, BOOL bWeb, SfxPrinter* pPrt, SwPrintData* pData );
-
SwView(SfxViewFrame* pFrame, SfxViewShell*);
~SwView();
@@ -692,3 +686,4 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent,
BOOL bPreview);
#endif
+
diff --git a/sw/source/ui/inc/viewlayoutctrl.hxx b/sw/source/ui/inc/viewlayoutctrl.hxx
index 8021736b8c27..60d05b63a79e 100644
--- a/sw/source/ui/inc/viewlayoutctrl.hxx
+++ b/sw/source/ui/inc/viewlayoutctrl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewlayoutctrl.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/web.hrc b/sw/source/ui/inc/web.hrc
index efcc18f648a2..e9e446d62cdb 100644
--- a/sw/source/ui/inc/web.hrc
+++ b/sw/source/ui/inc/web.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: web.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wformsh.hxx b/sw/source/ui/inc/wformsh.hxx
index 4ab5344d278f..abd98d510e65 100644
--- a/sw/source/ui/inc/wformsh.hxx
+++ b/sw/source/ui/inc/wformsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wformsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wfrmsh.hxx b/sw/source/ui/inc/wfrmsh.hxx
index 08a025c6ad66..dfe5bd5f422f 100644
--- a/sw/source/ui/inc/wfrmsh.hxx
+++ b/sw/source/ui/inc/wfrmsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wfrmsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wgrfsh.hxx b/sw/source/ui/inc/wgrfsh.hxx
index 882642dfbde9..b53743885d66 100644
--- a/sw/source/ui/inc/wgrfsh.hxx
+++ b/sw/source/ui/inc/wgrfsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wgrfsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wlistsh.hxx b/sw/source/ui/inc/wlistsh.hxx
index bce4933a0a3f..e3503a54e448 100644
--- a/sw/source/ui/inc/wlistsh.hxx
+++ b/sw/source/ui/inc/wlistsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wlistsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wolesh.hxx b/sw/source/ui/inc/wolesh.hxx
index 5609baffa922..87b48db5593e 100644
--- a/sw/source/ui/inc/wolesh.hxx
+++ b/sw/source/ui/inc/wolesh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wolesh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wordcountdialog.hxx b/sw/source/ui/inc/wordcountdialog.hxx
index b19b3cca8c94..a228b8bdea77 100644
--- a/sw/source/ui/inc/wordcountdialog.hxx
+++ b/sw/source/ui/inc/wordcountdialog.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wordcountdialog.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx
index d62e222c830e..4ca42086d93e 100644
--- a/sw/source/ui/inc/workctrl.hxx
+++ b/sw/source/ui/inc/workctrl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: workctrl.hxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index 47d15f9b46b7..7d435f90cd17 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrap.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 3c526c11d193..90180b86110b 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtsh.hxx,v $
- * $Revision: 1.47 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wtabsh.hxx b/sw/source/ui/inc/wtabsh.hxx
index 34810511bcd3..5ab809821de8 100644
--- a/sw/source/ui/inc/wtabsh.hxx
+++ b/sw/source/ui/inc/wtabsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wtabsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wtextsh.hxx b/sw/source/ui/inc/wtextsh.hxx
index 97a98089d7df..cc03de602400 100644
--- a/sw/source/ui/inc/wtextsh.hxx
+++ b/sw/source/ui/inc/wtextsh.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wtextsh.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/wview.hxx b/sw/source/ui/inc/wview.hxx
index cded6f2d53bb..2b36bbf97dce 100644
--- a/sw/source/ui/inc/wview.hxx
+++ b/sw/source/ui/inc/wview.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wview.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/inc/zoomctrl.hxx b/sw/source/ui/inc/zoomctrl.hxx
index 8bec52e318d4..f2d1843828fb 100644
--- a/sw/source/ui/inc/zoomctrl.hxx
+++ b/sw/source/ui/inc/zoomctrl.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zoomctrl.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index f1e5c2c06f72..40400f591753 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cntex.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 9eeaa42ccaa4..a8a01a4f8222 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cnttab.cxx,v $
- * $Revision: 1.79 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,9 +35,9 @@
#include <rsc/rscsfx.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/help.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/pathoptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/pathoptions.hxx>
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
@@ -53,7 +50,7 @@
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <svtools/indexentryres.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <column.hxx>
#include <fmtfsize.hxx>
#include <shellio.hxx>
diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc
index 61d04d9f5bdc..c544be2c7a2e 100644
--- a/sw/source/ui/index/cnttab.hrc
+++ b/sw/source/ui/index/cnttab.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cnttab.hrc,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index 8b84ca3d2b92..68f008b8d5ff 100644
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cnttab.src,v $
- * $Revision: 1.77 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/idxmrk.cxx b/sw/source/ui/index/idxmrk.cxx
index 866ecd82ee4e..24a3c7ddf91e 100644
--- a/sw/source/ui/index/idxmrk.cxx
+++ b/sw/source/ui/index/idxmrk.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: idxmrk.cxx,v $
- * $Revision: 1.37 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <helpid.h>
#endif
#define _SVSTDARR_STRINGSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -45,16 +42,16 @@
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
#include <sfx2/dispatch.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svtools/txtcmp.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svtools/itemset.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <svl/itemset.hxx>
+#include <editeng/langitem.hxx>
#include <swtypes.hxx>
#include <idxmrk.hxx>
#include <txttxmrk.hxx>
@@ -78,7 +75,7 @@
#include <fldbas.hxx>
#include <utlui.hrc>
#include <swcont.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include <ndtxt.hxx>
#include <breakit.hxx>
diff --git a/sw/source/ui/index/idxmrk.hrc b/sw/source/ui/index/idxmrk.hrc
index cb50436b7f68..859aeb25b3fa 100644
--- a/sw/source/ui/index/idxmrk.hrc
+++ b/sw/source/ui/index/idxmrk.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: idxmrk.hrc,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src
index 91ff5b0904a2..483485bf1b4b 100644
--- a/sw/source/ui/index/idxmrk.src
+++ b/sw/source/ui/index/idxmrk.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: idxmrk.src,v $
- * $Revision: 1.44 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk
index cdbd4264e246..647b579e531b 100644
--- a/sw/source/ui/index/makefile.mk
+++ b/sw/source/ui/index/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.9 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index a5c1d81426a6..c17f4b683906 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multmrk.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/multmrk.hrc b/sw/source/ui/index/multmrk.hrc
index 2e359ec8a32e..8a24f9c0336d 100644
--- a/sw/source/ui/index/multmrk.hrc
+++ b/sw/source/ui/index/multmrk.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multmrk.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src
index 6ba27b223086..be7b47d836d4 100644
--- a/sw/source/ui/index/multmrk.src
+++ b/sw/source/ui/index/multmrk.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: multmrk.src,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 9b26818d028f..6083da00da06 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swuiidxmrk.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -40,7 +37,7 @@
#include <helpid.h>
#endif
#define _SVSTDARR_STRINGSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -48,17 +45,17 @@
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
#include <sfx2/dispatch.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svtools/txtcmp.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svtools/itemset.hxx>
-#include <svx/langitem.hxx>
-#include "svx/unolingu.hxx"
+#include <editeng/scripttypeitem.hxx>
+#include <svl/itemset.hxx>
+#include <editeng/langitem.hxx>
+#include "editeng/unolingu.hxx"
#include <swtypes.hxx>
#include <idxmrk.hxx>
#include <txttxmrk.hxx>
@@ -82,7 +79,7 @@
#include <fldbas.hxx>
#include <utlui.hrc>
#include <swcont.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include <ndtxt.hxx>
#include <breakit.hxx>
#include <SwRewriter.hxx>
diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx
index 686a134a67ec..8564000d26ac 100644
--- a/sw/source/ui/index/toxmgr.cxx
+++ b/sw/source/ui/index/toxmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: toxmgr.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 3df94b9e6e31..da07c73f6c8e 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hhcwrp.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -50,9 +47,9 @@
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svx/unolingu.hxx>
-#include <svx/langitem.hxx>
-#include <svx/fontitem.hxx>
+#include <editeng/unolingu.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/fontitem.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/text/RubyAdjust.hpp>
#include <hhcwrp.hxx>
@@ -106,12 +103,12 @@ public:
//!! hack to transport the current conversion direction state settings
//!! into the next incarnation that iterates over the drawing objets
//!! ( see SwHHCWrapper::~SwHHCWrapper() )
- svx::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_True );
+ editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_True );
}
~SwKeepConversionDirectionStateContext()
{
- svx::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_False );
+ editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_False );
}
};
@@ -126,7 +123,7 @@ SwHHCWrapper::SwHHCWrapper(
sal_Int32 nConvOptions,
sal_Bool bIsInteractive,
sal_Bool bStart, sal_Bool bOther, sal_Bool bSelection ) :
- svx::HangulHanjaConversion( &pSwView->GetEditWin(), rxMSF,
+ editeng::HangulHanjaConversion( &pSwView->GetEditWin(), rxMSF,
SvxCreateLocale( nSourceLanguage ),
SvxCreateLocale( nTargetLanguage ),
pTargetFont,
@@ -651,7 +648,7 @@ void SwHHCWrapper::Convert()
// at the begin of the paragraph to solve the problem, i.e. have the
// TextConversion service get those charcters together in the same call.
xub_StrLen nStartIdx = STRING_MAXLEN;
- if (svx::HangulHanjaConversion::IsChinese( GetSourceLanguage() ) )
+ if (editeng::HangulHanjaConversion::IsChinese( GetSourceLanguage() ) )
nStartIdx = 0;
else
{
diff --git a/sw/source/ui/lingu/hyp.cxx b/sw/source/ui/lingu/hyp.cxx
index 24bd532d8c09..69c3db509fed 100644
--- a/sw/source/ui/lingu/hyp.cxx
+++ b/sw/source/ui/lingu/hyp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: hyp.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/lingu/makefile.mk b/sw/source/ui/lingu/makefile.mk
index 78a26cb148cf..617910a61060 100644
--- a/sw/source/ui/lingu/makefile.mk
+++ b/sw/source/ui/lingu/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.10 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 771836c6ccd5..351999015711 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: olmenu.cxx,v $
- * $Revision: 1.41 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,13 +32,12 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/lingucfg.hxx>
-#include <svtools/linguprops.hxx>
+#include <unotools/lingucfg.hxx>
+#include <unotools/linguprops.hxx>
#include <svtools/filter.hxx>
-#include <svx/impgrf.hxx>
-#include <svx/svxacorr.hxx>
+#include <editeng/svxacorr.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/imagemgr.hxx>
#include <osl/file.hxx>
@@ -51,7 +47,7 @@
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
#include <comphelper/processfactory.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
@@ -64,13 +60,13 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <svx/dlgutil.hxx>
-#include <svtools/itemset.hxx>
-#include <svx/langitem.hxx>
-#include <svx/splwrap.hxx>
+#include <svl/itemset.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/splwrap.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-#include <svtools/lingucfg.hxx>
-#include <svx/acorrcfg.hxx>
+#include <unotools/lingucfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include <swmodule.hxx>
#include <cmdid.h>
#include <helpid.h>
@@ -92,7 +88,7 @@
// <- #111827#
#include <unomid.h>
-#include <svtools/languageoptions.hxx>
+#include <svl/languageoptions.hxx>
#include <map>
#include <svtools/langtab.hxx>
#include <com/sun/star/document/XDocumentLanguages.hpp>
@@ -100,8 +96,8 @@
#include <sfx2/sfxdlg.hxx>
#include "swabstdlg.hxx"
#include "chrdlg.hrc"
-#include <svx/brshitem.hxx>
-#include <svtools/stritem.hxx>
+#include <editeng/brshitem.hxx>
+#include <svl/stritem.hxx>
#include <viewopt.hxx>
#include <uitool.hxx>
@@ -358,7 +354,7 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
#endif
Graphic aGraphic;
const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
- if( GRFILTER_OK == LoadGraphic( aTmp, aFilterName, aGraphic ) )
+ if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) )
{
aRes = Image( aGraphic.GetBitmapEx() );
}
diff --git a/sw/source/ui/lingu/olmenu.hrc b/sw/source/ui/lingu/olmenu.hrc
index 4e13b83bf10a..11e7b03d440b 100644
--- a/sw/source/ui/lingu/olmenu.hrc
+++ b/sw/source/ui/lingu/olmenu.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: olmenu.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src
index 82175a74bc23..487215c2bff6 100644
--- a/sw/source/ui/lingu/olmenu.src
+++ b/sw/source/ui/lingu/olmenu.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: olmenu.src,v $
- * $Revision: 1.40 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/lingu/sdrhhcwrap.cxx b/sw/source/ui/lingu/sdrhhcwrap.cxx
index 46d38f53cad0..32127f413e1a 100644
--- a/sw/source/ui/lingu/sdrhhcwrap.cxx
+++ b/sw/source/ui/lingu/sdrhhcwrap.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sdrhhcwrap.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,17 +30,17 @@
#include <hintids.hxx>
#include <svx/svditer.hxx>
#include <svx/svdotext.hxx>
-#include <svx/editdata.hxx>
+#include <editeng/editdata.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdogrp.hxx>
#include <sfx2/printer.hxx>
#include <svx/svdmodel.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <linguistic/lngprops.hxx>
#include <sfx2/sfxuno.hxx>
#include <svx/svdview.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <unotools/localedatawrapper.hxx>
#include <sdrhhcwrap.hxx>
#include <frmfmt.hxx>
diff --git a/sw/source/ui/lingu/sdrhhcwrap.hxx b/sw/source/ui/lingu/sdrhhcwrap.hxx
index ab48828b5f31..795e357e28c3 100644
--- a/sw/source/ui/lingu/sdrhhcwrap.hxx
+++ b/sw/source/ui/lingu/sdrhhcwrap.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sdrhhcwrap.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk
index 10897eedbefb..fa1dea2bac5c 100644
--- a/sw/source/ui/makefile.mk
+++ b/sw/source/ui/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.14 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/autocorr.src b/sw/source/ui/misc/autocorr.src
index fb8a50f103e6..1807d12744e4 100644
--- a/sw/source/ui/misc/autocorr.src
+++ b/sw/source/ui/misc/autocorr.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: autocorr.src,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index f7eace73f06e..feae6a64398a 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bookmark.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <sfx2/request.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
diff --git a/sw/source/ui/misc/bookmark.hrc b/sw/source/ui/misc/bookmark.hrc
index 24ed67b58a73..3320e3774516 100644
--- a/sw/source/ui/misc/bookmark.hrc
+++ b/sw/source/ui/misc/bookmark.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bookmark.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src
index 14eba86dc62d..4e7a4ec0a01f 100644
--- a/sw/source/ui/misc/bookmark.src
+++ b/sw/source/ui/misc/bookmark.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bookmark.src,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 44a3e0750890..06a2e1ae69f4 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docfnote.cxx,v $
- * $Revision: 1.19.224.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#endif
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#include <errhdl.hxx>
#include <wrtsh.hxx>
#ifndef _VIEW_HXX
diff --git a/sw/source/ui/misc/docfnote.hrc b/sw/source/ui/misc/docfnote.hrc
index 142a423f2a25..f826f276620e 100644
--- a/sw/source/ui/misc/docfnote.hrc
+++ b/sw/source/ui/misc/docfnote.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docfnote.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src
index 18f2fe814ddc..fbc1ba24393c 100644
--- a/sw/source/ui/misc/docfnote.src
+++ b/sw/source/ui/misc/docfnote.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: docfnote.src,v $
- * $Revision: 1.36 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index e5269a6f7dd7..59a918fc4030 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glosbib.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,8 +43,8 @@
#include <unotools/transliterationwrapper.hxx>
#include <unotools/tempfile.hxx>
-#include <svtools/svstdarr.hxx>
-#include <svtools/pathoptions.hxx>
+#include <svl/svstdarr.hxx>
+#include <unotools/pathoptions.hxx>
#include <swtypes.hxx>
#include <glosbib.hxx>
#include <gloshdl.hxx>
diff --git a/sw/source/ui/misc/glosbib.hrc b/sw/source/ui/misc/glosbib.hrc
index aeed10f2e5de..834163d52fe0 100644
--- a/sw/source/ui/misc/glosbib.hrc
+++ b/sw/source/ui/misc/glosbib.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glosbib.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src
index 3312ad896426..30a4a9e81930 100644
--- a/sw/source/ui/misc/glosbib.src
+++ b/sw/source/ui/misc/glosbib.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glosbib.src,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 94d2f04a9b0e..9ce1038eb898 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glosdoc.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,17 +35,17 @@
#define _SVSTDARR_STRINGS
#include <unotools/transliterationwrapper.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#ifndef __RSC //autogen
#include <tools/errinf.hxx>
#endif
#include <tools/debug.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#ifndef SVTOOLS_FSTATHELPER_HXX
-#include <svtools/fstathelper.hxx>
+#include <svl/fstathelper.hxx>
#endif
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <unotools/tempfile.hxx>
#include <swtypes.hxx>
#include <errhdl.hxx> // ASSERT
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index ef368f680378..fe6950ef4722 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glossary.cxx,v $
- * $Revision: 1.49 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,57 +27,45 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#ifdef SW_DLLIMPLEMENTATION
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGS
#include <hintids.hxx>
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _HELP_HXX //autogen
#include <vcl/help.hxx>
-#endif
#ifndef _SVSTDARR_HXX
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/stritem.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/lingucfg.hxx>
+#include <svl/stritem.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/lingucfg.hxx>
#include <sfx2/request.hxx>
#include <sfx2/fcontnr.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include <sfx2/viewfrm.hxx>
#include <unocrsr.hxx>
#include <unotools.hxx>
-#include <unoobj.hxx>
#include <comphelper/processfactory.hxx>
#include <ucbhelper/content.hxx>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <unotools/charclass.hxx>
#include <swwait.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <glossary.hxx>
#include <gloshdl.hxx>
#include <glosbib.hxx>
@@ -88,20 +73,12 @@
#include <glosdoc.hxx>
#include <macassgn.hxx>
#include <swevent.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <shellio.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -1216,7 +1193,7 @@ IMPL_LINK( SwGlossaryDlg, PathHdl, Button *, pBtn )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- AbstractSvxMultiPathDialog* pDlg = pFact->CreateSvxMultiPathDialog( pBtn, RID_SVXDLG_MULTIPATH);
+ AbstractSvxMultiPathDialog* pDlg = pFact->CreateSvxMultiPathDialog( pBtn );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
SvtPathOptions aPathOpt;
String sGlosPath( aPathOpt.GetAutoTextPath() );
diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc
index 12375a41bf9d..4ee5aaaa7ede 100644
--- a/sw/source/ui/misc/glossary.hrc
+++ b/sw/source/ui/misc/glossary.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glossary.hrc,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src
index 34a0200f4025..3ed5c4939791 100644
--- a/sw/source/ui/misc/glossary.src
+++ b/sw/source/ui/misc/glossary.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glossary.src,v $
- * $Revision: 1.42 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx
index a79e67eec31c..b3011985bbc0 100644
--- a/sw/source/ui/misc/glshell.cxx
+++ b/sw/source/ui/misc/glshell.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glshell.cxx,v $
- * $Revision: 1.17.236.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,16 +31,16 @@
#include <com/sun/star/frame/XTitle.hpp>
#include <tools/list.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/request.hxx>
#include <sfx2/sfxsids.hrc>
-#include <svx/srchitem.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/srchitem.hxx>
+#include <svl/macitem.hxx>
#include <gloshdl.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
@@ -154,10 +151,10 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
--------------------------------------------------------------------*/
-SwGlosDocShell::SwGlosDocShell( sal_Bool bNewShow)
- :
- SwDocShell( bShow ? SFX_CREATE_MODE_STANDARD : SFX_CREATE_MODE_INTERNAL )
- ,bShow ( bNewShow )
+SwGlosDocShell::SwGlosDocShell(sal_Bool bNewShow)
+ : SwDocShell( (bNewShow)
+ ? SFX_CREATE_MODE_STANDARD : SFX_CREATE_MODE_INTERNAL )
+ , bShow ( bNewShow )
{
SetHelpId(SW_GLOSDOCSHELL);
}
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index c7a60550a0a2..a1b305b3b7db 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: impfnote.hxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index d659ceb0b6f1..b67981018015 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insfnote.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,10 +33,10 @@
#endif
#include <hintids.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/request.hxx>
-#include <svx/fontitem.hxx>
+#include <editeng/fontitem.hxx>
#include <vcl/msgbox.hxx>
#include <fmtftn.hxx>
#include <swundo.hxx>
diff --git a/sw/source/ui/misc/insfnote.hrc b/sw/source/ui/misc/insfnote.hrc
index c848b231a234..8ac15b4f9fc3 100644
--- a/sw/source/ui/misc/insfnote.hrc
+++ b/sw/source/ui/misc/insfnote.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insfnote.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src
index c7f81ebc1261..1bf5f77dcb2e 100644
--- a/sw/source/ui/misc/insfnote.src
+++ b/sw/source/ui/misc/insfnote.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insfnote.src,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx
index b2d38797222f..c053030201ad 100644
--- a/sw/source/ui/misc/insrule.cxx
+++ b/sw/source/ui/misc/insrule.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insrule.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,8 +39,8 @@
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svx/brshitem.hxx>
-#include <svtools/urihelper.hxx>
+#include <editeng/brshitem.hxx>
+#include <svl/urihelper.hxx>
#include <vcl/graph.hxx>
#include "swtypes.hxx"
diff --git a/sw/source/ui/misc/insrule.hrc b/sw/source/ui/misc/insrule.hrc
index 82974dafdecc..47289f2c366a 100644
--- a/sw/source/ui/misc/insrule.hrc
+++ b/sw/source/ui/misc/insrule.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insrule.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/insrule.src b/sw/source/ui/misc/insrule.src
index 9c0767f15eca..89890e5904af 100644
--- a/sw/source/ui/misc/insrule.src
+++ b/sw/source/ui/misc/insrule.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: insrule.src,v $
- * $Revision: 1.21.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 58babb639807..213c0e99e413 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: linenum.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <sfx2/viewfrm.hxx>
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#include <vcl/msgbox.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
diff --git a/sw/source/ui/misc/linenum.hrc b/sw/source/ui/misc/linenum.hrc
index 45ba74a9f572..235d13576aa3 100644
--- a/sw/source/ui/misc/linenum.hrc
+++ b/sw/source/ui/misc/linenum.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: linenum.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/linenum.src b/sw/source/ui/misc/linenum.src
index c62ab7b38c09..b82828a86362 100644
--- a/sw/source/ui/misc/linenum.src
+++ b/sw/source/ui/misc/linenum.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: linenum.src,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/makefile.mk b/sw/source/ui/misc/makefile.mk
index a0f2484f4880..72d9f80aec3f 100644
--- a/sw/source/ui/misc/makefile.mk
+++ b/sw/source/ui/misc/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.14.236.1 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index c1e46a1b4dfb..43c92a72a3f7 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: num.cxx,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,10 +44,9 @@
#include <sfx2/app.hxx>
#include <sfx2/imgmgr.hxx>
#include <svx/gallery.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/impgrf.hxx>
-#include <svx/numitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/numitem.hxx>
#include <swvset.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
@@ -93,9 +89,9 @@
#include <SwStyleNameMapper.hxx>
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
-#include <svtools/stritem.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/stritem.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/slstitm.hxx>
static BOOL bLastRelative = FALSE;
diff --git a/sw/source/ui/misc/num.hrc b/sw/source/ui/misc/num.hrc
index 174d3980476f..379c8cb3e56d 100644
--- a/sw/source/ui/misc/num.hrc
+++ b/sw/source/ui/misc/num.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: num.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/num.src b/sw/source/ui/misc/num.src
index b2a253ecfd18..a89c30bb032a 100644
--- a/sw/source/ui/misc/num.src
+++ b/sw/source/ui/misc/num.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: num.src,v $
- * $Revision: 1.39 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 38e2cc6fc0bd..964d04738755 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numberingtypelistbox.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/numberingtypelistbox.src b/sw/source/ui/misc/numberingtypelistbox.src
index bfc5cebed93f..8ca6e214e614 100644
--- a/sw/source/ui/misc/numberingtypelistbox.src
+++ b/sw/source/ui/misc/numberingtypelistbox.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numberingtypelistbox.src,v $
- * $Revision: 1.20.252.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 9fd448fcb210..e733aa0389c2 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: outline.cxx,v $
- * $Revision: 1.41 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,7 +39,7 @@
#include <vcl/msgbox.hxx>
#endif
#include <sfx2/tabdlg.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/brshitem.hxx>
#include <unotools/configmgr.hxx>
#include <SwStyleNameMapper.hxx>
@@ -65,7 +62,7 @@
#include <uinums.hxx>
#include <poolfmt.hxx>
#include <shellres.hxx>
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#include <charfmt.hxx>
#include <docstyle.hxx>
#include <viewopt.hxx>
diff --git a/sw/source/ui/misc/outline.hrc b/sw/source/ui/misc/outline.hrc
index 2b734c37db03..2f8a4a469cb4 100644
--- a/sw/source/ui/misc/outline.hrc
+++ b/sw/source/ui/misc/outline.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: outline.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/outline.src b/sw/source/ui/misc/outline.src
index 5857e3a10fec..d7dffb4a000b 100644
--- a/sw/source/ui/misc/outline.src
+++ b/sw/source/ui/misc/outline.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: outline.src,v $
- * $Revision: 1.34 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 3f0c634f2b24..9d940b33d332 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pgfnote.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -48,11 +45,11 @@
#include <vcl/field.hxx>
#include <vcl/svapp.hxx>
#include <unotools/localedatawrapper.hxx>
-#include <svtools/syslocale.hxx>
-#include <svx/sizeitem.hxx>
+#include <unotools/syslocale.hxx>
+#include <editeng/sizeitem.hxx>
#include <svx/pageitem.hxx>
-#include <svtools/eitem.hxx>
-#include <svx/ulspitem.hxx>
+#include <svl/eitem.hxx>
+#include <editeng/ulspitem.hxx>
#include <uitool.hxx>
#include <pagedesc.hxx>
#include <pgfnote.hxx>
diff --git a/sw/source/ui/misc/pgfnote.hrc b/sw/source/ui/misc/pgfnote.hrc
index d71a16735865..fe94849c6d66 100644
--- a/sw/source/ui/misc/pgfnote.hrc
+++ b/sw/source/ui/misc/pgfnote.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pgfnote.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/pgfnote.src b/sw/source/ui/misc/pgfnote.src
index 98e8d41cdf98..4ad558da0117 100644
--- a/sw/source/ui/misc/pgfnote.src
+++ b/sw/source/ui/misc/pgfnote.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pgfnote.src,v $
- * $Revision: 1.32 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 3fb0157b89f3..a6e20cc56dc3 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pggrid.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,11 +46,11 @@
#endif
#include <svx/xtable.hxx>
#include <uitool.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <pggrid.hxx>
#include <tgrditem.hxx>
#include <pggrid.hrc>
diff --git a/sw/source/ui/misc/pggrid.hrc b/sw/source/ui/misc/pggrid.hrc
index cb0735a4ee5c..e156792c955d 100644
--- a/sw/source/ui/misc/pggrid.hrc
+++ b/sw/source/ui/misc/pggrid.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pggrid.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src
index a7bdd513d260..b03ec2a687c1 100644
--- a/sw/source/ui/misc/pggrid.src
+++ b/sw/source/ui/misc/pggrid.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pggrid.src,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index a0da69f942e5..b87060bd19b0 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: redlndlg.cxx,v $
- * $Revision: 1.29.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,9 +38,9 @@
#include <tools/datetime.hxx>
#include <vcl/msgbox.hxx>
#ifndef _SVSTDARR_HXX
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/ctredlin.hxx>
@@ -1281,7 +1278,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
rRedline.GetRedlineData().GetTimeStamp() ),
SID_ATTR_POSTIT_DATE ));
- AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, RID_SVXDLG_POSTIT, FALSE );
+ AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, FALSE );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
diff --git a/sw/source/ui/misc/redlndlg.hrc b/sw/source/ui/misc/redlndlg.hrc
index f3bb36d08b41..838b79f37d48 100644
--- a/sw/source/ui/misc/redlndlg.hrc
+++ b/sw/source/ui/misc/redlndlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: redlndlg.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/redlndlg.src b/sw/source/ui/misc/redlndlg.src
index e653f7e546a4..39418495363c 100644
--- a/sw/source/ui/misc/redlndlg.src
+++ b/sw/source/ui/misc/redlndlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: redlndlg.src,v $
- * $Revision: 1.31 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 0b2ff55c7c41..f03a6de204d9 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srtdlg.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,11 +36,11 @@
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svtools/intitem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svxids.hrc>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include <unotools/collatorwrapper.hxx>
diff --git a/sw/source/ui/misc/srtdlg.hrc b/sw/source/ui/misc/srtdlg.hrc
index ed95dedf312b..101f819b8739 100644
--- a/sw/source/ui/misc/srtdlg.hrc
+++ b/sw/source/ui/misc/srtdlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srtdlg.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src
index 7f55cc748b8f..a1e6caad6c5e 100644
--- a/sw/source/ui/misc/srtdlg.src
+++ b/sw/source/ui/misc/srtdlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srtdlg.src,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 6039600d037c..954d1a017a77 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swmodalredlineacceptdlg.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,9 +42,9 @@
#include <tools/datetime.hxx>
#include <vcl/msgbox.hxx>
#ifndef _SVSTDARR_HXX
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/ctredlin.hxx>
diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx
index 0d5b784cd722..4b2fafbd6040 100644
--- a/sw/source/ui/ribbar/conarc.cxx
+++ b/sw/source/ui/ribbar/conarc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conarc.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx
index 809b593dec0c..66ba929fae47 100644
--- a/sw/source/ui/ribbar/concustomshape.cxx
+++ b/sw/source/ui/ribbar/concustomshape.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: concustomshape.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,7 +39,7 @@
#include <svx/sdtaaitm.hxx>
#include <svx/svdview.hxx>
#include <svx/svdocapt.hxx>
-#include <svx/outlobj.hxx>
+#include <editeng/outlobj.hxx>
#ifndef _CMDID_H
#include <cmdid.h>
#endif
@@ -61,10 +58,10 @@
#ifndef _FM_FMMODEL_HXX
#include <svx/fmmodel.hxx>
#endif
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdoashp.hxx>
-#include <svx/adjitem.hxx>
+#include <editeng/adjitem.hxx>
#include <math.h>
diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx
index f62569da2adc..8682e1d34462 100644
--- a/sw/source/ui/ribbar/conform.cxx
+++ b/sw/source/ui/ribbar/conform.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conform.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx
index 8ef5c4c70d46..0dbf109cc783 100644
--- a/sw/source/ui/ribbar/conpoly.cxx
+++ b/sw/source/ui/ribbar/conpoly.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conpoly.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx
index e5540dab1c11..3d77ae4829af 100644
--- a/sw/source/ui/ribbar/conrect.cxx
+++ b/sw/source/ui/ribbar/conrect.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: conrect.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,22 +39,15 @@
#include <svx/sdtaaitm.hxx>
#include <svx/svdview.hxx>
#include <svx/svdocapt.hxx>
-#include <svx/outlobj.hxx>
-#ifndef _CMDID_H
+#include <editeng/outlobj.hxx>
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <edtwin.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
-#ifndef _DRAWBASE_HXX
#include <drawbase.hxx>
-#endif
-#ifndef _CONRECT_HXX
#include <conrect.hxx>
-#endif
+
/*************************************************************************
|*
@@ -119,7 +109,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
case OBJ_TEXT:
if( bMarquee )
{
- m_pSh->ChgAnchor(FLY_IN_CNTNT);
+ m_pSh->ChgAnchor(FLY_AS_CHAR);
if( pObj )
{
diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx
index f6a48d36cd68..61dcd3f23505 100644
--- a/sw/source/ui/ribbar/drawbase.cxx
+++ b/sw/source/ui/ribbar/drawbase.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drawbase.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,8 +31,8 @@
#include <tools/list.hxx>
#include <svx/svdview.hxx>
#include <svx/svdobj.hxx>
-#include <svtools/ptitem.hxx>
-#include <svx/sizeitem.hxx>
+#include <svl/ptitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
#include <fmtclds.hxx>
@@ -344,7 +341,8 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if ( xRecorder.is() )
{
SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
- aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, (USHORT)FLY_AT_CNTNT ));
+ aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME,
+ static_cast<USHORT>(FLY_AT_PARA) ));
aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
aReq.Done();
diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx
index aecaec3e1f64..b7651eba981e 100644
--- a/sw/source/ui/ribbar/dselect.cxx
+++ b/sw/source/ui/ribbar/dselect.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dselect.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index 764d83a8e8e7..c14f91632a4c 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inputwin.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,8 +34,8 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/ruler.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/stritem.hxx>
#include "swtypes.hxx"
#include "cmdid.h"
diff --git a/sw/source/ui/ribbar/inputwin.hrc b/sw/source/ui/ribbar/inputwin.hrc
index 75cf9446a93a..96e45ac38708 100644
--- a/sw/source/ui/ribbar/inputwin.hrc
+++ b/sw/source/ui/ribbar/inputwin.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inputwin.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src
index 20e406811b04..13d5fcdd0eae 100644
--- a/sw/source/ui/ribbar/inputwin.src
+++ b/sw/source/ui/ribbar/inputwin.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: inputwin.src,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk
index fa0b6a9488df..72acc793070a 100644
--- a/sw/source/ui/ribbar/makefile.mk
+++ b/sw/source/ui/ribbar/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx
index 5441943c126f..5c214950f4bc 100644
--- a/sw/source/ui/ribbar/tblctrl.cxx
+++ b/sw/source/ui/ribbar/tblctrl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tblctrl.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,7 @@
#include "precompiled_sw.hxx"
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <vcl/toolbox.hxx>
#include <sfx2/app.hxx>
diff --git a/sw/source/ui/ribbar/tblctrl.hrc b/sw/source/ui/ribbar/tblctrl.hrc
index 2ca196c23951..7cfa32d7bb5d 100644
--- a/sw/source/ui/ribbar/tblctrl.hrc
+++ b/sw/source/ui/ribbar/tblctrl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tblctrl.hrc,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/tblctrl.src b/sw/source/ui/ribbar/tblctrl.src
index 5da3bbce104a..0c783172af74 100644
--- a/sw/source/ui/ribbar/tblctrl.src
+++ b/sw/source/ui/ribbar/tblctrl.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tblctrl.src,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx
index fc086a1143c2..6c20f9dd818d 100644
--- a/sw/source/ui/ribbar/tbxanchr.cxx
+++ b/sw/source/ui/ribbar/tbxanchr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tbxanchr.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <vcl/timer.hxx>
#include <sfx2/app.hxx>
#include <svx/htmlmode.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <sfx2/dispatch.hxx>
#ifndef _TOOLBOX_HXX //autogen
#include <vcl/toolbox.hxx>
diff --git a/sw/source/ui/ribbar/tbxanchr.src b/sw/source/ui/ribbar/tbxanchr.src
index 1328577f5a75..41067b18fb08 100644
--- a/sw/source/ui/ribbar/tbxanchr.src
+++ b/sw/source/ui/ribbar/tbxanchr.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tbxanchr.src,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/tbxmgr.cxx b/sw/source/ui/ribbar/tbxmgr.cxx
index a97e9bdbe85c..cbef12105242 100644
--- a/sw/source/ui/ribbar/tbxmgr.cxx
+++ b/sw/source/ui/ribbar/tbxmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tbxmgr.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 51e818604dae..f802751a47ea 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: workctrl.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svx/htmlmode.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
@@ -65,7 +62,7 @@
#include <helpid.h>
#endif
#include <wrtsh.hxx>
-#include <svtools/imageitm.hxx>
+#include <svl/imageitm.hxx>
#include <vcl/lstbox.hxx>
#include <rtl/ustring.hxx>
#include "swabstdlg.hxx"
diff --git a/sw/source/ui/ribbar/workctrl.hrc b/sw/source/ui/ribbar/workctrl.hrc
index fc02beda45a5..5e5180f363aa 100644
--- a/sw/source/ui/ribbar/workctrl.hrc
+++ b/sw/source/ui/ribbar/workctrl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: workctrl.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src
index cb1aef76919f..93681f526502 100644
--- a/sw/source/ui/ribbar/workctrl.src
+++ b/sw/source/ui/ribbar/workctrl.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: workctrl.src,v $
- * $Revision: 1.53 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 1a34e2972956..886ff9c3b81c 100755
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: annotsh.cxx,v $
- * $Revision: 1.7.82.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -42,42 +39,42 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
-#include <svx/spltitem.hxx>
-#include <svx/orphitem.hxx>
-#include <svx/brkitem.hxx>
-#include <svx/widwitem.hxx>
-#include <svx/kernitem.hxx>
-#include <svx/escpitem.hxx>
-#include <svx/lspcitem.hxx>
-#include <svx/adjitem.hxx>
-#include <svx/crsditem.hxx>
-#include <svx/shdditem.hxx>
-#include <svx/hyznitem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/fhgtitem.hxx>
+#include <editeng/spltitem.hxx>
+#include <editeng/orphitem.hxx>
+#include <editeng/brkitem.hxx>
+#include <editeng/widwitem.hxx>
+#include <editeng/kernitem.hxx>
+#include <editeng/escpitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/crsditem.hxx>
+#include <editeng/shdditem.hxx>
+#include <editeng/hyznitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/fhgtitem.hxx>
#include <svx/clipfmtitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/slstitm.hxx>
-#include <svx/colritem.hxx>
-#include <svx/wghtitem.hxx>
-#include <svx/cntritem.hxx>
-#include <svx/postitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/slstitm.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/cntritem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <svx/svdoutl.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/cjkoptions.hxx>
-#include <svtools/ctloptions.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/whiter.hxx>
+#include <svl/cjkoptions.hxx>
+#include <svl/ctloptions.hxx>
+#include <unotools/useroptions.hxx>
#include <vcl/msgbox.hxx>
-#include <svx/flditem.hxx>
-#include <svx/editstat.hxx>
+#include <editeng/flditem.hxx>
+#include <editeng/editstat.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/langitem.hxx>
-#include <svx/unolingu.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svx/writingmodeitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/unolingu.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/writingmodeitem.hxx>
#include <swundo.hxx>
#include <doc.hxx>
#include <viewopt.hxx>
@@ -108,18 +105,18 @@
#include <svx/dialogs.hrc>
#include <svx/svxids.hrc>
-#include <svtools/itempool.hxx>
-#include <svx/outliner.hxx>
-#include <svx/editeng.hxx>
-#include <svx/editview.hxx>
+#include <svl/itempool.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
-#include <svtools/languageoptions.hxx>
-#include <svx/langitem.hxx>
+#include <svl/languageoptions.hxx>
+#include <editeng/langitem.hxx>
#include <svtools/langtab.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include <docsh.hxx>
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
#include "swabstdlg.hxx" //CHINA001
#include "chrdlg.hrc" //CHINA001
#include "misc.hrc"
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 9f5ee6195e81..ab8d63ec7f12 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: basesh.cxx,v $
- * $Revision: 1.87 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,45 +29,44 @@
#include "precompiled_sw.hxx"
#include <sot/factory.hxx>
#include <hintids.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/languageoptions.hxx>
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
#endif
-#include <svx/linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <svx/htmlmode.hxx>
#include <svx/imapdlg.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/visitem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/visitem.hxx>
#include <sfx2/objitem.hxx>
#include <svtools/filter.hxx>
#include <svx/gallery.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/clipfmtitem.hxx>
#include <svx/contdlg.hxx>
#include <vcl/graph.hxx>
-#include <svx/impgrf.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/ptitem.hxx>
-#include <svtools/itemiter.hxx>
-#include <svtools/stritem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/shaditem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/srchitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/opaqitem.hxx>
-#include <svx/sizeitem.hxx>
+#include <svl/ptitem.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/stritem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/shaditem.hxx>
+#include <editeng/boxitem.hxx>
+#include <svl/srchitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/opaqitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <svx/flagsdef.hxx>
-#include <svx/scripttypeitem.hxx>
+#include <editeng/scripttypeitem.hxx>
#include <sfx2/objface.hxx>
#include <fmturl.hxx>
#include <fmthdft.hxx>
@@ -100,9 +96,7 @@
#include <tblafmt.hxx>
#include <caption.hxx>
#include <swwait.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -517,6 +511,9 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
+ // #i106349#: save pointer: undo/redo may delete the shell, i.e., this!
+ SfxViewFrame *const pViewFrame( GetView().GetViewFrame() );
+
switch( nId )
{
case SID_UNDO:
@@ -538,7 +535,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
DBG_ERROR("falscher Dispatcher");
}
- GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
+ if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(sal_False); }
}
/*--------------------------------------------------------------------
@@ -1060,14 +1057,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FN_TOOL_ANKER_FRAME:
{
RndStdIds eSet = nSlot == FN_TOOL_ANKER_PAGE
- ? FLY_PAGE
+ ? FLY_AT_PAGE
: nSlot == FN_TOOL_ANKER_PARAGRAPH
- ? FLY_AT_CNTNT
+ ? FLY_AT_PARA
: nSlot == FN_TOOL_ANKER_FRAME
? FLY_AT_FLY
: nSlot == FN_TOOL_ANKER_CHAR
- ? FLY_IN_CNTNT
- : FLY_AUTO_CNTNT;
+ ? FLY_AS_CHAR
+ : FLY_AT_CHAR;
rSh.StartUndo();
if( rSh.IsObjSelected() )
rSh.ChgAnchor( eSet );
@@ -1098,7 +1095,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
switch( eSet )
{
case FLY_AT_FLY:
- case FLY_PAGE:
+ case FLY_AT_PAGE:
//Durchlauf, links oder von links, oben, von oben
if(eSurround != SURROUND_THROUGHT)
@@ -1111,7 +1108,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
//links, von links, rechts, oben, kein Uml, li+re Umlauf,
if(eSurround != SURROUND_LEFT || eSurround != SURROUND_RIGHT)
aSet.Put(SwFmtSurround(SURROUND_LEFT));
@@ -1123,7 +1120,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
//links, von links, rechts, oben, Durchlauf
if(eSurround != SURROUND_THROUGHT)
aSet.Put(SwFmtSurround(SURROUND_THROUGHT));
@@ -1621,12 +1618,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
rSh.GetFlyFrmAttr(aSet);
RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
- BOOL bSet;
- bSet = (nWhich == FN_TOOL_ANKER_PAGE && eSet == FLY_PAGE) ||
- (nWhich == FN_TOOL_ANKER_PARAGRAPH && eSet == FLY_AT_CNTNT) ||
- (nWhich == FN_TOOL_ANKER_FRAME && eSet == FLY_AT_FLY) ||
- (nWhich == FN_TOOL_ANKER_AT_CHAR && eSet == FLY_AUTO_CNTNT) ||
- (nWhich == FN_TOOL_ANKER_CHAR && eSet == FLY_IN_CNTNT);
+ const BOOL bSet =
+ ((nWhich == FN_TOOL_ANKER_PAGE) &&
+ (eSet == FLY_AT_PAGE))
+ || ((nWhich == FN_TOOL_ANKER_PARAGRAPH) &&
+ (eSet == FLY_AT_PARA))
+ || ((nWhich == FN_TOOL_ANKER_FRAME) &&
+ (eSet == FLY_AT_FLY))
+ || ((nWhich == FN_TOOL_ANKER_AT_CHAR) &&
+ (eSet == FLY_AT_CHAR))
+ || ((nWhich == FN_TOOL_ANKER_CHAR) &&
+ (eSet == FLY_AS_CHAR));
if(nWhich != FN_TOOL_ANKER)
{
USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
@@ -1643,16 +1645,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
switch (eSet)
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
nSlotId = FN_TOOL_ANKER_PAGE;
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
nSlotId = FN_TOOL_ANKER_PARAGRAPH;
break;
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
nSlotId = FN_TOOL_ANKER_CHAR;
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
nSlotId = FN_TOOL_ANKER_AT_CHAR;
break;
case FLY_AT_FLY:
@@ -1702,15 +1704,18 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
SwSurround nSurround = rWrap.GetSurround();
BOOL bSet = FALSE;
- BOOL bDisable = nAnchorType == - 1 || nAnchorType == FLY_IN_CNTNT;
- BOOL bHtmlMode = 0 != ::GetHtmlMode(GetView().GetDocShell());
+ bool bDisable =
+ (nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR);
+ const bool bHtmlMode =
+ 0 != ::GetHtmlMode(GetView().GetDocShell());
switch( nWhich )
{
case FN_FRAME_NOWRAP:
bDisable |=
- ( nAnchorType != FLY_AT_CNTNT &&
- nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE);
+ ( (nAnchorType != FLY_AT_PARA)
+ && (nAnchorType != FLY_AT_CHAR)
+ && (nAnchorType != FLY_AT_PAGE));
bSet = nSurround == SURROUND_NONE;
break;
case FN_FRAME_WRAP:
@@ -1723,7 +1728,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_FRAME_WRAPTHRU:
bDisable |= (bHtmlMode ||
- (nAnchorType != FLY_AT_CNTNT&& nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE));
+ ( (nAnchorType != FLY_AT_PARA)
+ && (nAnchorType != FLY_AT_CHAR)
+ && (nAnchorType != FLY_AT_PAGE)));
if(bObj)
bSet = nSurround == SURROUND_THROUGHT && rSh.GetLayerId();
else
@@ -1763,7 +1770,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_WRAP_ANCHOR_ONLY:
bDisable |= (bHtmlMode ||
- (nAnchorType != FLY_AT_CNTNT));
+ (nAnchorType != FLY_AT_PARA));
bSet = rWrap.IsAnchorOnly();
break;
case FN_FRAME_WRAP_LEFT:
diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx
index cc3493fe5120..cc6a3176643f 100644
--- a/sw/source/ui/shells/beziersh.cxx
+++ b/sw/source/ui/shells/beziersh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: beziersh.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,9 +31,9 @@
#include "cmdid.h"
#include <svx/svdview.hxx>
-#include <svx/srchitem.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/srchitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/whiter.hxx>
#include <svx/svdopath.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx
index 8cad5be21ccb..56b783a25711 100644
--- a/sw/source/ui/shells/drawdlg.cxx
+++ b/sw/source/ui/shells/drawdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drawdlg.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -83,7 +80,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
- SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, RID_SVXDLG_TEXT, pView );
+ SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, pView );
USHORT nResult = pDlg->Execute();
if (nResult == RET_OK)
@@ -111,7 +108,6 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
AbstractSvxAreaTabDialog * pDlg = pFact->CreateSvxAreaTabDialog( NULL,
&aNewAttr,
pDoc,
- RID_SVXDLG_AREA,
pView);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
const SvxColorTableItem* pColorItem = (const SvxColorTableItem*)
@@ -154,7 +150,6 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SfxAbstractTabDialog * pDlg = pFact->CreateSvxLineTabDialog( NULL,
&aNewAttr,
pDoc,
- RID_SVXDLG_LINE,
pObj,
bHasMarked);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index 4da015e2d586..eb571036e322 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drawsh.cxx,v $
- * $Revision: 1.20.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,13 +32,13 @@
#include <tools/shl.hxx>
#include <svx/svdview.hxx>
#include <svx/svdotext.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/fontwork.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/objface.hxx>
-#include <svtools/itemiter.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/srchitem.hxx>
#include <svx/xftsfit.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx
index 97cac7006b98..13b1f1059b8d 100644
--- a/sw/source/ui/shells/drformsh.cxx
+++ b/sw/source/ui/shells/drformsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drformsh.cxx,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,13 +33,13 @@
#include <hintids.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/svdview.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/app.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svx/fmglob.hxx>
#include <svx/svdouno.hxx>
#include <com/sun/star/form/FormButtonType.hpp>
@@ -59,7 +56,7 @@
#include "shells.hrc"
#include "drwbassh.hxx"
#include "drformsh.hxx"
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <view.hxx>
#include <sfx2/docfile.hxx>
#include <docsh.hxx>
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 339c332c9135..2bd3a59d0810 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drwbassh.cxx,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,19 +36,17 @@
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/aeitem.hxx>
+#include <svl/aeitem.hxx>
#include <svx/svdview.hxx>
#include <vcl/msgbox.hxx>
-#include <svx/srchitem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/srchitem.hxx>
+#include <svl/whiter.hxx>
#include <svx/swframevalidation.hxx>
#include <svx/anchorid.hxx>
#include <svx/htmlmode.hxx>
#include <uitool.hxx>
#include <fmtornt.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <wview.hxx>
@@ -238,7 +233,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if ( pFact )
{
AbstractSvxCaptionDialog* pCaptionDlg =
- pFact->CreateCaptionDialog( NULL, pSdrView, RID_SVXDLG_CAPTION, nAllowedAnchors );
+ pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors );
pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg = pCaptionDlg;
DBG_ASSERT(pDlg, "Dialogdiet fail!");
@@ -251,7 +246,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
AbstractSvxTransformTabDialog* pTransform =
- pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, RID_SVXDLG_TRANSFORM, nAllowedAnchors );
+ pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors );
pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg = pTransform;
DBG_ASSERT(pDlg, "Dialogdiet fail!");
@@ -479,7 +474,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{ // Objekte nicht aneinander ausrichten
USHORT nAnchor = pSh->GetAnchorId();
- if (nAnchor == FLY_IN_CNTNT)
+ if (nAnchor == FLY_AS_CHAR)
{
sal_Int16 nVertOrient = -1;
@@ -509,7 +504,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
break;
}
- if (nAnchor == FLY_AT_CNTNT)
+ if (nAnchor == FLY_AT_PARA)
break; // Absatzverankerte Rahmen nicht ausrichten
}
@@ -567,7 +562,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName, RID_SVXDLG_OBJECT_NAME);
+ AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->SetCheckNameHdl(LINK(this, SwDrawBaseShell, CheckGroupShapeNameHdl));
@@ -599,7 +594,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription, RID_SVXDLG_OBJECT_TITLE_DESC);
+ AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
@@ -855,7 +850,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nWidth = pValidation->nHeight;
pValidation->nHeight = nTmp;
}
- if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY )
+ if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY))
{
// MinimalPosition
pValidation->nMinHPos = aBoundRect.Left();
@@ -903,7 +898,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nMaxVPos = aBoundRect.Bottom() - pValidation->nHeight;
pValidation->nMaxWidth = aBoundRect.Right() - nH;
}
- else if ( eAnchorType == FLY_AT_CNTNT || eAnchorType == FLY_AUTO_CNTNT )
+ else if ((eAnchorType == FLY_AT_PARA) || (eAnchorType == FLY_AT_CHAR))
{
if (pValidation->nHPos + pValidation->nWidth > aBoundRect.Right())
{
@@ -964,7 +959,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nMaxHeight = pValidation->nMaxVPos + pValidation->nHeight - nV;
pValidation->nMaxWidth = pValidation->nMaxHPos + pValidation->nWidth - nH;
}
- else if ( eAnchorType == FLY_IN_CNTNT )
+ else if (eAnchorType == FLY_AS_CHAR)
{
pValidation->nMinHPos = 0;
pValidation->nMaxHPos = 0;
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 11874ca5b151..94d49720a50c 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drwtxtex.cxx,v $
- * $Revision: 1.46.82.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,46 +31,46 @@
#include <tools/shl.hxx>
#include <svx/svdview.hxx>
-#include <svx/spltitem.hxx>
-#include <svx/orphitem.hxx>
-#include <svx/brkitem.hxx>
-#include <svx/widwitem.hxx>
-#include <svx/kernitem.hxx>
-#include <svx/escpitem.hxx>
+#include <editeng/spltitem.hxx>
+#include <editeng/orphitem.hxx>
+#include <editeng/brkitem.hxx>
+#include <editeng/widwitem.hxx>
+#include <editeng/kernitem.hxx>
+#include <editeng/escpitem.hxx>
#ifndef _SVX_PARAITEM_HXX //autogen
-#include <svx/lspcitem.hxx>
+#include <editeng/lspcitem.hxx>
#endif
-#include <svx/adjitem.hxx>
-#include <svx/crsditem.hxx>
-#include <svx/shdditem.hxx>
-#include <svx/hyznitem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/fhgtitem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/wghtitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/crsditem.hxx>
+#include <editeng/shdditem.hxx>
+#include <editeng/hyznitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/wghtitem.hxx>
#ifndef _SVX_CNTRITEM_HXX //autogen
-#include <svx/cntritem.hxx>
+#include <editeng/cntritem.hxx>
#endif
-#include <svx/postitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <svx/svdoutl.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/cjkoptions.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/whiter.hxx>
+#include <svl/cjkoptions.hxx>
+#include <svl/ctloptions.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
-#include <svx/flditem.hxx>
-#include <svx/editstat.hxx>
+#include <editeng/flditem.hxx>
+#include <editeng/editstat.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/langitem.hxx>
-#include <svx/unolingu.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svx/writingmodeitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/unolingu.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/writingmodeitem.hxx>
#include <doc.hxx>
#include <wview.hxx>
#include <viewopt.hxx>
@@ -99,18 +96,18 @@
#include "misc.hrc"
//modified on Jul. 30th
-#include <svtools/languageoptions.hxx>
-#include <svx/langitem.hxx>
+#include <svl/languageoptions.hxx>
+#include <editeng/langitem.hxx>
#include <svtools/langtab.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include <string.h>
-#include <svx/eeitem.hxx>
-#include <svx/editeng.hxx>
-#include <svx/editdata.hxx>
-#include <svx/outliner.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editdata.hxx>
+#include <editeng/outliner.hxx>
#include <vcl/window.hxx>
-#include <svx/editview.hxx>
+#include <editeng/editview.hxx>
#include <vcl/outdev.hxx>
#include <langhelper.hxx>
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 9f1d49ebe067..ee3a581d420b 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: drwtxtsh.cxx,v $
- * $Revision: 1.42.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,30 +27,30 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <i18npool/lang.h>
-#include <svtools/slstitm.hxx>
-#include <svtools/cjkoptions.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/langitem.hxx>
+#include <svl/slstitm.hxx>
+#include <svl/cjkoptions.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/svdview.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/objface.hxx>
#include <svx/svdotext.hxx>
#include <svx/xftsfit.hxx>
-#include <svx/editeng.hxx>
-#include <svx/editview.hxx>
-#include <svx/eeitem.hxx>
-#include <svx/scripttypeitem.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/scripttypeitem.hxx>
#include <sfx2/bindings.hxx>
#include <svx/fontwork.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
-#include <svx/outliner.hxx>
-#include <svx/editstat.hxx>
+#include <svl/whiter.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/editstat.hxx>
#include <svx/svdoutl.hxx>
-#include <unoobj.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
@@ -67,12 +64,8 @@
#include <swundo.hxx>
#include <breakit.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -577,7 +570,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
{
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog(
&(GetView().GetViewFrame()->GetWindow()),
- &aNewAttr, RID_SVXDLG_TEXT, pSdrView );
+ &aNewAttr, pSdrView );
USHORT nResult = pDlg->Execute();
if (nResult == RET_OK)
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index f7957a66077a..4523ece1f8b4 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: frmsh.cxx,v $
- * $Revision: 1.22.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,19 +30,19 @@
#include <hintids.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svtools/imapobj.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svtools/imap.hxx>
#include <sfx2/viewfrm.hxx>
#include <basic/sbstar.hxx>
-#include <svtools/rectitem.hxx>
-#include <svtools/ptitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/bolnitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/protitem.hxx>
+#include <svl/rectitem.hxx>
+#include <svl/ptitem.hxx>
+#include <svl/stritem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/bolnitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/protitem.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objface.hxx>
@@ -618,8 +615,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
AbstractSvxObjectTitleDescDialog* pDlg =
pFact->CreateSvxObjectTitleDescDialog( NULL,
aTitle,
- aDescription,
- RID_SVXDLG_OBJECT_TITLE_DESC );
+ aDescription );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 7203d9c91ebb..69e84ce48184 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: grfsh.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -40,17 +37,17 @@
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/urihelper.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objface.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/protitem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/protitem.hxx>
#include <sfx2/request.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svx/htmlmode.hxx>
#include <svx/sdgluitm.hxx>
#include <svx/sdgcoitm.hxx>
@@ -58,7 +55,7 @@
#include <svx/sdgtritm.hxx>
#include <svx/sdginitm.hxx>
#include <svx/sdgmoitm.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/brshitem.hxx>
#include <svx/grfflt.hxx>
#include <svx/tbxcolor.hxx>
#include <fmturl.hxx>
diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx
index ccf9d006c26f..6bfc86cf59af 100644
--- a/sw/source/ui/shells/grfshex.cxx
+++ b/sw/source/ui/shells/grfshex.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: grfshex.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,13 +30,9 @@
#include <docary.hxx>
-#ifndef _GRFSH_HXX
#include <grfsh.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <docary.hxx>
#ifndef _TEXTSH_HXX
#include <textsh.hxx>
@@ -51,9 +44,8 @@
#endif
#include <caption.hxx>
#define _SVSTDARR_STRINGSSORTDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svtools/filter.hxx>
-#include <svx/impgrf.hxx>
#include <svx/htmlmode.hxx>
#ifndef _DOCSH_HXX
#include <docsh.hxx>
@@ -81,7 +73,7 @@
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <avmedia/mediawindow.hxx>
#include <vcl/svapp.hxx>
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index e5e4dbe81b29..3a0fe1421a0c 100755
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: langhelper.cxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -40,19 +37,19 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
-#include <svx/eeitem.hxx>
-#include <svx/editeng.hxx>
-#include <svx/editdata.hxx>
-#include <svx/outliner.hxx>
-#include <svx/editview.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svx/langitem.hxx>
-
-#include <svtools/languageoptions.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editdata.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/langitem.hxx>
+
+#include <svl/languageoptions.hxx>
#include <svtools/langtab.hxx>
-#include <svtools/slstitm.hxx>
-#include <svtools/svstdarr.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/slstitm.hxx>
+#include <svl/svstdarr.hxx>
+#include <svl/stritem.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx
index 34f349befbc9..24a8c12d992b 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: listsh.cxx,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,19 +31,19 @@
#include "cmdid.h"
#include "hintids.hxx"
-#include <svx/sizeitem.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/brshitem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/intitem.hxx>
#include <tools/shl.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
// --> FME 2005-01-04 #i35572#
#include <numrule.hxx>
diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk
index 2e4a96c990bf..412304022516 100644
--- a/sw/source/ui/shells/makefile.mk
+++ b/sw/source/ui/shells/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.14 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx
index ae1ed883cb8b..36aa18f2d01c 100644
--- a/sw/source/ui/shells/mediash.cxx
+++ b/sw/source/ui/shells/mediash.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mediash.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -40,14 +37,14 @@
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/urihelper.hxx>
#include <sfx2/dispatch.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/protitem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/protitem.hxx>
#include <sfx2/request.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svx/htmlmode.hxx>
#include <svx/sdgluitm.hxx>
#include <svx/sdgcoitm.hxx>
@@ -55,7 +52,7 @@
#include <svx/sdgtritm.hxx>
#include <svx/sdginitm.hxx>
#include <svx/sdgmoitm.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/brshitem.hxx>
#include <svx/grfflt.hxx>
#include <fmturl.hxx>
#include <view.hxx>
diff --git a/sw/source/ui/shells/olesh.cxx b/sw/source/ui/shells/olesh.cxx
index 2bf523d27e3b..a4eef5cdbf1d 100644
--- a/sw/source/ui/shells/olesh.cxx
+++ b/sw/source/ui/shells/olesh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: olesh.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src
index 8a5a29046bd6..7e9a20bb6fc0 100644
--- a/sw/source/ui/shells/shells.src
+++ b/sw/source/ui/shells/shells.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shells.src,v $
- * $Revision: 1.54 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx
index 333128a18db9..9d162f57aa6f 100644
--- a/sw/source/ui/shells/slotadd.cxx
+++ b/sw/source/ui/shells/slotadd.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: slotadd.cxx,v $
- * $Revision: 1.30.124.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,12 +32,11 @@
#include "uiitems.hxx"
#include "cmdid.h"
-#include <svtools/globalnameitem.hxx>
-
-
-#include <svtools/imageitm.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/rectitem.hxx>
+#include <svl/globalnameitem.hxx>
+#include <editeng/memberids.hrc>
+#include <svl/imageitm.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/rectitem.hxx>
#include <sfx2/objitem.hxx>
#include <sfx2/objsh.hxx>
#include <svx/rulritem.hxx>
@@ -49,50 +45,50 @@
#include <svx/zoomslideritem.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/SmartTagItem.hxx>
-#include <svtools/ptitem.hxx>
+#include <svl/ptitem.hxx>
#include <svx/pageitem.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/tplpitem.hxx>
-#include <svx/wrlmitem.hxx>
-#include <svx/protitem.hxx>
-#include <svx/opaqitem.hxx>
+#include <editeng/wrlmitem.hxx>
+#include <editeng/protitem.hxx>
+#include <editeng/opaqitem.hxx>
#ifndef _SVX_TSTPITEM_HXX //autogen
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#endif
-#include <svx/akrnitem.hxx>
-#include <svx/keepitem.hxx>
-#include <svx/kernitem.hxx>
-#include <svx/spltitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/wghtitem.hxx>
-#include <svx/shaditem.hxx>
-#include <svx/pbinitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/prntitem.hxx>
-#include <svx/orphitem.hxx>
-#include <svx/widwitem.hxx>
-#include <svx/bolnitem.hxx>
-#include <svx/pmdlitem.hxx>
-#include <svx/cmapitem.hxx>
-#include <svx/langitem.hxx>
-#include <svx/brkitem.hxx>
-#include <svx/hyznitem.hxx>
-#include <svx/escpitem.hxx>
-#include <svx/lspcitem.hxx>
-#include <svx/adjitem.hxx>
-#include <svx/crsditem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/shdditem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/postitem.hxx>
-#include <svx/fhgtitem.hxx>
+#include <editeng/akrnitem.hxx>
+#include <editeng/keepitem.hxx>
+#include <editeng/kernitem.hxx>
+#include <editeng/spltitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/shaditem.hxx>
+#include <editeng/pbinitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/prntitem.hxx>
+#include <editeng/orphitem.hxx>
+#include <editeng/widwitem.hxx>
+#include <editeng/bolnitem.hxx>
+#include <editeng/pmdlitem.hxx>
+#include <editeng/cmapitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/brkitem.hxx>
+#include <editeng/hyznitem.hxx>
+#include <editeng/escpitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/crsditem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/shdditem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/fhgtitem.hxx>
#ifndef _SVX_CNTRITEM_HXX //autogen
-#include <svx/cntritem.hxx>
+#include <editeng/cntritem.hxx>
#endif
-#include <svx/colritem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/lrspitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/lrspitem.hxx>
#include <svx/xgrad.hxx>
#include <svx/xlnstit.hxx>
#include <svx/xlnedit.hxx>
@@ -129,12 +125,12 @@
#include "grfatr.hxx"
#include "fmtline.hxx"
#include <svx/clipfmtitem.hxx>
-#include <svx/blnkitem.hxx>
-#include <svtools/slstitm.hxx>
-#include <svx/paravertalignitem.hxx>
-#include <svx/charreliefitem.hxx>
-#include <svx/charrotateitem.hxx>
-#include <svx/charscaleitem.hxx>
+#include <editeng/blnkitem.hxx>
+#include <svl/slstitm.hxx>
+#include <editeng/paravertalignitem.hxx>
+#include <editeng/charreliefitem.hxx>
+#include <editeng/charrotateitem.hxx>
+#include <editeng/charscaleitem.hxx>
#include <svx/postattr.hxx>
#include <sfx2/frame.hxx>
#include <svx/chrtitem.hxx>
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 7ba4d0b8e954..7ff660a6c0bb 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabsh.cxx,v $
- * $Revision: 1.46.212.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,28 +31,28 @@
#ifndef _ZFORLIST_HXX
#define _ZFORLIST_DECLARE_TABLE
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#endif
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
+#include <unotools/moduleoptions.hxx>
#include <svx/rulritem.hxx>
-#include <svx/srchitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/shaditem.hxx>
-#include <svx/spltitem.hxx>
-#include <svx/langitem.hxx>
-#include <svx/keepitem.hxx>
-#include <svx/bolnitem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <svl/srchitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/shaditem.hxx>
+#include <editeng/spltitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/keepitem.hxx>
+#include <editeng/bolnitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <svx/numinf.hxx>
#include <svx/svddef.hxx>
#include <svx/svxdlg.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/request.hxx>
@@ -108,16 +105,12 @@
#ifndef _TABLE_HRC
#include <table.hrc>
#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#include <unoobj.hxx>
+#include <unobaseclass.hxx>
#define SwTableShell
#include <sfx2/msg.hxx>
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 1d10c885bc17..5c6d043e0e01 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textdrw.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,25 +36,19 @@
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <edtwin.hxx>
#include <swundo.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <sfx2/docfile.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <avmedia/mediawindow.hxx>
#include <unomid.h>
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 0dedb918aaf5..a5093e8efcdd 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textfld.cxx,v $
- * $Revision: 1.38.190.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,18 +35,18 @@
#include <fmtfld.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/useroptions.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/itempool.hxx>
+#include <unotools/useroptions.hxx>
+#include <svl/whiter.hxx>
+#include <svl/eitem.hxx>
+#include <svl/macitem.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <svx/postattr.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/svxdlg.hxx>
-#include <svx/linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <unotools/localedatawrapper.hxx>
#include <sfx2/dispatch.hxx>
#include <fmtinfmt.hxx>
@@ -463,7 +460,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact2, "Dialogdiet fail!");
- AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, RID_SVXDLG_POSTIT, bTravel, TRUE );
+ AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, TRUE );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx
index 076697ac08ff..a1a9f87ca918 100644
--- a/sw/source/ui/shells/textglos.cxx
+++ b/sw/source/ui/shells/textglos.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textglos.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,8 +30,8 @@
#include <sfx2/request.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include "errhdl.hxx"
#include "view.hxx"
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 3eb67f725acd..135a3435ca31 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textidx.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,14 +29,12 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
-#include <svx/sizeitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <fmtfsize.hxx>
#include <fldbas.hxx>
#include <uiitems.hxx>
@@ -55,6 +50,8 @@
#include "swabstdlg.hxx"
#include <index.hrc>
#include <globals.hrc>
+
+
// STATIC DATA -----------------------------------------------------------
void SwTextShell::ExecIdx(SfxRequest &rReq)
@@ -136,7 +133,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
0 );
SwWrtShell& rSh = GetShell();
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 7e38c1297d0b..7cbf1767c014 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textsh.cxx,v $
- * $Revision: 1.63 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,42 +32,40 @@
#define _SW_FRMVALID_HXX
#include <hintids.hxx>
-#include <svtools/globalnameitem.hxx>
+#include <svl/globalnameitem.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/lnkbase.hxx>
-#ifndef __RSC //autogen
#include <tools/errinf.hxx>
-#endif
#include <svx/svdview.hxx>
-#include <svtools/ptitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <svl/ptitem.hxx>
+#include <svl/stritem.hxx>
+#include <unotools/moduleoptions.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/fcontnr.hxx>
#include <svx/hlnkitem.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <basic/sbxvar.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <sfx2/request.hxx>
-#include <svx/opaqitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/adjitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/svxacorr.hxx>
-#include <svx/scripttypeitem.hxx>
+#include <editeng/opaqitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/svxacorr.hxx>
+#include <editeng/scripttypeitem.hxx>
#include <svtools/filter.hxx>
#include <svx/htmlmode.hxx>
#include <svx/pfiledlg.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <com/sun/star/i18n/TransliterationModules.hdl>
#include <sot/clsids.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include <wdocsh.hxx>
#include <fmtinfmt.hxx>
#include <fmtclds.hxx>
@@ -82,9 +77,7 @@
#include <docsh.hxx>
#include <doc.hxx>
#include <uitool.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -112,9 +105,7 @@
#ifndef _POPUP_HRC
#include <popup.hrc>
#endif
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
#include <SwAppletImpl.hxx>
#include <unochart.hxx>
@@ -202,7 +193,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect();
if( pACorr && pACfg->IsAutoFmtByInput() &&
pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- ChgFractionSymbol | ChgOrdinalNumber |
+ AddNonBrkSpace | ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr | Autocorrect ))
rSh.AutoCorrect( *pACorr, cIns );
else
@@ -566,7 +557,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() );
aMgr.SetCol( aCol );
}
- aMgr.InsertFlyFrm(FLY_AT_CNTNT, aStartPos, aSize);
+ aMgr.InsertFlyFrm(FLY_AT_PARA, aStartPos, aSize);
GetShell().EndAllAction();
GetShell().UnlockPaint();
}
@@ -600,7 +591,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aSize(aMgr.GetSize());
aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
Point aPos = aMgr.GetPos();
- RndStdIds eAnchor = FLY_AT_CNTNT;
+ RndStdIds eAnchor = FLY_AT_PARA;
if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET)
eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue();
if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET)
@@ -764,7 +755,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF );
// am FrmMgr muessen die richtigen Parameter eingestellt werden
- aFrmMgr.SetAnchor(FLY_IN_CNTNT);
+ aFrmMgr.SetAnchor(FLY_AS_CHAR);
rSh.SplitNode( FALSE, FALSE );
rSh.SplitNode( FALSE, FALSE );
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 977dc77c98d3..b7aa72acfb2c 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textsh1.cxx,v $
- * $Revision: 1.70.84.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,33 +35,33 @@
#include <helpid.h>
#include <i18npool/mslangid.hxx>
-#include <svtools/languageoptions.hxx>
-#include <svx/langitem.hxx>
+#include <svl/languageoptions.hxx>
+#include <editeng/langitem.hxx>
#include <svtools/langtab.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include <string.h>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svx/htmlmode.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objitem.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/unohelp2.hxx>
#include <sfx2/request.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/macitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/colritem.hxx>
-#include <svx/tstpitem.hxx>
-#include <svx/brshitem.hxx>
-#include <svx/svxacorr.hxx>
-#include <svtools/cjkoptions.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/eitem.hxx>
+#include <svl/macitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/tstpitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/svxacorr.hxx>
+#include <svl/cjkoptions.hxx>
+#include <svl/ctloptions.hxx>
#include <IDocumentSettingAccess.hxx>
#include <charfmt.hxx>
-#include <svx/fontitem.hxx>
+#include <editeng/fontitem.hxx>
#include <svx/SmartTagItem.hxx>
#include <svx/dialmgr.hxx>
#include <fmtinfmt.hxx>
@@ -109,20 +106,20 @@
#include <SwSmartTagMgr.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include "swabstdlg.hxx"
#include "misc.hrc"
#include "chrdlg.hrc"
#include <IDocumentStatistics.hxx>
#include <sfx2/sfxdlg.hxx>
-#include <svtools/languageoptions.hxx>
-#include <svtools/lingucfg.hxx>
+#include <svl/languageoptions.hxx>
+#include <unotools/lingucfg.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/uno/Any.hxx>
-#include <svx/unolingu.hxx>
-#include <svtools/syslocaleoptions.hxx>
+#include <editeng/unolingu.hxx>
+#include <unotools/syslocaleoptions.hxx>
#include <doc.hxx>
#include <view.hxx>
#include <ndtxt.hxx>
diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx
index e3ba958d9e1a..2d267e926fc8 100644
--- a/sw/source/ui/shells/textsh2.cxx
+++ b/sw/source/ui/shells/textsh2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textsh2.cxx,v $
- * $Revision: 1.28 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,16 +35,16 @@
#endif
#include <svtools/svmedit.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/eitem.hxx>
+#include <svl/whiter.hxx>
#include <sfx2/event.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svtools/stritem.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/stritem.hxx>
+#include <svl/itemset.hxx>
#include <sfx2/request.hxx>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 8e30123a192b..50ae047a8b93 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: txtattr.cxx,v $
- * $Revision: 1.28.140.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,21 +34,21 @@
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svtools/whiter.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/itemiter.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/whiter.hxx>
+#include <svl/stritem.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/ctloptions.hxx>
#include <swmodule.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
-#include <svx/fhgtitem.hxx>
-#include <svx/adjitem.hxx>
-#include <svx/lspcitem.hxx>
-#include <svx/udlnitem.hxx>
-#include <svx/escpitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/escpitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/scripttypeitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include "paratr.hxx"
#include <fmtinfmt.hxx>
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index 19b36367d49f..8a72bb606e59 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: txtcrsr.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <sfx2/request.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
#endif
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index 3bbee6762431..0e89b96a8d6a 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: txtnum.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,10 +34,10 @@
#include <vcl/msgbox.hxx>
#endif
#include <sfx2/request.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svx/numitem.hxx>
-#include <svx/brshitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <editeng/numitem.hxx>
+#include <editeng/brshitem.hxx>
#include <numrule.hxx>
#include "cmdid.h"
diff --git a/sw/source/ui/smartmenu/makefile.mk b/sw/source/ui/smartmenu/makefile.mk
index 6e32a668d9cb..1950430cf378 100644
--- a/sw/source/ui/smartmenu/makefile.mk
+++ b/sw/source/ui/smartmenu/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.4 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index a2f37ac801f9..4c7b473dfc50 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: stmenu.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
#include "precompiled_sw.hxx"
#include <stmenu.hxx>
#include <com/sun/star/uno/Sequence.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/dispatch.hxx>
#include <SwSmartTagMgr.hxx>
diff --git a/sw/source/ui/smartmenu/stmenu.hrc b/sw/source/ui/smartmenu/stmenu.hrc
index 8195a6f3133a..56afc5752f79 100644
--- a/sw/source/ui/smartmenu/stmenu.hrc
+++ b/sw/source/ui/smartmenu/stmenu.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: stmenu.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/smartmenu/stmenu.src b/sw/source/ui/smartmenu/stmenu.src
index 0574ef038ef1..9775b829e7a0 100644
--- a/sw/source/ui/smartmenu/stmenu.src
+++ b/sw/source/ui/smartmenu/stmenu.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: stmenu.src,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index 6c9916e27e0e..a11f04d55656 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chartins.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,9 +30,7 @@
#include <sfx2/viewfrm.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <sfx2/basedlgs.hxx>
#include <IDocumentUndoRedo.hxx>
@@ -45,24 +40,19 @@
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <docsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <chartins.hxx>
#include <tablemgr.hxx>
#include <frmfmt.hxx>
#include <swtable.hxx>
#include <tblsel.hxx>
-#include <unoobj.hxx>
#include <unochart.hxx>
#include <autoedit.hxx>
#include <doc.hxx>
#include <edtwin.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _CHARTINS_HRC
#include <chartins.hrc>
#endif
diff --git a/sw/source/ui/table/chartins.hrc b/sw/source/ui/table/chartins.hrc
index 8f9fbe385fdc..91bbb0f424c6 100644
--- a/sw/source/ui/table/chartins.hrc
+++ b/sw/source/ui/table/chartins.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chartins.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src
index 6b4a6defc8e3..6a3c4fb5b34a 100644
--- a/sw/source/ui/table/chartins.src
+++ b/sw/source/ui/table/chartins.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chartins.src,v $
- * $Revision: 1.36 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index eb40fde1d818..dc28f6331566 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: colwd.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/colwd.hrc b/sw/source/ui/table/colwd.hrc
index 01e06cdeca53..4ac7358a65a9 100644
--- a/sw/source/ui/table/colwd.hrc
+++ b/sw/source/ui/table/colwd.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: colwd.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src
index 609b080941bc..aa1cf468867f 100644
--- a/sw/source/ui/table/colwd.src
+++ b/sw/source/ui/table/colwd.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: colwd.src,v $
- * $Revision: 1.21 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 63f8ac8a2e00..8be2bbdbb498 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: convert.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,7 +35,7 @@
#include <vcl/msgbox.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/viewfrm.hxx>
#include <modcfg.hxx>
#include <svx/htmlmode.hxx>
diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc
index ed46c20f03e8..7f7cbbec768f 100644
--- a/sw/source/ui/table/convert.hrc
+++ b/sw/source/ui/table/convert.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: convert.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src
index 44a8923d9e48..e2ff4ed1c2e3 100644
--- a/sw/source/ui/table/convert.src
+++ b/sw/source/ui/table/convert.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: convert.src,v $
- * $Revision: 1.29.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -177,7 +174,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
PushButton BT_AUTOFORMAT
{
Pos = MAP_APPFONT ( 12 , 152 ) ;
- Size = MAP_APPFONT ( 66 , 14 ) ;
+ Size = MAP_APPFONT ( 86 , 14 ) ;
TabStop = TRUE ;
Hide = TRUE ;
Text [ en-US ] = "Auto~Format..." ;
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index b08ca986e837..40c9f5a220f7 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: instable.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/instable.hrc b/sw/source/ui/table/instable.hrc
index 16fda29f52e5..6077541a3c01 100644
--- a/sw/source/ui/table/instable.hrc
+++ b/sw/source/ui/table/instable.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: instable.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src
index ca5680ebf494..e5f83f2a1ee3 100644
--- a/sw/source/ui/table/instable.src
+++ b/sw/source/ui/table/instable.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: instable.src,v $
- * $Revision: 1.32.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -159,7 +156,7 @@ ModalDialog DLG_INSERT_TABLE
PushButton BT_AUTOFORMAT
{
Pos = MAP_APPFONT ( 12 , 146 ) ;
- Size = MAP_APPFONT ( 66 , 14 ) ;
+ Size = MAP_APPFONT ( 86 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Auto~Format..." ;
};
diff --git a/sw/source/ui/table/makefile.mk b/sw/source/ui/table/makefile.mk
index 5e39d0af3af3..8b2ba850d174 100644
--- a/sw/source/ui/table/makefile.mk
+++ b/sw/source/ui/table/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.8 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index a038c5d00abc..486bb0af87b7 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mergetbl.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/mergetbl.hrc b/sw/source/ui/table/mergetbl.hrc
index 41dc0a738432..cee06b6ef20d 100644
--- a/sw/source/ui/table/mergetbl.hrc
+++ b/sw/source/ui/table/mergetbl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mergetbl.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/mergetbl.src b/sw/source/ui/table/mergetbl.src
index f3e3e24f7e89..81ea30f9b003 100644
--- a/sw/source/ui/table/mergetbl.src
+++ b/sw/source/ui/table/mergetbl.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: mergetbl.src,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx
index 46e0a1828538..1fb108276bc1 100644
--- a/sw/source/ui/table/rowht.cxx
+++ b/sw/source/ui/table/rowht.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: rowht.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,8 +33,8 @@
#endif
-#include <svtools/intitem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/dlgutil.hxx>
diff --git a/sw/source/ui/table/rowht.hrc b/sw/source/ui/table/rowht.hrc
index 64fc613afe3e..e844f3c65a8d 100644
--- a/sw/source/ui/table/rowht.hrc
+++ b/sw/source/ui/table/rowht.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: rowht.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src
index 13cc6011f3ff..71a616bef045 100644
--- a/sw/source/ui/table/rowht.src
+++ b/sw/source/ui/table/rowht.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: rowht.src,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx
index 0c8734af277a..7037e2b0aa05 100644
--- a/sw/source/ui/table/splittbl.cxx
+++ b/sw/source/ui/table/splittbl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splittbl.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/splittbl.hrc b/sw/source/ui/table/splittbl.hrc
index aef48b97482b..83882b374ecb 100644
--- a/sw/source/ui/table/splittbl.hrc
+++ b/sw/source/ui/table/splittbl.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splittbl.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src
index 9a74df4d5db0..879d4528d7de 100644
--- a/sw/source/ui/table/splittbl.src
+++ b/sw/source/ui/table/splittbl.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: splittbl.src,v $
- * $Revision: 1.25 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index c6a2d93cf423..ab7df943e201 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swtablerep.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,20 +32,20 @@
#include <hintids.hxx>
#include <tools/list.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/intitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/keepitem.hxx>
-#include <svx/brkitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/frmdiritem.hxx>
-#include <svtools/ctloptions.hxx>
+#include <editeng/keepitem.hxx>
+#include <editeng/brkitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/frmdiritem.hxx>
+#include <svl/ctloptions.hxx>
#include <swmodule.hxx>
#include <fmtornt.hxx>
#include <fmtpdsc.hxx>
#include <fmtlsplt.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <fmtrowsplt.hxx>
#include <svx/htmlmode.hxx>
diff --git a/sw/source/ui/table/table.src b/sw/source/ui/table/table.src
index 606f6800c481..7a0ab5472347 100644
--- a/sw/source/ui/table/table.src
+++ b/sw/source/ui/table/table.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: table.src,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index c18d7b6f7d07..f5ad209d195a 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabledlg.cxx,v $
- * $Revision: 1.35.136.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,20 +36,20 @@
#include <hintids.hxx>
#include <tools/list.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/intitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/keepitem.hxx>
-#include <svx/brkitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/frmdiritem.hxx>
-#include <svtools/ctloptions.hxx>
+#include <editeng/keepitem.hxx>
+#include <editeng/brkitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/frmdiritem.hxx>
+#include <svl/ctloptions.hxx>
#include <swmodule.hxx>
#include <fmtornt.hxx>
#include <fmtpdsc.hxx>
#include <fmtlsplt.hxx>
-#include <svx/htmlcfg.hxx>
+#include <svtools/htmlcfg.hxx>
#include <fmtrowsplt.hxx>
#include <svx/htmlmode.hxx>
diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc
index 75cf873d4a7f..843bec591d9e 100644
--- a/sw/source/ui/table/tabledlg.hrc
+++ b/sw/source/ui/table/tabledlg.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabledlg.hrc,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src
index 4e6aec8bdb9f..4243ba1b6c68 100644
--- a/sw/source/ui/table/tabledlg.src
+++ b/sw/source/ui/table/tabledlg.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tabledlg.src,v $
- * $Revision: 1.38.66.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index bfb9b08ef5a4..c0f325862d82 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tablemgr.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index 3da4e60dda0f..51e39a65dce9 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tablepg.hxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index de8ea6e3e62b..d097d5afeba5 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tautofmt.cxx,v $
- * $Revision: 1.24.190.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,7 +42,7 @@
#include <vcl/msgbox.hxx>
#endif
#include <vcl/svapp.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <comphelper/processfactory.hxx>
diff --git a/sw/source/ui/table/tautofmt.hrc b/sw/source/ui/table/tautofmt.hrc
index 1ea5b7fed035..5ffd2d3eb8d3 100644
--- a/sw/source/ui/table/tautofmt.hrc
+++ b/sw/source/ui/table/tautofmt.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tautofmt.hrc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src
index c0d865966ddb..4bc6a62bb591 100644
--- a/sw/source/ui/table/tautofmt.src
+++ b/sw/source/ui/table/tautofmt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tautofmt.src,v $
- * $Revision: 1.37 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index ca3817ef1834..3c77dc41d4d6 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: formatclipboard.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,19 +48,19 @@
// header for class SdrView
#include <svx/svdview.hxx>
//SvxBrushItem
-#include <svx/brshitem.hxx>
-#include <svx/shaditem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/shaditem.hxx>
#include <frmatr.hxx>
// header for class SvxBoxInfoItem
-#include <svx/boxitem.hxx>
+#include <editeng/boxitem.hxx>
// header for class SvxFmtBreakItem
-#include <svx/brkitem.hxx>
+#include <editeng/brkitem.hxx>
// header for class SwFmtLayoutSplit
#include <fmtlsplt.hxx>
// header for class SvxFmtKeepItem
-#include <svx/keepitem.hxx>
+#include <editeng/keepitem.hxx>
// header for class SvxFrameDirectionItem
-#include <svx/frmdiritem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <paratr.hxx>
#include <fmtpdsc.hxx>
#include <fmtrowsplt.hxx>
diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk
index 2aa5e12e2631..d06bb58a7dab 100644
--- a/sw/source/ui/uiview/makefile.mk
+++ b/sw/source/ui/uiview/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.12 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -54,6 +50,7 @@ EXCEPTIONSFILES= \
$(SLO)$/uivwimp.obj \
$(SLO)$/view.obj \
$(SLO)$/view2.obj \
+ $(SLO)$/viewprt.obj \
$(SLO)$/viewling.obj \
$(SLO)$/viewmdi.obj \
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 93ae56fbca73..aeebee5eecfe 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pview.cxx,v $
- * $Revision: 1.70 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,10 +38,11 @@
#include <vcl/cmdevt.hxx>
#include <vcl/button.hxx>
#include <svtools/printdlg.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/printer.hxx>
+#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
#include <sfx2/topfrm.hxx>
#include <sfx2/bindings.hxx>
@@ -52,8 +50,8 @@
#include <sfx2/dispatch.hxx>
#include <vcl/msgbox.hxx>
#include <svx/stddlg.hxx>
-#include <svx/paperinf.hxx>
-#include <svx/srchitem.hxx>
+#include <editeng/paperinf.hxx>
+#include <svl/srchitem.hxx>
#include <svx/svdview.hxx>
#include <svx/dlgutil.hxx>
#include <svx/zoomslideritem.hxx>
@@ -1376,7 +1374,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aCoreSet, RID_SVXDLG_ZOOM);
+ pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aCoreSet);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
}
@@ -1520,12 +1518,6 @@ MOVEPAGE:
rReq.SetSlot( FN_PRINT_PAGEPREVIEW );
return;
}
- case FN_PREVIEW_PRINT_OPTIONS :
- {
- SwPreviewPrintOptionsDialog aDlg(aViewWin, *this);
- aDlg.Execute();
- }
- break;
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
@@ -1788,7 +1780,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
// OD 09.01.2003 #i6467# - adjust view shell option to the same as for print
SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
- SwView::MakeOptions( 0, aPrintOptions, 0, 0, false, 0, 0 );
+ aPrintOptions.MakeOptions( false );
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess();
@@ -2416,72 +2408,6 @@ void SwPagePreView::ScrollDocSzChg()
// alles zum Thema Drucken
-USHORT SwPagePreView::Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pDlg )
-{
- ViewShell* pSh = aViewWin.GetViewShell();
- SfxPrinter* pPrinter = GetPrinter();
- if( !pPrinter || !pPrinter->InitJob( &aViewWin,
- pSh->HasDrawView() && !bIsAPI && pSh->GetDrawView()->GetModel()->HasTransparentObjects() ))
- return ERRCODE_IO_ABORT;
-
- SwWait aWait( *GetDocShell(), TRUE );
-
- USHORT nRowCol = ( aViewWin.GetRow() << 8 ) +
- aViewWin.GetCol(); // Zeilen / DoppelSeiten
-
- {
- // die Felder aktualisieren
- // ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen.
- // In den Methoden wird auf die akt. Shell abgefragt!
- SwEditShell* pESh = (SwEditShell*)pSh;
- SwDocStat aDocStat;
- BOOL bIsModified = pESh->IsModified();
-
- pESh->StartAllAction();
- pESh->UpdateDocStat( aDocStat );
- pSh->UpdateFlds();
- pESh->EndAllAction();
-
- if( !bIsModified )
- pESh->ResetModified();
- }
-
- // Druckauftrag starten
- SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
- SwPrtOptions aOpts( pObjShell->GetTitle(0) );
-
- BOOL bPrtPros;
- BOOL bPrtPros_RTL;
- SwView::MakeOptions( pDlg, aOpts, &bPrtPros, &bPrtPros_RTL, FALSE, GetPrinter(), GetDocShell()->GetDoc()->getPrintData() );
-
- if( bNormalPrint )
- {
- if( bPrtPros )
- pSh->PrintProspect( aOpts, rProgress, bPrtPros_RTL );
- else
- pSh->Prt( aOpts, &rProgress );
- }
- else
- {
- const SwPagePreViewPrtData* pPPVPD = pSh->GetDoc()->GetPreViewPrtData();
- if( pPPVPD && pPPVPD->GetCol() && pPPVPD->GetRow() )
- {
- // Zeilen / Seiten
- nRowCol = ( pPPVPD->GetRow() << 8 ) + pPPVPD->GetCol();
- }
- else
- pPPVPD = 0;
- pSh->PrintPreViewPage( aOpts, nRowCol, rProgress, pPPVPD );
- }
-
- return 0; // OK
-}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
@@ -2531,7 +2457,7 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
};
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
const USHORT* pPtr = aInval + 1;
do {
diff --git a/sw/source/ui/uiview/pview.hrc b/sw/source/ui/uiview/pview.hrc
index e9750930c8be..3724789431ed 100644
--- a/sw/source/ui/uiview/pview.hrc
+++ b/sw/source/ui/uiview/pview.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pview.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src
index a213c8df80e7..53f672dbdb60 100644
--- a/sw/source/ui/uiview/pview.src
+++ b/sw/source/ui/uiview/pview.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pview.src,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -453,11 +450,6 @@ ToolBox RID_PVIEW_TOOLBOX
Identifier = FN_PRINT_PAGEPREVIEW ;
HelpID = FN_PRINT_PAGEPREVIEW ;
};
- ToolBoxItem
- {
- Identifier = FN_PREVIEW_PRINT_OPTIONS ;
- HelpID = FN_PREVIEW_PRINT_OPTIONS ;
- };
ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
ToolBoxItem
{
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index 6449671b9b4e..c8ecc2d92607 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: scroll.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index d30e85c5ee71..58ce311d800d 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srcview.cxx,v $
- * $Revision: 1.59 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,17 +40,17 @@
#include <vcl/wrkwin.hxx>
#include <vcl/metric.hxx>
#include <svtools/ctrltool.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/undo.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/undo.hxx>
#include <svtools/txtcmp.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/saveopt.hxx>
+#include <svl/eitem.hxx>
+#include <svl/whiter.hxx>
+#include <unotools/saveopt.hxx>
#include <svtools/transfer.hxx>
-
-#include <svx/htmlcfg.hxx>
+#include <svx/svxids.hrc>
+#include <svtools/htmlcfg.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
@@ -63,12 +60,12 @@
#include <sfx2/request.hxx>
#include <sfx2/prnmon.hxx>
#include <sfx2/docfile.hxx>
-#include <svx/fhgtitem.hxx>
+#include <editeng/fhgtitem.hxx>
#include <svx/srchdlg.hxx>
-#include <svx/srchitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/flstitem.hxx>
-#include "svx/unolingu.hxx"
+#include <svl/srchitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/flstitem.hxx>
+#include "editeng/unolingu.hxx"
#include <sfx2/sfxhtml.hxx>
#include <swtypes.hxx>
#include <swmodule.hxx>
@@ -152,23 +149,23 @@ TYPEINIT1(SwSrcView, SfxViewShell)
--------------------------------------------------*/
-void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
- Size aSz = pPrinter->GetOutputSize();
+ Size aSz = rOutDev.GetOutputSize();
short nBorder = BORDERPRN;
- Color aOldFillColor( pPrinter->GetFillColor() );
- Font aOldFont( pPrinter->GetFont() );
+ Color aOldFillColor( rOutDev.GetFillColor() );
+ Font aOldFont( rOutDev.GetFont() );
- pPrinter->SetFillColor( Color(COL_TRANSPARENT) );
+ rOutDev.SetFillColor( Color(COL_TRANSPARENT) );
Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD );
aFont.SetAlign( ALIGN_BOTTOM );
- pPrinter->SetFont( aFont );
+ rOutDev.SetFont( aFont );
- long nFontHeight = pPrinter->GetTextHeight();
+ long nFontHeight = rOutDev.GetTextHeight();
// 1.Border => Strich, 2+3 Border = Freiraum.
long nYTop = TMARGPRN-3*nBorder-nFontHeight;
@@ -176,34 +173,34 @@ void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const S
long nXLeft = nLeftMargin-nBorder;
long nXRight = aSz.Width()-RMARGPRN+nBorder;
- pPrinter->DrawRect( Rectangle(
+ rOutDev.DrawRect( Rectangle(
Point( nXLeft, nYTop ),
Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) );
long nY = TMARGPRN-2*nBorder;
Point aPos( nLeftMargin, nY );
- pPrinter->DrawText( aPos, rTitle );
+ rOutDev.DrawText( aPos, rTitle );
if ( nPages != 1 )
{
aFont.SetWeight( WEIGHT_NORMAL );
- pPrinter->SetFont( aFont );
+ rOutDev.SetFont( aFont );
String aPageStr( C2S(" [") );
aPageStr += String( SW_RES( STR_PAGE ) );
aPageStr += ' ';
aPageStr += String::CreateFromInt32( nCurPage );
aPageStr += ']';
- aPos.X() += pPrinter->GetTextWidth( rTitle );
- pPrinter->DrawText( aPos, aPageStr );
+ aPos.X() += rOutDev.GetTextWidth( rTitle );
+ rOutDev.DrawText( aPos, aPageStr );
}
nY = TMARGPRN-nBorder;
- pPrinter->DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
+ rOutDev.DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
- pPrinter->SetFont( aOldFont );
- pPrinter->SetFillColor( aOldFillColor );
+ rOutDev.SetFont( aOldFont );
+ rOutDev.SetFillColor( aOldFillColor );
}
/* -----------------13.11.2003 16:24-----------------
@@ -717,6 +714,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
if(!bApi)
+ {
if(bNotFoundMessage)
{
InfoBox( 0, SW_RES(MSG_NOT_FOUND)).Execute();
@@ -728,20 +726,18 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
pTextView->SetSelection( TextSelection( aPaM, aPaM ) );
StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE );
}
+ }
}
return nFound;
}
-/*-----------------02.07.97 09:29-------------------
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
---------------------------------------------------*/
USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
- SfxPrinter* pOld = pDocSh->GetDoc()->getPrinter( false );
- if ( pOld && pOld->IsPrinting() )
- return SFX_PRINTERROR_BUSY;
-
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
{
pDocSh->GetDoc()->setPrinter( pNew, true, true );
@@ -764,109 +760,88 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
Beschreibung:
--------------------------------------------------------------------*/
-ErrCode SwSrcView::DoPrint( SfxPrinter *pPrinter, PrintDialog *pDlg, BOOL bSilent, BOOL bIsAPI )
+SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
{
- SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
- if ( !pPrinter )
- pPrinter = pDocPrinter;
- else if ( pDocPrinter != pPrinter )
- {
- pProgress->RestoreOnEndPrint( pDocPrinter->Clone() );
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- }
- pProgress->SetWaitMode(FALSE);
+ return GetDocShell()->GetDoc()->getPrinter( bCreate );
+}
- // Drucker starten
- PreparePrint( pDlg );
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+sal_Int32 SwSrcView::PrintSource(
+ OutputDevice *pOutDev,
+ sal_Int32 nPage,
+ bool bCalcNumPagesOnly )
+{
+ if (!pOutDev || nPage <= 0)
+ return 0;
- SfxViewShell::Print(*pProgress, bIsAPI, pDlg ); //???
+ //! this a lgorithm for printing the n-th page is very poor since it
+ //! needs to go over the text of all previous pages to get to the correct one.
+ //! But since HTML source code is expected to be just a small number of pages
+ //! even this poor algorithm should be enough...
- MapMode eOldMapMode( pPrinter->GetMapMode() );
- Font aOldFont( pPrinter->Printer::GetFont() );
+ pOutDev->Push();
TextEngine* pTextEngine = aEditWin.GetTextEngine();
- pPrinter->SetMapMode(MAP_100TH_MM);
- Font aFont(aEditWin.GetOutWin()->GetFont());
- Size aSize(aFont.GetSize());
- aSize = aEditWin.GetOutWin()->PixelToLogic(aSize, MAP_100TH_MM);
- aFont.SetSize(aSize);
- aFont.SetColor(COL_BLACK);
- pPrinter->SetFont( aFont );
+ pOutDev->SetMapMode( MAP_100TH_MM );
+ Font aFont( aEditWin.GetOutWin()->GetFont() );
+ Size aSize( aFont.GetSize() );
+ aSize = aEditWin.GetOutWin()->PixelToLogic( aSize, MAP_100TH_MM );
+ aFont.SetSize( aSize );
+ aFont.SetColor( COL_BLACK );
+ pOutDev->SetFont( aFont );
String aTitle( GetViewFrame()->GetWindow().GetText() );
- USHORT nLineHeight = (USHORT) pPrinter->GetTextHeight(); // etwas mehr.
+ USHORT nLineHeight = (USHORT) pOutDev->GetTextHeight(); // etwas mehr.
USHORT nParaSpace = 10;
- Size aPaperSz = pPrinter->GetOutputSize();
- aPaperSz.Width() -= (LMARGPRN+RMARGPRN);
- aPaperSz.Height() -= (TMARGPRN+BMARGPRN);
+ Size aPaperSz = pOutDev->GetOutputSize();
+ aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
+ aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
- USHORT nLinespPage = (USHORT) (aPaperSz.Height()/nLineHeight);
- USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ));
+ USHORT nLinespPage = (USHORT) (aPaperSz.Height() / nLineHeight);
+ USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
USHORT nParas = static_cast< USHORT >( pTextEngine->GetParagraphCount() );
- USHORT nPages = (USHORT) (nParas/nLinespPage+1 );
+ USHORT nPages = (USHORT) (nParas / nLinespPage + 1 );
USHORT nCurPage = 1;
- BOOL bStartJob = pPrinter->StartJob( aTitle );
- if( bStartJob )
+ // Header drucken...
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
+ const Point aStartPos( LMARGPRN, TMARGPRN );
+ Point aPos( aStartPos );
+ for ( USHORT nPara = 0; nPara < nParas; ++nPara )
{
- pPrinter->StartPage();
- // Header drucken...
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
- Point aPos( LMARGPRN, TMARGPRN );
- for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+ String aLine( pTextEngine->GetText( nPara ) );
+ lcl_ConvertTabsToSpaces( aLine );
+ USHORT nLines = aLine.Len() / nCharspLine + 1;
+ for ( USHORT nLine = 0; nLine < nLines; ++nLine )
{
- String aLine( pTextEngine->GetText( nPara ) );
- lcl_ConvertTabsToSpaces( aLine );
- USHORT nLines = aLine.Len()/nCharspLine+1;
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ String aTmpLine( aLine, nLine * nCharspLine, nCharspLine );
+ aPos.Y() += nLineHeight;
+ if ( aPos.Y() > ( aPaperSz.Height() + TMARGPRN - nLineHeight/2 ) )
{
- String aTmpLine( aLine, nLine*nCharspLine, nCharspLine );
- aPos.Y() += nLineHeight;
- if ( aPos.Y() > ( aPaperSz.Height()+TMARGPRN ) )
- {
- nCurPage++;
- pPrinter->EndPage();
- pPrinter->StartPage();
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
- aPos = Point( LMARGPRN, TMARGPRN+nLineHeight );
- }
- pPrinter->DrawText( aPos, aTmpLine );
+ ++nCurPage;
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
+ aPos = aStartPos;
}
- aPos.Y() += nParaSpace;
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ pOutDev->DrawText( aPos, aTmpLine );
}
- pPrinter->EndPage();
+ aPos.Y() += nParaSpace;
}
- pPrinter->SetFont( aOldFont );
- pPrinter->SetMapMode( eOldMapMode );
+ pOutDev->Pop();
- if ( !bStartJob )
- {
- // Printer konnte nicht gestartet werden
- delete pProgress;
- return ERRCODE_IO_ABORT;
- }
-
- pProgress->Stop();
- pProgress->DeleteOnEndPrint();
- pPrinter->EndJob();
- return pPrinter->GetError();
+ DBG_ASSERT( bCalcNumPagesOnly || nPage <= nCurPage, "page number out of range" );
+ return nCurPage;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
-{
- return GetDocShell()->GetDoc()->getPrinter( bCreate );
-}
/*--------------------------------------------------------------------
Beschreibung:
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index f895e6108995..6da603c893b3 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swcli.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 4154139f6ee1..20dc6035dc36 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uivwimp.cxx,v $
- * $Revision: 1.25 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index a13f25d8933e..677015b25d96 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view.cxx,v $
- * $Revision: 1.112.94.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,25 +30,24 @@
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
-
#include <stdlib.h>
#include <hintids.hxx>
#include <rtl/logfile.hxx>
#include <vcl/graph.hxx>
#include <vcl/inputctx.hxx>
#include <basic/sbxobj.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/undoopt.hxx>
-#include <svtools/lingucfg.hxx>
+#include <svl/eitem.hxx>
+#include <unotools/undoopt.hxx>
+#include <unotools/lingucfg.hxx>
#include <svtools/printdlg.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/app.hxx>
#include <svx/ruler.hxx>
-#include <svx/protitem.hxx>
+#include <editeng/protitem.hxx>
#include <svx/fmshell.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
@@ -100,7 +96,7 @@
#include <prtopt.hxx>
#include <swprtopt.hxx>
#include <linguistic/lngprops.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
//#include <sfx2/app.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/scanner/ScannerContext.hpp>
@@ -1920,53 +1916,6 @@ void SwView::NotifyDBChanged()
Beschreibung: Drucken
--------------------------------------------------------------------*/
-void SwView::MakeOptions( PrintDialog* pDlg, SwPrtOptions& rOpts,
- BOOL* pPrtProspect, BOOL* pPrtProspect_RTL, BOOL bWeb, SfxPrinter* pPrt, SwPrintData* pData )
-{
- SwAddPrinterItem* pAddPrinterAttr;
- if( pPrt && SFX_ITEM_SET == pPrt->GetOptions().GetItemState(
- FN_PARAM_ADDPRINTER, FALSE, (const SfxPoolItem**)&pAddPrinterAttr ))
- {
- pData = pAddPrinterAttr;
- }
- else if(!pData)
- {
- pData = SW_MOD()->GetPrtOptions(bWeb);
- }
- rOpts = *pData;
- if( pPrtProspect )
- *pPrtProspect = pData->bPrintProspect;
- if( pPrtProspect_RTL )
- *pPrtProspect_RTL = pData->bPrintProspect_RTL;
- rOpts.aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- rOpts.aMulti.SelectAll( FALSE );
- rOpts.nCopyCount = 1;
- rOpts.bCollate = FALSE;
- rOpts.bPrintSelection = FALSE;
- rOpts.bJobStartet = FALSE;
-
- if ( pDlg )
- {
- rOpts.nCopyCount = pDlg->GetCopyCount();
- rOpts.bCollate = pDlg->IsCollateChecked();
- if ( pDlg->GetCheckedRange() == PRINTDIALOG_SELECTION )
- {
- rOpts.aMulti.SelectAll();
- rOpts.bPrintSelection = TRUE;
- }
- else if ( PRINTDIALOG_ALL == pDlg->GetCheckedRange() )
- rOpts.aMulti.SelectAll();
- else
- {
- rOpts.aMulti = MultiSelection( pDlg->GetRangeText() );
- rOpts.aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- }
- }
- else
- rOpts.aMulti.SelectAll();
- rOpts.aMulti.Select( 0, FALSE );
-}
-
/* -----------------------------28.10.02 13:25--------------------------------
---------------------------------------------------------------------------*/
@@ -1995,3 +1944,20 @@ void SwView::AddTransferable(SwTransferable& rTransferable)
{
GetViewImpl()->AddTransferable(rTransferable);
}
+
+/* --------------------------------------------------*/
+
+void SwPrtOptions::MakeOptions( BOOL bWeb )
+{
+ *this = *SW_MOD()->GetPrtOptions(bWeb);
+
+ nCopyCount = 1;
+ bCollate = FALSE;
+ bPrintSelection = FALSE;
+ bJobStartet = FALSE;
+
+ aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
+ aMulti.SelectAll();
+ aMulti.Select( 0, FALSE );
+}
+
diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc
index 2c6d31277f0e..8697a7e4ed63 100644
--- a/sw/source/ui/uiview/view.hrc
+++ b/sw/source/ui/uiview/view.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view.hrc,v $
- * $Revision: 1.5.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src
index beb4f423ba28..7c47fe6ef208 100644
--- a/sw/source/ui/uiview/view.src
+++ b/sw/source/ui/uiview/view.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view.src,v $
- * $Revision: 1.52.110.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 38f885657450..bc9255d59873 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view0.cxx,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,18 +33,20 @@
#include "hintids.hxx"
#include <vcl/graph.hxx>
#include <svx/galbrws.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <SwSpellDialogChildWindow.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/linguprops.hxx>
-#include <svtools/lingucfg.hxx>
+#include <svl/eitem.hxx>
+#include <unotools/linguprops.hxx>
+#include <unotools/lingucfg.hxx>
#include <viewopt.hxx>
#include <globals.h>
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/srchdlg.hxx>
#include <sfx2/templdlg.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
#include <uivwimp.hxx>
#include <avmedia/mediaplayer.hxx>
#include <swmodule.hxx>
@@ -99,7 +98,7 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <IDocumentSettingAccess.hxx>
@@ -554,3 +553,9 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
rReq.Done();
}
+IMPL_LINK( SwView, HtmlOptionsHdl, void*, EMPTYARG )
+{
+ // Invalidierung, falls blinkender Text erlaubt/verboten wurde
+ GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE);
+ return 0;
+}
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 56ad1703996e..208a9c27ebdc 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view1.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 77c06f44c494..14c416f5e398 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view2.cxx,v $
- * $Revision: 1.90 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,25 +30,15 @@
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
-
-// #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
-// #include <com/sun/star/lang/Locale.hpp>
-// #endif
-// #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
-// #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-// #endif
+#include <svtools/filter.hxx>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
-
#define _SVSTDARR_STRINGSSORTDTOR
-#include <svtools/svstdarr.hxx>
-#include <svtools/aeitem.hxx>
+#include <svl/svstdarr.hxx>
+#include <svl/aeitem.hxx>
-// #ifndef _FILTER_HXX
-// #include <svtools/filter.hxx>
-// #endif
#include <SwStyleNameMapper.hxx>
#include <docary.hxx>
#include <hintids.hxx>
@@ -59,44 +46,37 @@
#include <undobj.hxx>
#include <swundo.hxx>
#include <caption.hxx>
-#include <svtools/PasswordHelper.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/PasswordHelper.hxx>
+#include <svl/urihelper.hxx>
#include <sfx2/passwd.hxx>
#include <sfx2/sfxdlg.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/sfxhelp.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/viewlayoutitem.hxx>
#include <svx/zoomslideritem.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/impgrf.hxx>
+#include <editeng/lrspitem.hxx>
#include <svtools/txtcmp.hxx>
-#include "svx/unolingu.hxx"
+#include "editeng/unolingu.hxx"
#include <vcl/msgbox.hxx>
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#include <sfx2/event.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
-#include <svx/sizeitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/topfrm.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/ptitem.hxx>
-#include <svx/linkmgr.hxx>
-#ifndef __RSC //autogen
+#include <svl/whiter.hxx>
+#include <svl/ptitem.hxx>
+#include <sfx2/linkmgr.hxx>
#include <tools/errinf.hxx>
-#endif
#include <tools/urlobj.hxx>
#include <svx/svdview.hxx>
#include <swtypes.hxx>
@@ -148,10 +128,6 @@
#include <PostItMgr.hxx>
#include <postit.hxx>
-// #ifndef _FRMMGR_HXX
-// #include <frmmgr.hxx>
-// #endif
-
#include <ndtxt.hxx> //#outline level,added by zhaojianwei
#include <comphelper/processfactory.hxx>
@@ -245,8 +221,8 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
else
{
if( !pFlt )
- pFlt = ::GetGrfFilter();
- nRes = ::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ );
+ pFlt = GraphicFilter::GetGraphicFilter();
+ nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ );
}
if( GRFILTER_OK == nRes )
@@ -437,11 +413,11 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
rSh.StartUndo(UNDO_INSERT, &aRewriter);
- int nError = InsertGraphic( aFileName, aFilterName, bAsLink, ::GetGrfFilter() );
+ int nError = InsertGraphic( aFileName, aFilterName, bAsLink, GraphicFilter::GetGraphicFilter() );
// Format ist ungleich Current Filter, jetzt mit auto. detection
if( nError == GRFILTER_FORMATERROR )
- nError = InsertGraphic( aFileName, aEmptyStr, bAsLink, ::GetGrfFilter() );
+ nError = InsertGraphic( aFileName, aEmptyStr, bAsLink, GraphicFilter::GetGraphicFilter() );
if ( rSh.IsFrmSelected() )
{
SwFrmFmt* pFmt = pDoc->FindFrmFmtByName( sGraphicFormat );
@@ -1624,7 +1600,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aCoreSet, RID_SVXDLG_ZOOM);
+ pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aCoreSet);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
}
diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx
index d1bd291e917c..e5f9350277ee 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewcoll.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,7 +36,7 @@
#include <vcl/window.hxx>
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <rsc/rscsfx.hxx>
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index c7f3f2373c8f..8c19c454b6ac 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewdlg.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,8 +32,8 @@
#include "hintids.hxx"
#include <sfx2/viewfrm.hxx>
-#include <svx/tstpitem.hxx>
-#include <svtools/stritem.hxx>
+#include <editeng/tstpitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/request.hxx>
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index f0796240a4d1..bbff2271e9fa 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewdlg2.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 4fb7746db4d7..fe38c56f29e5 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewdraw.cxx,v $
- * $Revision: 1.40 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,27 +30,27 @@
#include "hintids.hxx"
-#include <svtools/aeitem.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/itempool.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdview.hxx>
#include <svx/svdpage.hxx>
-#include <svx/editview.hxx>
-#include <svx/editeng.hxx>
-#include <svx/outliner.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/outliner.hxx>
#include <svx/fmview.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <sfx2/viewfrm.hxx>
#include <doc.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <linguistic/lngprops.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <svx/fontworkbar.hxx>
#include <svx/fontworkgallery.hxx>
-#include <svx/eeitem.hxx>
+#include <editeng/eeitem.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdetc.hxx>
-#include <svx/editstat.hxx>
+#include <editeng/editstat.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/printer.hxx>
diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx
index 1d50156a1790..f04db152ec2f 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewfunc.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 588c30a9844d..65e6aa20f546 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewling.cxx,v $
- * $Revision: 1.38 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
@@ -47,30 +44,24 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/msgbox.hxx>
#include <svtools/ehdl.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <svx/dlgutil.hxx>
#include <svx/dialmgr.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/svxerr.hxx>
-#include <svx/unolingu.hxx>
-#include <svx/thesdlg.hxx>
-#include <svx/SpellPortions.hxx>
+#include <editeng/unolingu.hxx>
+#include <svx/svxdlg.hxx>
+#include <editeng/SpellPortions.hxx>
#include <swmodule.hxx>
#include <swwait.hxx>
#include <initui.hxx> // fuer SpellPointer
#include <uitool.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // CheckSpellChanges
-#endif
#include <viewopt.hxx> // Viewoptions
#include <swundo.hxx> // fuer Undo-Ids
#include <hyp.hxx> // Trennung
@@ -80,18 +71,10 @@
#include <crsskip.hxx>
#include <ndtxt.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc> // STR_MULT_INTERACT_SPELL_WARN
-#endif
-#ifndef _VIEW_HRC
#include <view.hrc>
-#endif
#include <hhcwrp.hxx>
#include <com/sun/star/frame/XStorable.hpp>
@@ -112,10 +95,11 @@
#include <cppuhelper/bootstrap.hxx>
#include "stmenu.hxx" // PopupMenu for smarttags
#include <svx/dialogs.hrc>
-
+#include <svtools/langtab.hxx>
#include <unomid.h>
#include <memory>
+#include <editeng/editerr.hxx>
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -418,7 +402,7 @@ IMPL_LINK( SwView, SpellError, LanguageType *, pLang )
while( pWrtShell->ActionPend() );
}
LanguageType eLang = pLang ? *pLang : LANGUAGE_NONE;
- String aErr(::GetLanguageString( eLang ) );
+ String aErr(SvtLanguageTable::GetLanguageString( eLang ) );
SwEditWin &rEditWin = GetEditWin();
#if OSL_DEBUG_LEVEL > 1
@@ -614,7 +598,7 @@ void SwView::StartThesaurus()
pWrtShell->GetSelTxt() : pWrtShell->GetCurWord();
Reference< XThesaurus > xThes( ::GetThesaurus() );
- SvxThesaurusDialog *pDlg = NULL;
+ AbstractThesaurusDialog *pDlg = NULL;
if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) )
{
@@ -625,7 +609,8 @@ void SwView::StartThesaurus()
// create dialog
{ //Scope for SwWait-Object
SwWait aWait( *GetDocShell(), sal_True );
- pDlg = new SvxThesaurusDialog( &GetEditWin(),
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ pDlg = pFact->CreateThesaurusDialog( &GetEditWin(),
xThes, aTmp, eLang );
}
@@ -651,12 +636,12 @@ void SwView::StartThesaurus()
else
aWinTop.Y() = aBtmPos.Y();
- Size aSz = pDlg->GetSizePixel();
+ Size aSz = pDlg->GetWindow()->GetSizePixel();
if ( aWinBtm.Y() - aWinTop.Y() > aSz.Height() )
{
aWinTop.X() = ( aWinTop.X() + aWinBtm.X() - aSz.Width() ) / 2;
aWinTop.Y() = ( aWinTop.Y() + aWinBtm.Y() - aSz.Height() ) / 2;
- pDlg->SetPosPixel( aWinTop );
+ pDlg->GetWindow()->SetPosPixel( aWinTop );
}
}
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 702c0790012f..8df3116fa189 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewmdi.cxx,v $
- * $Revision: 1.24.140.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,8 +36,8 @@
#include <vcl/svapp.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/ruler.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/srchitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/request.hxx>
#include <swmodule.hxx>
#ifndef _VIEW_HXX
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 1cc886f5d204..3d8c3f05e1f7 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewport.cxx,v $
- * $Revision: 1.47 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,8 +32,8 @@
#include "hintids.hxx"
#include <vcl/help.hxx>
#include <svx/ruler.hxx>
-#include <svx/paperinf.hxx>
-#include <svx/lrspitem.hxx>
+#include <editeng/paperinf.hxx>
+#include <editeng/lrspitem.hxx>
#include <sfx2/bindings.hxx>
#ifndef _VIEW_HXX
#include <view.hxx>
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 5e45f9a9a48c..8721f425eb8d 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewprt.cxx,v $
- * $Revision: 1.42 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -43,26 +40,28 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <sfx2/request.hxx>
+#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
-#include <svtools/flagitem.hxx>
+#include <svl/flagitem.hxx>
#include <vcl/msgbox.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <svtools/printdlg.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/prnmon.hxx>
-#include <svx/paperinf.hxx>
+#include <editeng/paperinf.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/misccfg.hxx>
+#include <unotools/misccfg.hxx>
#include <svx/prtqry.hxx>
#include <svx/svdview.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/flagitem.hxx>
-#include <svx/linkmgr.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/flagitem.hxx>
+#include <sfx2/linkmgr.hxx>
#include <modcfg.hxx>
#include <edtwin.hxx>
@@ -85,10 +84,10 @@
#include <globals.hrc>
#include <view.hrc>
#include <app.hrc>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <swwrtshitem.hxx>
#include "swabstdlg.hxx"
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include <unomid.h>
@@ -175,284 +174,6 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
}
/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-ErrCode SwView::DoPrint( SfxPrinter *pPrinter, PrintDialog *pDlg, BOOL bSilent, BOOL bIsAPI )
-{
- // First test
- SwWrtShell* pSh = &GetWrtShell();
- SwNewDBMgr* pMgr = pSh->GetNewDBMgr();
-
- int bPrintSelection = -1;
- USHORT nMergeType = pMgr->GetMergeType();
- if( DBMGR_MERGE_MAILMERGE != nMergeType &&
- DBMGR_MERGE_DOCUMENTS != nMergeType &&
- !pDlg &&
- !bIsAPI && ( pSh->IsSelection() || pSh->IsFrmSelected() ||
- pSh->IsObjSelected() ) )
- {
- short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
- if( RET_CANCEL == nBtn )
- return ERRCODE_IO_ABORT;
-
- if( RET_OK == nBtn )
- bPrintSelection = 1;
- else
- bPrintSelection = 0;
- }
-
-// Der PrintProgress stellt Handler am Printer der ViewShell ein.
-// Das kann natuerlich erste nach dem evtl. Umschalten des Druckers korrekt
-// funktionieren. #55210#
-// SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
- SfxPrintProgress *pProgress = 0;
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
- if ( !pPrinter )
- pPrinter = pDocPrinter;
- else if ( pDocPrinter != pPrinter )
- {
- //Da der Doc-Drucker beim SetPrinter geloescht wird,
- // muss man ihn vorher clonen
- SfxPrinter* pClone = pDocPrinter->Clone();
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- pProgress = new SfxPrintProgress( this, !bSilent );
- pProgress->RestoreOnEndPrint( pClone );
- }
- if(!pProgress)
- pProgress = new SfxPrintProgress( this, !bSilent );
- pProgress->SetWaitMode(FALSE);
-
- BOOL bStartJob = pPrinter->InitJob( &GetEditWin(),
- !bIsAPI && pSh->HasDrawView() && pSh->GetDrawView()->GetModel()->HasTransparentObjects());
- if( bStartJob )
- {
- // Drucker starten
- PreparePrint( pDlg );
- SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
- //#i82625# GetTitle( 0 ) doesn't work for 'embedded' documents like forms or reports
- String sDocumentTitle( pObjShell->GetTitle(SFX_TITLE_APINAME));
- SwPrtOptions aOpts( sDocumentTitle );
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
- nMergeType = pMgr->GetMergeType();
-
- BOOL bPrtPros;
- BOOL bPrtPros_RTL;
- SwView::MakeOptions( pDlg, aOpts, &bPrtPros, &bPrtPros_RTL, bWeb, GetPrinter(),
- pSh->getIDocumentDeviceAccess()->getPrintData() );
-
- //set the appropriate view options to print
- //on silent mode the field commands have to be switched off always
- //on default print the user is asked what to do
- const SwViewOption* pCurrentViewOptions = pSh->GetViewOptions();
- bool bSwitchOff_IsFldName = pCurrentViewOptions->IsFldName() && pSh->IsAnyFieldInDoc();
-
- if(!bSilent && bSwitchOff_IsFldName)
- {
- QueryBox aBox( &GetEditWin(), SW_RES( DLG_PRT_FIELDNAME ) );
- USHORT nRet = aBox.Execute();
- if( RET_CANCEL == nRet)
- return ERRCODE_IO_ABORT;
- // disable field commands
- if( RET_NO != nRet )
- {
- bSwitchOff_IsFldName = false;
- }
- }
- bool bApplyViewOptions = bSwitchOff_IsFldName;
- //switch off display of hidden characters if on and hidden characters are in use
- const sal_Bool bOldShowHiddenChar = pCurrentViewOptions->IsShowHiddenChar();
- const sal_Bool bOldMetaChars = pCurrentViewOptions->IsViewMetaChars();
- if( bOldShowHiddenChar != aOpts.IsPrintHiddenText()
- && pSh->GetDoc()->ContainsHiddenChars())
- bApplyViewOptions |= true;
- //switch off display of hidden paragraphs if on and hidden paragraphs are in use
- const sal_Bool bOldShowHiddenPara = pCurrentViewOptions->IsShowHiddenPara();
- if( aOpts.IsPrintHiddenText() != bOldShowHiddenPara )
- {
- const SwFieldType* pFldType = pSh->GetDoc()->GetSysFldType(RES_HIDDENPARAFLD);
- if( pFldType && pFldType->GetDepends())
- bApplyViewOptions |= true;
- }
- const sal_Bool bOldShowHiddenField = pCurrentViewOptions->IsShowHiddenField();
- if( aOpts.IsPrintHiddenText() != bOldShowHiddenField )
- {
- const SwFieldType* pFldType = pSh->GetDoc()->GetSysFldType(RES_HIDDENTXTFLD);
- if( pFldType || pFldType->GetDepends())
- bApplyViewOptions |= true;
- }
-
- SwViewOption* pOrgViewOption = 0;
- bApplyViewOptions |= !aOpts.IsPrintTextPlaceholder();
- if(bApplyViewOptions)
- {
- pOrgViewOption = new SwViewOption(*pSh->GetViewOptions());
- if(bSwitchOff_IsFldName)
- pOrgViewOption->SetFldName(aOpts.IsPrintHiddenText());
-
- pOrgViewOption->SetShowHiddenChar(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetViewMetaChars(sal_True);
- pOrgViewOption->SetShowHiddenPara(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetShowHiddenField(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetShowPlaceHolderFields( aOpts.bPrintTextPlaceholder );
-
- SW_MOD()->ApplyUsrPref(*pOrgViewOption, this, VIEWOPT_DEST_VIEW_ONLY );
- }
-
- if( nMergeType == DBMGR_MERGE_MAILMERGE ||
- DBMGR_MERGE_DOCUMENTS == nMergeType )
- {
- if(DBMGR_MERGE_DOCUMENTS == nMergeType)
- bStartJob = pMgr->MergePrintDocuments( *this, aOpts, *pProgress, bIsAPI );
- else
- bStartJob = pMgr->MergePrint( *this, aOpts, *pProgress, bIsAPI );
- }
- else
- {
- const BOOL bLockedView = pSh->IsViewLocked();
- pSh->LockView( TRUE );
-
- //BrowseView abschalten und die View gegen alle Paints locken.
- BOOL bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
- SfxBoolItem aBrowse( SID_BROWSER_MODE, FALSE );
- if ( bBrowse )
- {
- if ( pSh->GetWin() )
- pSh->GetWin()->Update();
- pSh->LockPaint();
- aSet.Put( aBrowse, aBrowse.Which() );
- SfxRequest aReq( SID_BROWSER_MODE, 0, aSet );
- GetDocShell()->Execute( aReq );
- }
-
- // die Felder aktualisieren
- BOOL bIsModified = pSh->IsModified();
- pSh->StartAllAction();
- SwDocStat aDocStat;
- pSh->UpdateDocStat( aDocStat );
- pSh->EndAllTblBoxEdit();
- pSh->ViewShell::UpdateFlds(TRUE);
- if( pSh->IsCrsrInTbl() )
- {
- pSh->ClearTblBoxCntnt();
- pSh->SaveTblBoxCntnt();
- }
- pSh->EndAllAction();
-
- if( !bIsModified )
- pSh->ResetModified();
-
- if( -1 != bPrintSelection )
- aOpts.bPrintSelection = 0 != bPrintSelection;
-
- uno::Sequence< beans::PropertyValue> aViewProperties(18);
- beans::PropertyValue* pViewProperties = aViewProperties.getArray();
- pViewProperties[1].Name = C2U("PrintGraphics");
- pViewProperties[1].Value <<= (sal_Bool)aOpts.IsPrintGraphic();
- pViewProperties[2].Name = C2U("PrintTables");
- pViewProperties[2].Value <<= (sal_Bool)aOpts.IsPrintTable();
- pViewProperties[3].Name = C2U("PrintDrawings");
- pViewProperties[3].Value <<= (sal_Bool)aOpts.IsPrintDraw();
- pViewProperties[4].Name = C2U("PrintLeftPages");
- pViewProperties[4].Value <<= (sal_Bool)aOpts.IsPrintLeftPage();
- pViewProperties[5].Name = C2U("PrintRightPages");
- pViewProperties[5].Value <<= (sal_Bool)aOpts.IsPrintRightPage();
- pViewProperties[6].Name = C2U("PrintControls");
- pViewProperties[6].Value <<= (sal_Bool)aOpts.IsPrintControl();
- pViewProperties[7].Name = C2U("PrintReversed");
- pViewProperties[7].Value <<= (sal_Bool)aOpts.IsPrintReverse();
- pViewProperties[8].Name = C2U("PrintPaperFromSetup");
- pViewProperties[8].Value <<= (sal_Bool)aOpts.IsPaperFromSetup();
- pViewProperties[9].Name = C2U("PrintFaxName");
- pViewProperties[9].Value <<= aOpts.GetFaxName();
- pViewProperties[10].Name = C2U("PrintAnnotationMode");
- pViewProperties[10].Value <<= (text::NotePrintMode) aOpts.GetPrintPostIts();
- pViewProperties[11].Name = C2U("PrintProspect");
- pViewProperties[11].Value <<= (sal_Bool)aOpts.IsPrintProspect();
- pViewProperties[12].Name = C2U("PrintPageBackground");
- pViewProperties[12].Value <<= (sal_Bool)aOpts.IsPrintPageBackground();
- pViewProperties[13].Name = C2U("PrintBlackFonts");
- pViewProperties[13].Value <<= (sal_Bool)aOpts.IsPrintBlackFont();
- pViewProperties[0].Name = C2U("IsSinglePrintJob");
- pViewProperties[0].Value <<= (sal_Bool)aOpts.IsPrintSingleJobs();
- pViewProperties[14].Name = C2U("Selection");
- pViewProperties[14].Value <<= (sal_Bool)aOpts.bPrintSelection;
- pViewProperties[15].Name = C2U("PrintEmptyPages");
- pViewProperties[15].Value <<= (sal_Bool)aOpts.bPrintEmptyPages;
- pViewProperties[16].Name = C2U("PrintHiddenText");
- pViewProperties[16].Value <<= (sal_Bool)aOpts.bPrintHiddenText;
- pViewProperties[17].Name = C2U("PrintTextPlaceholder");
- pViewProperties[17].Value <<= (sal_Bool)aOpts.bPrintTextPlaceholder;
- SetAdditionalPrintOptions(aViewProperties);
-
- SfxViewShell::Print(*pProgress, bIsAPI );
- if ( !pProgress->IsAborted() )
- {
- if( bPrtPros )
- {
- bStartJob = pPrinter->StartJob( aOpts.GetJobName() );
- if( bStartJob )
- pSh->PrintProspect( aOpts, *pProgress, bPrtPros_RTL );
- }
- else
- bStartJob = pSh->Prt( aOpts, pProgress );
-
- if ( bBrowse )
- {
- aBrowse.SetValue( TRUE );
- aSet.Put( aBrowse, aBrowse.Which() );
- SfxRequest aReq( SID_BROWSER_MODE, 0, aSet );
- GetDocShell()->Execute( aReq );
- pSh->UnlockPaint();
- }
- }
- else
- bStartJob = FALSE;
-
- pSh->LockView( bLockedView );
- }
- if(pOrgViewOption)
- {
- if(bSwitchOff_IsFldName)
- pOrgViewOption->SetFldName(TRUE);
- pOrgViewOption->SetShowHiddenChar(bOldShowHiddenChar);
- pOrgViewOption->SetViewMetaChars(bOldMetaChars);
- pOrgViewOption->SetShowHiddenField(bOldShowHiddenField);
- pOrgViewOption->SetShowHiddenPara(bOldShowHiddenPara);
- //must to be set to sal_True anyway
- pOrgViewOption->SetShowPlaceHolderFields( sal_True );
- SW_MOD()->ApplyUsrPref(*pOrgViewOption, this, VIEWOPT_DEST_VIEW_ONLY );
- delete pOrgViewOption;
- }
- }
-
- if( !bStartJob )
- {
- // Printer konnte nicht gestartet werden
- delete pProgress;
- return pPrinter->GetError();
- }
-
- pProgress->Stop();
- if ( pPrinter->IsJobActive() )
- {
- pProgress->DeleteOnEndPrint();
- pPrinter->EndJob();
- return pPrinter->GetError();
- }
- else
- {
- // the next call might destroy pPrinter (in case it is not the usual document printer); so get the error before
- ULONG nError = pPrinter->GetError();
- pProgress->DeleteOnEndPrint();
- return nError;
- }
-}
-
-
-
-/*--------------------------------------------------------------------
Beschreibung: TabPage fuer applikationsspezifische Druckoptionen
--------------------------------------------------------------------*/
@@ -546,6 +267,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
rReq.RemoveItem(FN_QRY_MERGE);
BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE;
SwMiscConfig aMiscConfig;
+ bool bPrintSelection = false;
if(!bSilent && !bFromMerge &&
SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc())
{
@@ -560,12 +282,29 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
return;
}
}
+ else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent )
+ {
+ if( /*!bIsAPI && */
+ ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) )
+ {
+ short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
+ if( RET_CANCEL == nBtn )
+ return;;
+
+ if( RET_OK == nBtn )
+ bPrintSelection = true;
+ }
+ }
+
//#i61455# if master documentes are printed silently without loaded links then update the links now
if( bSilent && pSh->IsGlobalDoc() && !pSh->IsGlblDocSaveLinks() )
{
pSh->GetLinkManager().UpdateAllLinks( sal_False, sal_False, sal_False, 0 );
}
- SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
+ SfxRequest aReq( rReq );
+ SfxBoolItem aBool(SID_SELECTION, bPrintSelection);
+ aReq.AppendItem( aBool );
+ SfxViewShell::ExecuteSlot( aReq, SfxViewShell::GetInterface() );
return;
}
default:
@@ -618,20 +357,19 @@ void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
- SfxMiscCfg* pMisc = SFX_APP()->GetMiscConfig();
+ utl::MiscCfg aMisc;
if(bWeb)
aSet.Put(SfxUInt16Item(SID_HTML_MODE,
::GetHtmlMode(((SwWrtShell*)pSh)->GetView().GetDocShell())));
aSet.Put(SfxBoolItem(SID_PRINTER_NOTFOUND_WARN,
- pMisc->IsNotFoundWarning() ));
+ aMisc.IsNotFoundWarning() ));
aSet.Put(aAddPrinterItem);
aSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC,
- (pMisc->IsPaperSizeWarning() ? SFX_PRINTER_CHG_SIZE : 0) |
- (pMisc->IsPaperOrientationWarning() ? SFX_PRINTER_CHG_ORIENTATION : 0 )));
+ (aMisc.IsPaperSizeWarning() ? SFX_PRINTER_CHG_SIZE : 0) |
+ (aMisc.IsPaperOrientationWarning() ? SFX_PRINTER_CHG_ORIENTATION : 0 )));
pIDDA->getPrinter( true )->SetOptions( aSet );
}
}
-
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 690a1900749e..b12fc6280cc9 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewsrch.cxx,v $
- * $Revision: 1.32 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,23 +32,23 @@
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
#include <hintids.hxx>
#include <com/sun/star/util/SearchOptions.hpp>
-#include <svtools/cjkoptions.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/cjkoptions.hxx>
+#include <svl/ctloptions.hxx>
#include <svx/pageitem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#ifndef _T2XTCMP_HXX //autogen
#include <svtools/txtcmp.hxx>
#endif
-#include <svtools/itempool.hxx>
-#include <svtools/eitem.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/itempool.hxx>
+#include <svl/eitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/request.hxx>
#include <svx/srchdlg.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/wrkwin.hxx>
-#include "svx/unolingu.hxx"
+#include "editeng/unolingu.hxx"
#include <swmodule.hxx>
#include <swwait.hxx>
#include <workctrl.hxx>
@@ -428,7 +425,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
}
break;
default:
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if(nSlot)
{
ByteString sStr( "nSlot: " );
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 7563a7b5e779..23415b630252 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewstat.cxx,v $
- * $Revision: 1.42 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,20 +30,20 @@
#include <hintids.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
#include <com/sun/star/uno/Sequence.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/cjkoptions.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/objitem.hxx>
-#include <svtools/imageitm.hxx>
-#include <svtools/languageoptions.hxx>
-#include <svx/protitem.hxx>
-#include <svx/linkmgr.hxx>
-#include <svx/langitem.hxx>
-#include <svx/brshitem.hxx>
+#include <svl/imageitm.hxx>
+#include <svl/languageoptions.hxx>
+#include <editeng/protitem.hxx>
+#include <sfx2/linkmgr.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/brshitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <sfx2/msgpool.hxx>
#include <swmodule.hxx>
#include <tox.hxx>
@@ -67,9 +64,9 @@
#include <wview.hxx>
#endif
#include <globdoc.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/moduleoptions.hxx>
-#include <svtools/visitem.hxx>
+#include <svl/stritem.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <svl/visitem.hxx>
#ifndef _CMDID_H
#include <cmdid.h>
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 6223d1d0234a..7088347480a8 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewtab.cxx,v $
- * $Revision: 1.44 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,17 +35,17 @@
#include "uitool.hxx"
#include <sfx2/app.hxx>
#include <svx/rulritem.hxx>
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#include <sfx2/request.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/frmdiritem.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/whiter.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/frmdiritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/whiter.hxx>
#include <svx/ruler.hxx>
-#include <svx/protitem.hxx>
-#include <svtools/rectitem.hxx>
+#include <editeng/protitem.hxx>
+#include <svl/rectitem.hxx>
#include <sfx2/bindings.hxx>
#include <fmtfsize.hxx>
#include <fmthdft.hxx>
@@ -347,7 +344,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetWidthPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
@@ -472,7 +469,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetHeightPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
}
diff --git a/sw/source/ui/uno/RefreshListenerContainer.cxx b/sw/source/ui/uno/RefreshListenerContainer.cxx
index e7a114076beb..39d28a6347c1 100644
--- a/sw/source/ui/uno/RefreshListenerContainer.cxx
+++ b/sw/source/ui/uno/RefreshListenerContainer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: RefreshListenerContainer.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index 055dfab0c7f0..63a674e0efad 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwXDocumentSettings.cxx,v $
- * $Revision: 1.66 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,16 +27,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <vos/mutex.hxx>
#include <sfx2/sfxbasecontroller.hxx>
#include <SwXDocumentSettings.hxx>
#include <SwXPrintPreviewSettings.hxx>
-#ifndef _COMPHELPER_MASTERPROPERTSETINFO_HXX_
#include <comphelper/MasterPropertySetInfo.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
#include <doc.hxx>
@@ -49,8 +43,7 @@
#include <sfx2/printer.hxx>
#include <editsh.hxx>
#include <drawdoc.hxx>
-#include <svtools/zforlist.hxx>
-#include <unoobj.hxx>
+#include <svl/zforlist.hxx>
#include <unotxdoc.hxx>
#include <cmdid.h>
#include <svx/zoomitem.hxx>
diff --git a/sw/source/ui/uno/SwXDocumentSettings.hxx b/sw/source/ui/uno/SwXDocumentSettings.hxx
index 57b5e4e36763..6ea168716e40 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.hxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwXDocumentSettings.hxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx
index 06f8dc83717d..015a75de2ab0 100644
--- a/sw/source/ui/uno/SwXFilterOptions.cxx
+++ b/sw/source/ui/uno/SwXFilterOptions.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwXFilterOptions.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx
index 725f844e2099..a812c39754c9 100644
--- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx
+++ b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwXPrintPreviewSettings.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx
index e720e67d96ca..2b908c453043 100644
--- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx
+++ b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: SwXPrintPreviewSettings.hxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx
index cc7ff4a870fd..8c5e5f0634f8 100644
--- a/sw/source/ui/uno/detreg.cxx
+++ b/sw/source/ui/uno/detreg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: detreg.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx
index 3b066a66ce08..c163feda46b5 100644
--- a/sw/source/ui/uno/dlelstnr.cxx
+++ b/sw/source/ui/uno/dlelstnr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dlelstnr.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,7 +38,7 @@
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <com/sun/star/uno/Reference.h>
#include <comphelper/processfactory.hxx>
diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk
index 41b2cc73ca78..32210b2162d6 100644
--- a/sw/source/ui/uno/makefile.mk
+++ b/sw/source/ui/uno/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.20 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx
index aedd6e0f6c68..cf27027148a7 100644
--- a/sw/source/ui/uno/swdet2.cxx
+++ b/sw/source/ui/uno/swdet2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdet2.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -49,7 +46,7 @@
#include <web.hrc>
#include <globdoc.hrc>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <unomid.h>
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 82da0914124a..c33d7428b630 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdetect.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -53,10 +50,10 @@
#include <ucbhelper/simpleinteractionrequest.hxx>
#include <rtl/ustring.h>
#include <rtl/logfile.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <vcl/window.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
#include <vos/mutex.hxx>
#include <svtools/sfxecode.hxx>
@@ -70,9 +67,8 @@
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/brokenpackageint.hxx>
-#include <svx/impgrf.hxx>
#include <svtools/FilterConfigItem.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <com/sun/star/util/XArchiver.hpp>
#include <comphelper/ihwrapnofilter.hxx>
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index 4f2886be2fe3..d3c65df67ce5 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swdetect.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index 2b302245f53b..4578ef27c2ea 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unoatxt.cxx,v $
- * $Revision: 1.42 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,16 +31,13 @@
#define _SVSTDARR_STRINGS
-
-#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <vos/mutex.hxx>
#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svtools/unoevent.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <sfx2/event.hxx>
#include <swtypes.hxx>
#include <glosdoc.hxx>
@@ -52,7 +46,10 @@
#include <gloslst.hxx>
#include <unoatxt.hxx>
#include <unomap.hxx>
-#include <unoobj.hxx>
+#include <unomid.h>
+#include <unotextbodyhf.hxx>
+#include <unotextrange.hxx>
+#include <TextCursorHelper.hxx>
#include <swevent.hxx>
#include <doc.hxx>
#include <unocrsr.hxx>
@@ -61,13 +58,14 @@
#include <docsh.hxx>
#include <swunodef.hxx>
#include <swmodule.hxx>
-#include <svtools/smplhint.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/smplhint.hxx>
+#include <svl/macitem.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include <memory>
+
SV_IMPL_REF ( SwDocShell )
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -410,25 +408,25 @@ sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextR
SwCntntNode * pNd = aIdx.GetNode().GetCntntNode();
SwPosition aPos( aIdx, SwIndex( pNd, pNd->Len() ));
- sal_Bool bRet = sal_False;
+ bool bRet = false;
pInsDoc->LockExpFlds();
{
+ SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : pxRange->GetDoc());
+ SwPaM aPam(pDoc->GetNodes());
+ SwPaM * pPam(0);
if(pxCursor)
{
- SwPaM* pUnoCrsr = pxCursor->GetPaM();
- bRet = pxCursor->GetDoc()->CopyRange( *pUnoCrsr, aPos, false )
- || bRet;
+ pPam = pxCursor->GetPaM();
}
else
{
- const ::sw::mark::IMark* const pBkmk = pxRange->GetBookmark();
- if(pBkmk && pBkmk->IsExpanded())
+ if (pxRange->GetPositions(aPam))
{
- SwPaM aTmp(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos());
- bRet = pxRange->GetDoc()->CopyRange(aTmp, aPos, false)
- || bRet;
+ pPam = & aPam;
}
}
+ if (!pPam) { return false; }
+ bRet = pDoc->CopyRange( *pPam, aPos, false ) || bRet;
}
pInsDoc->UnlockExpFlds();
@@ -1112,7 +1110,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
}
SwDoc* pDoc = 0;
- if ( pRange && pRange->GetBookmark())
+ if (pRange)
pDoc = pRange->GetDoc();
else if ( pCursor )
pDoc = pCursor->GetDoc();
@@ -1130,29 +1128,23 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
if(!pDoc)
throw uno::RuntimeException();
- SwPaM* pInsertPaM = 0;
- if(pRange)
+
+ SwPaM InsertPaM(pDoc->GetNodes());
+ if (pRange)
{
- const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark();
- if(pBkmk->IsExpanded())
- pInsertPaM = new SwPaM(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos());
- else
- pInsertPaM = new SwPaM(pBkmk->GetMarkPos());
+ if (!pRange->GetPositions(InsertPaM))
+ {
+ throw uno::RuntimeException();
+ }
}
else
{
- SwPaM* pCrsr = pCursor->GetPaM();
- if(pCrsr->HasMark())
- pInsertPaM = new SwPaM(*pCrsr->GetPoint(), *pCrsr->GetMark());
- else
- pInsertPaM = new SwPaM(*pCrsr->GetPoint());
+ InsertPaM = *pCursor->GetPaM();
}
- SwTextBlocks* pBlock = pGlossaries->GetGroupDoc(sGroupName);
- sal_Bool bResult = pBlock && !pBlock->GetError() &&
- pDoc->InsertGlossary( *pBlock, sEntryName, *pInsertPaM);
- delete pBlock;
- delete pInsertPaM;
+ ::std::auto_ptr<SwTextBlocks> pBlock(pGlossaries->GetGroupDoc(sGroupName));
+ const bool bResult = pBlock.get() && !pBlock->GetError()
+ && pDoc->InsertGlossary( *pBlock, sEntryName, InsertPaM);
if(!bResult)
throw uno::RuntimeException();
diff --git a/sw/source/ui/uno/unodefaults.cxx b/sw/source/ui/uno/unodefaults.cxx
index ccf8f270907b..87104a4fd4cb 100644
--- a/sw/source/ui/uno/unodefaults.cxx
+++ b/sw/source/ui/uno/unodefaults.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unodefaults.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/unodefaults.hxx b/sw/source/ui/uno/unodefaults.hxx
index 2ba4733fcd0a..eda851f1c8b5 100644
--- a/sw/source/ui/uno/unodefaults.hxx
+++ b/sw/source/ui/uno/unodefaults.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unodefaults.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx
index 81849559cfc2..4cfbdf7c40ab 100644
--- a/sw/source/ui/uno/unodispatch.cxx
+++ b/sw/source/ui/uno/unodispatch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unodispatch.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,17 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <vcl/svapp.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
+#include <svx/dataaccessdescriptor.hxx>
+
#include <unodispatch.hxx>
-#include <unoobj.hxx>
+#include <unobaseclass.hxx>
#include <view.hxx>
#include <cmdid.h>
#include "wrtsh.hxx"
#include "dbmgr.hxx"
-#include <svx/dataaccessdescriptor.hxx>
+
using namespace ::com::sun::star;
using namespace rtl;
diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx
index dc801a8abee5..49e8f37f2b06 100644
--- a/sw/source/ui/uno/unodoc.cxx
+++ b/sw/source/ui/uno/unodoc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unodoc.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx
index 862375b4ee1a..a322b0e677f9 100644
--- a/sw/source/ui/uno/unofreg.cxx
+++ b/sw/source/ui/uno/unofreg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unofreg.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index fed4c2b201cf..c0645c0d0648 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unomailmerge.cxx,v $
- * $Revision: 1.26.206.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,8 +32,8 @@
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
#include <osl/mutex.hxx>
-#include <svtools/itemprop.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/itemprop.hxx>
+#include <svl/urihelper.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <tools/shl.hxx> // GetAppData
#include <tools/tempfile.hxx>
@@ -725,6 +722,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
// when mail merge is called as command line macro
aMergeDesc.bPrintAsync = sal_False;
aMergeDesc.aPrintOptions = aPrintSettings;
+ aMergeDesc.bCreateSingleFile = true;
}
else /* FILE and MAIL*/
{
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index ed6d61898804..bb0fde6b1fb4 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unomod.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#include <swtypes.hxx>
#include <tools/debug.hxx>
#include <unomod.hxx>
-#include <unoobj.hxx>
+#include <unomid.h>
#include <unoprnms.hxx>
#include <unomap.hxx>
#include <prtopt.hxx>
@@ -519,81 +516,75 @@ void SwXPrintSettings::_preGetValues ()
void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
throw(UnknownPropertyException, WrappedTargetException )
{
- sal_Bool bBool = TRUE;
- sal_Bool bBoolVal;
switch( rInfo.mnHandle )
{
case HANDLE_PRINTSET_LEFT_PAGES:
- bBoolVal = mpPrtOpt->IsPrintLeftPage();
+ rValue <<= mpPrtOpt->IsPrintLeftPage();
break;
case HANDLE_PRINTSET_RIGHT_PAGES:
- bBoolVal = mpPrtOpt->IsPrintRightPage();
+ rValue <<= mpPrtOpt->IsPrintRightPage();
break;
case HANDLE_PRINTSET_REVERSED:
- bBoolVal = mpPrtOpt->IsPrintReverse();
+ rValue <<= mpPrtOpt->IsPrintReverse();
break;
case HANDLE_PRINTSET_PROSPECT:
- bBoolVal = mpPrtOpt->IsPrintProspect();
+ rValue <<= mpPrtOpt->IsPrintProspect();
break;
case HANDLE_PRINTSET_GRAPHICS:
- bBoolVal = mpPrtOpt->IsPrintGraphic();
+ rValue <<= mpPrtOpt->IsPrintGraphic();
break;
case HANDLE_PRINTSET_TABLES:
- bBoolVal = mpPrtOpt->IsPrintTable();
+ rValue <<= mpPrtOpt->IsPrintTable();
break;
case HANDLE_PRINTSET_DRAWINGS:
- bBoolVal = mpPrtOpt->IsPrintDraw();
+ rValue <<= mpPrtOpt->IsPrintDraw();
break;
case HANDLE_PRINTSET_CONTROLS:
- bBoolVal = mpPrtOpt->IsPrintControl();
+ rValue <<= mpPrtOpt->IsPrintControl();
break;
case HANDLE_PRINTSET_PAGE_BACKGROUND:
- bBoolVal = mpPrtOpt->IsPrintPageBackground();
+ rValue <<= mpPrtOpt->IsPrintPageBackground();
break;
case HANDLE_PRINTSET_BLACK_FONTS:
- bBoolVal = mpPrtOpt->IsPrintBlackFont();
+ rValue <<= mpPrtOpt->IsPrintBlackFont();
break;
case HANDLE_PRINTSET_SINGLE_JOBS:
- bBoolVal = mpPrtOpt->IsPrintSingleJobs();
+ rValue <<= mpPrtOpt->IsPrintSingleJobs();
break;
case HANDLE_PRINTSET_EMPTY_PAGES:
- bBoolVal = mpPrtOpt->IsPrintEmptyPages();
+ rValue <<= mpPrtOpt->IsPrintEmptyPages();
break;
case HANDLE_PRINTSET_PAPER_FROM_SETUP:
- bBoolVal = mpPrtOpt->IsPaperFromSetup();
+ rValue <<= mpPrtOpt->IsPaperFromSetup();
break;
case HANDLE_PRINTSET_ANNOTATION_MODE:
{
- bBool = FALSE;
rValue <<= static_cast < sal_Int16 > ( mpPrtOpt->GetPrintPostIts() );
}
break;
case HANDLE_PRINTSET_FAX_NAME :
{
- bBool = FALSE;
rValue <<= mpPrtOpt->GetFaxName();
}
break;
case HANDLE_PRINTSET_PROSPECT_RTL:
{
- bBoolVal = mpPrtOpt->IsPrintProspect_RTL();
+ rValue <<= mpPrtOpt->IsPrintProspectRTL();
}
break;
case HANDLE_PRINTSET_PLACEHOLDER:
{
- bBoolVal = mpPrtOpt->IsPrintTextPlaceholder();
+ rValue <<= mpPrtOpt->IsPrintTextPlaceholder();
}
break;
case HANDLE_PRINTSET_HIDDEN_TEXT:
{
- bBoolVal = mpPrtOpt->IsPrintHiddenText();
+ rValue <<= mpPrtOpt->IsPrintHiddenText();
}
break;
default:
throw UnknownPropertyException();
}
- if(bBool)
- rValue.setValue(&bBoolVal, ::getBooleanCppuType());
}
void SwXPrintSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
diff --git a/sw/source/ui/uno/unomodule.cxx b/sw/source/ui/uno/unomodule.cxx
index ef2837fd3e1c..85ef0f10c1d7 100644
--- a/sw/source/ui/uno/unomodule.cxx
+++ b/sw/source/ui/uno/unomodule.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unomodule.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/unomodule.hxx b/sw/source/ui/uno/unomodule.hxx
index e91f8aa3f75f..0fc02fc21562 100644
--- a/sw/source/ui/uno/unomodule.hxx
+++ b/sw/source/ui/uno/unomodule.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unomodule.hxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index fe3d8639bf84..e60241b19814 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unotxdoc.cxx,v $
- * $Revision: 1.134 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,13 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <cmdid.h>
-#include <swtypes.hxx>
+#include <vos/mutex.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/print.hxx>
#include <sfx2/viewfrm.hxx>
+#include <sfx2/sfxbasecontroller.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/awt/vclxdevice.hxx>
+#include <cmdid.h>
+#include <swtypes.hxx>
#include <wdocsh.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
@@ -46,28 +47,31 @@
#include <viewsh.hxx>
#include <pvprtdat.hxx>
#include <swprtopt.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <unotxdoc.hxx>
-#include <svtools/numuno.hxx>
-#include <unoobj.hxx>
+#include <svl/numuno.hxx>
+#include <fldbas.hxx>
+#include <unotextbodyhf.hxx>
+#include <unotextrange.hxx>
+#include <unotextcursor.hxx>
#include <unosett.hxx>
#include <unocoll.hxx>
#include <unoredlines.hxx>
#include <unosrch.hxx>
-#include <toolkit/awt/vclxdevice.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell)
#include <unoprnms.hxx>
#include <unostyle.hxx>
#include <unodraw.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <pagedesc.hxx>
#include <svtools/txtcmp.hxx>
#include <unocrsr.hxx>
#include <unofield.hxx>
#include <unoidx.hxx>
#include <unoflatpara.hxx>
+#include <unotxvw.hxx>
#include <poolfmt.hxx>
#include <globdoc.hxx>
#include <viewopt.hxx>
@@ -75,6 +79,8 @@
#include <doc.hxx>
#include <charatr.hxx>
#include <svx/xmleohlp.hxx>
+#include <globals.hrc>
+#include <unomid.h>
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
@@ -88,9 +94,9 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/script/XInvocation.hpp>
#include <com/sun/star/reflection/XIdlClassProvider.hpp>
-#include <svx/linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <svx/unofill.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <sfx2/progress.hxx>
#include <swmodule.hxx>
#include <docstat.hxx>
@@ -102,8 +108,8 @@
#include <SwXDocumentSettings.hxx>
#include <SwXPrintPreviewSettings.hxx>
#include <doc.hxx>
-#include <svx/forbiddencharacterstable.hxx>
-#include <svtools/zforlist.hxx>
+#include <editeng/forbiddencharacterstable.hxx>
+#include <svl/zforlist.hxx>
#include <drawdoc.hxx>
#include <SwStyleNameMapper.hxx>
#include <osl/file.hxx>
@@ -116,7 +122,7 @@
///////////////////////////Modified on Jun. 14th//////////////////////////
///////////////////////for getDocumentLanguages///////////////////////////
//-->
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <doc.hxx>
#include <docary.hxx> //SwCharFmts
#include <i18npool/mslangid.hxx>
@@ -127,18 +133,21 @@
#include <unostyle.hxx> //SwAutoStyleFamily
#include <istyleaccess.hxx> // handling of automatic styles
-#include <svtools/stylepool.hxx>
+#include <svl/stylepool.hxx>
#include <swatrset.hxx>
+#include <view.hxx>
+#include <srcview.hxx>
//#include <com/sun/star/i18n/ScriptType.hpp>
#include <svtools/langtab.hxx>
#include <map>
#include <set>
+#include <vector>
-#include <svx/eeitem.hxx>
-#include <svx/editeng.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/editeng.hxx>
#include <svx/svdoutl.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/languageoptions.hxx>
#include <svx/svdview.hxx>
//
@@ -170,6 +179,32 @@ using ::osl::FileBase;
/******************************************************************************
*
******************************************************************************/
+
+extern bool lcl_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds * pSrtLst );
+
+SwPrintUIOptions * lcl_GetPrintUIOptions(
+ SwDocShell * pDocShell,
+ const SfxViewShell * pView )
+{
+ if (!pDocShell)
+ return NULL;
+
+ const 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();
+ DBG_ASSERT( pPrintData, "failed to get SwPrintData from document" );
+
+ return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, *pPrintData );
+}
+
+////////////////////////////////////////////////////////////
+
+
SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc)
{
SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName( rCollName );
@@ -364,7 +399,9 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell) :
pxXLineNumberingProperties(0),
pxLinkTargetSupplier(0),
pxXRedlines(0),
- m_pHiddenViewFrame(0)
+ m_pHiddenViewFrame(0),
+ m_pPrintUIOptions( NULL ),
+ m_pRenderData( NULL )
{
}
/*-- 18.12.98 11:53:00---------------------------------------------------
@@ -379,6 +416,8 @@ SwXTextDocument::~SwXTextDocument()
xNumFmtAgg->setDelegator(x0);
xNumFmtAgg = 0;
}
+ delete m_pPrintUIOptions;
+ delete m_pRenderData;
}
@@ -725,19 +764,12 @@ Reference< util::XReplaceDescriptor > SwXTextDocument::createReplaceDescriptor(
SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCrsr)
{
getText();
- XText* pText = xBodyText.get();
+ XText *const pText = xBodyText.get();
SwXBodyText* pBText = (SwXBodyText*)pText;
- xCrsr = pBText->CreateTextCursor(sal_True);
-
- Reference<XUnoTunnel> xRangeTunnel( xCrsr, UNO_QUERY);
- SwXTextCursor* pxUnoCrsr = 0;
- if(xRangeTunnel.is())
- {
- pxUnoCrsr = reinterpret_cast<SwXTextCursor*>(xRangeTunnel->getSomething(
- SwXTextCursor::getUnoTunnelId()));
- }
+ SwXTextCursor *const pXTextCursor = pBText->CreateTextCursor(true);
+ xCrsr.set( static_cast<text::XWordCursor*>(pXTextCursor) );
- SwUnoCrsr* pUnoCrsr = pxUnoCrsr->GetCrsr();
+ SwUnoCrsr *const pUnoCrsr = pXTextCursor->GetCursor();
pUnoCrsr->SetRemainInSection(sal_False);
return pUnoCrsr;
}
@@ -968,10 +1000,7 @@ Reference< XIndexAccess >
if(!pResultCrsr)
throw RuntimeException();
Reference< XIndexAccess > xRet;
- if(nResult)
- xRet = new SwXTextRanges(pResultCrsr);
- else
- xRet = new SwXTextRanges();
+ xRet = new SwXTextRanges( (nResult) ? pResultCrsr : 0 );
delete pResultCrsr;
return xRet;
}
@@ -991,11 +1020,10 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear
Reference< XInterface > xRet;
if(nResult)
{
- Reference< XTextRange > xTempRange = SwXTextRange::CreateTextRangeFromPosition(
- pDocShell->GetDoc(),
- *pResultCrsr->GetPoint(),
- pResultCrsr->GetMark());
- xRet = *new SwXTextCursor(xTempRange->getText(), pResultCrsr);
+ const uno::Reference< text::XText > xParent =
+ ::sw::CreateParentXText(*pDocShell->GetDoc(),
+ *pResultCrsr->GetPoint());
+ xRet = *new SwXTextCursor(xParent, *pResultCrsr);
delete pResultCrsr;
}
return xRet;
@@ -1019,12 +1047,11 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface >
Reference< XInterface > xRet;
if(nResult)
{
- Reference< XTextRange > xTempRange = SwXTextRange::CreateTextRangeFromPosition(
- pDocShell->GetDoc(),
- *pResultCrsr->GetPoint(),
- pResultCrsr->GetMark());
+ const uno::Reference< text::XText > xParent =
+ ::sw::CreateParentXText(*pDocShell->GetDoc(),
+ *pResultCrsr->GetPoint());
- xRet = *new SwXTextCursor(xTempRange->getText(), pResultCrsr);
+ xRet = *new SwXTextCursor(xParent, *pResultCrsr);
delete pResultCrsr;
}
return xRet;
@@ -2384,7 +2411,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException)
if(!IsValid())
throw RuntimeException();
SwDoc* pDoc = pDocShell->GetDoc();
- SvxLinkManager& rLnkMan = pDoc->GetLinkManager();
+ sfx2::LinkManager& rLnkMan = pDoc->GetLinkManager();
if( rLnkMan.GetLinks().Count() )
{
UnoActionContext aAction(pDoc);
@@ -2453,100 +2480,74 @@ Any SAL_CALL SwXTextDocument::getPropertyDefault( const OUString& rPropertyName
}
return aAny;
}
-/*-- 06.01.2004 15:08:34---------------------------------------------------
- The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
- the current ViewShell so that fields are not printed as commands and
- hidden text and hidden characters are always invisible.
- After printing the view options are restored
- -----------------------------------------------------------------------*/
-class SwViewOptionAdjust_Impl
-{
- bool m_bSwitchOff_IsFldName;
- bool m_bSwitchOff_PlaceHolderView;
- bool m_bSwitchOff_HiddenChar;
- bool m_bSwitchOff_HiddenParagraphs;
- bool m_bSwitchOff_IsShowHiddenField;
-
- SwViewOption* m_pViewOption;
- SwWrtShell& m_rShell;
-public:
- SwViewOptionAdjust_Impl(SwWrtShell& rSh);
- ~SwViewOptionAdjust_Impl();
-};
-/*-- 06.01.2004 15:08:34---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-SwViewOptionAdjust_Impl::SwViewOptionAdjust_Impl(SwWrtShell& rSh) :
- m_pViewOption(0),
- m_rShell(rSh)
-{
- const SwViewOption* pCurrentViewOptions = m_rShell.GetViewOptions();
- m_bSwitchOff_IsFldName = pCurrentViewOptions->IsFldName() && m_rShell.IsAnyFieldInDoc();
- bool bApplyViewOptions = m_bSwitchOff_IsFldName;
- //switch off painting of placeholder fields
- m_bSwitchOff_PlaceHolderView = pCurrentViewOptions->IsShowPlaceHolderFields();
- //switch off display of hidden characters if on and hidden characters are in use
- m_bSwitchOff_HiddenChar = pCurrentViewOptions->IsShowHiddenChar() && m_rShell.GetDoc()->ContainsHiddenChars();
- //switch off display of hidden paragraphs if on and hidden paragraphs are in use
- m_bSwitchOff_HiddenParagraphs = pCurrentViewOptions->IsShowHiddenPara();
- if(m_bSwitchOff_HiddenParagraphs)
- {
- const SwFieldType* pFldType = m_rShell.GetDoc()->GetSysFldType(RES_HIDDENPARAFLD);
- if(!pFldType || !pFldType->GetDepends())
- m_bSwitchOff_HiddenParagraphs = false;
- }
- m_bSwitchOff_IsShowHiddenField = pCurrentViewOptions->IsShowHiddenField();
- if(m_bSwitchOff_IsShowHiddenField)
- {
- const SwFieldType* pFldType = m_rShell.GetDoc()->GetSysFldType(RES_HIDDENTXTFLD);
- if( !pFldType || !pFldType->GetDepends())
- m_bSwitchOff_IsShowHiddenField = false;
- }
-
- bApplyViewOptions |= m_bSwitchOff_PlaceHolderView;
- bApplyViewOptions |= m_bSwitchOff_HiddenChar;
- bApplyViewOptions |= m_bSwitchOff_HiddenParagraphs;
- bApplyViewOptions |= m_bSwitchOff_IsShowHiddenField;
- if(bApplyViewOptions)
- {
- m_pViewOption = new SwViewOption(*m_rShell.GetViewOptions());
- if(m_bSwitchOff_IsFldName)
- m_pViewOption->SetFldName(FALSE);
- if(m_bSwitchOff_PlaceHolderView)
- m_pViewOption->SetShowPlaceHolderFields(FALSE);
- if(m_bSwitchOff_HiddenChar)
- m_pViewOption->SetShowHiddenChar(FALSE);
- if(m_bSwitchOff_HiddenParagraphs)
- m_pViewOption->SetShowHiddenPara(FALSE);
- if(m_bSwitchOff_IsShowHiddenField)
- m_pViewOption->SetShowHiddenField(FALSE);
- SW_MOD()->ApplyUsrPref(*m_pViewOption, &m_rShell.GetView(), VIEWOPT_DEST_VIEW_ONLY );
- }
-}
-/*-- 06.01.2004 15:08:34---------------------------------------------------
- -----------------------------------------------------------------------*/
-SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
+static OutputDevice * lcl_GetOutputDevice( const SwPrintUIOptions &rPrintUIOptions )
+{
+ OutputDevice *pOut = 0;
+
+ uno::Any aAny( rPrintUIOptions.getValue( C2U( "RenderDevice" ) ));
+ uno::Reference< awt::XDevice > xRenderDevice;
+ aAny >>= xRenderDevice;
+ if (xRenderDevice.is())
+ {
+ VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
+ pOut = pDevice ? pDevice->GetOutputDevice() : 0;
+ }
+
+ return pOut;
+}
+
+
+static bool lcl_SeqHasProperty(
+ const uno::Sequence< beans::PropertyValue >& rOptions,
+ const sal_Char *pPropName )
{
- if(m_pViewOption)
+ bool bRes = false;
+ const sal_Int32 nLen = rOptions.getLength();
+ const beans::PropertyValue *pProps = rOptions.getConstArray();
+ for (sal_Int32 i = 0; i < nLen && !bRes; ++i)
{
- if(m_bSwitchOff_IsFldName)
- m_pViewOption->SetFldName(TRUE);
- if(m_bSwitchOff_PlaceHolderView)
- m_pViewOption->SetShowPlaceHolderFields(TRUE);
- if(m_bSwitchOff_HiddenChar)
- m_pViewOption->SetShowHiddenChar(TRUE);
- if(m_bSwitchOff_HiddenParagraphs)
- m_pViewOption->SetShowHiddenPara(TRUE);
- if(m_bSwitchOff_IsShowHiddenField)
- m_pViewOption->SetShowHiddenField(TRUE);
- SW_MOD()->ApplyUsrPref(*m_pViewOption, &m_rShell.GetView(), VIEWOPT_DEST_VIEW_ONLY );
- delete m_pViewOption;
+ if (pProps[i].Name.equalsAscii( pPropName ))
+ bRes = true;
}
+ return bRes;
}
-/* -----------------------------23.08.02 16:00--------------------------------
- ---------------------------------------------------------------------------*/
+
+SfxViewShell * SwXTextDocument::GetRenderView(
+ bool &rbIsSwSrcView,
+ const uno::Sequence< beans::PropertyValue >& rOptions,
+ bool bIsPDFExport )
+{
+ // get view shell to use
+ SfxViewShell *pView = 0;
+ if (bIsPDFExport)
+ pView = GuessViewShell( rbIsSwSrcView );
+ else
+ {
+ uno::Any aTmp;
+ const sal_Int32 nLen = rOptions.getLength();
+ const beans::PropertyValue *pProps = rOptions.getConstArray();
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ if (pProps[i].Name.equalsAscii( "View" ))
+ {
+ aTmp = pProps[i].Value;
+ break;
+ }
+ }
+
+ uno::Reference< frame::XController > xController;
+ if (aTmp >>= xController)
+ {
+ DBG_ASSERT( xController.is(), "controller is empty!" );
+ pView = GuessViewShell( rbIsSwSrcView, xController );
+ }
+ }
+ return pView;
+}
+
+
/*
* GetRenderDoc:
* returns the document to be rendered, usually this will be the 'regular'
@@ -2556,7 +2557,10 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
* SfxViewShell.
*/
-SwDoc * SwXTextDocument::GetRenderDoc( SfxViewShell *&rpView, const uno::Any& rSelection )
+SwDoc * SwXTextDocument::GetRenderDoc(
+ SfxViewShell *&rpView,
+ const uno::Any& rSelection,
+ bool bIsPDFExport )
{
SwDoc *pDoc = 0;
@@ -2566,11 +2570,22 @@ SwDoc * SwXTextDocument::GetRenderDoc( SfxViewShell *&rpView, const uno::Any& rS
pDoc = pDocShell->GetDoc();
else
{
- // used for PDF export of (multi-)selection
+ DBG_ASSERT( !xModel.is(), "unexpected model found" );
+
if (rSelection.hasValue()) // is anything selected ?
{
+ // this part should only be called when a temporary document needs to be created,
+ // for example for PDF export or printing of (multi-)selection only.
+
+ bool bIsSwSrcView = false;
if (!rpView)
- rpView = GuessViewShell();
+ {
+ (void) bIsPDFExport;
+ // aside from maybe PDF export the view should always have been provided!
+ DBG_ASSERT( bIsPDFExport, "view is missing, guessing one..." );
+
+ rpView = GuessViewShell( bIsSwSrcView );
+ }
DBG_ASSERT( rpView, "ViewShell missing" );
// the view shell should be SwView for documents PDF export.
// for the page preview no selection should be possible
@@ -2585,55 +2600,187 @@ SwDoc * SwXTextDocument::GetRenderDoc( SfxViewShell *&rpView, const uno::Any& rS
rpView = pDoc->GetDocShell()->GetView();
}
}
- else {
+ else
+ {
DBG_ERROR( "unexpected ViewShell" );
}
}
}
return pDoc;
}
+
/* -----------------------------23.08.02 16:00--------------------------------
---------------------------------------------------------------------------*/
+
+static void lcl_SavePrintUIOptionsToDocumentPrintData(
+ SwDoc &rDoc,
+ 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() );
+}
+
+
sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
const uno::Any& rSelection,
- const uno::Sequence< beans::PropertyValue >& /*rxOptions*/ )
+ const uno::Sequence< beans::PropertyValue >& rxOptions )
throw (IllegalArgumentException, RuntimeException)
{
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- SfxViewShell *pView = 0;
- SwDoc *pDoc = GetRenderDoc( pView, rSelection );
- if (!pDoc)
- throw RuntimeException();
- SwDocShell *pRenderDocShell = pDoc->GetDocShell();
- // #i38289
- if(pDoc->get(IDocumentSettingAccess::BROWSE_MODE))
- {
- pRenderDocShell->ToggleBrowserMode(false,NULL);
- }
+ const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
+ bool bIsSwSrcView = false;
+ SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
- SwWrtShell *pWrtShell = pRenderDocShell->GetWrtShell();
+ if (!bIsSwSrcView && !m_pRenderData)
+ m_pRenderData = new SwRenderData;
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ bool bFormat = m_pPrintUIOptions->processPropertiesAndCheckFormat( rxOptions );
+ // const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
+
+ SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
+ DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ if (!pDoc || !pView)
+ return 0;
+
+ // save current UI options from the print dialog for the next call to that dialog
+ lcl_SavePrintUIOptionsToDocumentPrintData( *pDoc, *m_pPrintUIOptions, bIsPDFExport );
sal_Int32 nRet = 0;
- if( !pWrtShell )
+ if (bIsSwSrcView)
{
- //create a hidden view to be able to export as PDF also in print preview
- m_pHiddenViewFrame = SfxViewFrame::CreateViewFrame( *pRenderDocShell, 2, TRUE );
- SwView* pSwView = (SwView*) m_pHiddenViewFrame->GetViewShell();
- pWrtShell = pSwView->GetWrtShellPtr();
+ SwSrcView *pSwSrcView = dynamic_cast< SwSrcView * >(pView);
+ OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
+ nRet = pSwSrcView->PrintSource( pOutDev, 1 /* dummy */, true /* get page count only */ );
}
+ else
+ {
+ SwDocShell *pRenderDocShell = pDoc->GetDocShell();
+ SwWrtShell *pWrtShell = pRenderDocShell->GetWrtShell();
+ if (bFormat)
+ {
+ // #i38289
+ if(pDoc->get(IDocumentSettingAccess::BROWSE_MODE))
+ {
+ pRenderDocShell->ToggleBrowserMode(false,NULL);
+ }
+
+ if (!pWrtShell)
+ {
+ //create a hidden view to be able to export as PDF also in print preview
+ m_pHiddenViewFrame = SfxViewFrame::CreateViewFrame( *pRenderDocShell, 2, TRUE );
+ SwView* pSwView = (SwView*) m_pHiddenViewFrame->GetViewShell();
+ pWrtShell = pSwView->GetWrtShellPtr();
+ }
- SwViewOptionAdjust_Impl aAdjust(*pWrtShell);
- pWrtShell->SetPDFExportOption( sal_True );
- // --> FME 2005-05-23 #122919# Force field update before PDF export:
- pWrtShell->ViewShell::UpdateFlds(TRUE);
- // <--
- pWrtShell->CalcLayout();
- pWrtShell->SetPDFExportOption( sal_False );
- nRet = pDoc->GetPageCount();
+ // reformating the document for printing will show the changes in the view
+ // which is likely to produce many unwanted and not nice to view actions.
+ // We don't want that! Thus we disable updating of the view.
+ pWrtShell->StartAction();
+
+ const TypeId aSwViewTypeId = TYPE(SwView);
+ if (pView->IsA(aSwViewTypeId))
+ {
+ if (m_pRenderData && !m_pRenderData->IsViewOptionAdjust())
+ m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() );
+ }
+
+ m_pRenderData->SetSwPrtOptions( new SwPrtOptions( C2U( bIsPDFExport ? "PDF export" : "Printing" ) ) );
+ 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();
+ m_pRenderData->ViewOptionAdjust( pPrtOptions );
+ }
+
+ // since printing now also use the API for PDF export this option
+ // should be set for printing as well ...
+ pWrtShell->SetPDFExportOption( sal_True );
+
+ // --> FME 2005-05-23 #122919# Force field update before PDF export:
+ pWrtShell->ViewShell::UpdateFlds(TRUE);
+ // <--
+
+ // there is some redundancy between those two function calls, but right now
+ // there is no time to sort this out.
+ //TODO: check what exatly needs to be done and make just one function for that
+ pWrtShell->CalcLayout();
+ pWrtShell->CalcPagesForPrint( pDoc->GetPageCount() );
+
+ pWrtShell->SetPDFExportOption( sal_False );
+
+
+ // enable view again
+ pWrtShell->EndAction();
+ }
+
+ const sal_Int32 nPageCount = pDoc->GetPageCount();
+
+ //
+ // get number of pages to be rendered
+ //
+ const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false );
+ if (bPrintProspect)
+ {
+ pDoc->CalculatePagePairsForProspectPrinting( *m_pRenderData, *m_pPrintUIOptions, nPageCount );
+ nRet = m_pRenderData->GetPagePairsForProspectPrinting().size();
+ }
+ else
+ {
+ const sal_Int16 nPostItMode = (sal_Int16) m_pPrintUIOptions->getIntValue( "PrintAnnotationMode", 0 );
+ if (nPostItMode != POSTITS_NONE)
+ {
+ OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
+ m_pRenderData->CreatePostItData( pDoc, pWrtShell->GetViewOptions(), pOutDev );
+ }
+
+ // get set of valid document pages (according to the current settings)
+ // and their start frames
+ pDoc->CalculatePagesForPrinting( *m_pRenderData, *m_pPrintUIOptions, bIsPDFExport, nPageCount );
+
+ if (nPostItMode != POSTITS_NONE)
+ {
+ pDoc->UpdatePagesForPrintingWithPostItData( *m_pRenderData,
+ *m_pPrintUIOptions, bIsPDFExport, nPageCount );
+ }
+
+ nRet = m_pRenderData->GetPagesToPrint().size();
+ }
+ }
+ DBG_ASSERT( nRet >= 0, "negative number of pages???" );
return nRet;
}
@@ -2649,41 +2796,110 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- SfxViewShell *pView = 0;
- SwDoc *pDoc = GetRenderDoc( pView, rSelection );
- if (!pDoc)
- throw RuntimeException();
+
+ const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
+ bool bIsSwSrcView = false;
+ SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
+
+ // m_pRenderData should NOT be created here!
+ // That should only be done in getRendererCount. If this function is called before
+ // getRendererCount was called then the caller will probably just retrieve the extra UI options
+ // and is not interested in getting valid information about the other data that would
+ // otherwise be provided here!
+// if( ! m_pRenderData )
+// m_pRenderData = new SwRenderData;
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ m_pPrintUIOptions->processProperties( rxOptions );
+ const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false );
+ const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
+
+ SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
+ DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ if (!pDoc || !pView)
+ return uno::Sequence< beans::PropertyValue >();
// due to #110067# (document page count changes sometimes during
// PDF export/printing) we can not check for the upper bound properly.
// Thus instead of throwing the exception we silently return.
- if (!(0 <= nRenderer /* && nRenderer < pDoc->GetPageCount()*/))
+ if (0 > nRenderer)
throw IllegalArgumentException();
- if (nRenderer >= pDoc->GetPageCount())
+ sal_Int32 nMaxRenderer = 0;
+ if (!bIsSwSrcView && m_pRenderData)
+ {
+ DBG_ASSERT( m_pRenderData, "m_pRenderData missing!!" );
+ nMaxRenderer = bPrintProspect?
+ m_pRenderData->GetPagePairsForProspectPrinting().size() - 1 :
+ m_pRenderData->GetPagesToPrint().size() - 1;
+ }
+ // since SwSrcView::PrintSource is a poor implementation to get the number of pages to print
+ // we obmit checking of the upper bound in this case.
+ if (!bIsSwSrcView && m_pRenderData && nRenderer > nMaxRenderer)
return uno::Sequence< beans::PropertyValue >();
- bool bSkipEmptyPages = false;
- for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty )
+ uno::Sequence< beans::PropertyValue > aRenderer;
+ if (m_pRenderData)
{
- if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ) )
- rxOptions[ nProperty].Value >>= bSkipEmptyPages;
- }
+ awt::Size aPageSize;
+ Size aTmpSize;
+ if (bIsSwSrcView || bPrintProspect)
+ {
+ // for printing of HTML source code and prospect printing we should use
+ // the printers paper size since
+ // a) HTML source view has no page size
+ // b) prospect printing has a different page size from the documents page
+ // since two document pages will get rendered on one printer page
+
+ // since PageIncludesNonprintableArea will be set to true we can return the
+ // printers paper size here.
+ // Sometimes 'getRenderer' is only called to get "ExtraPrintUIOptions", in this
+ // case we won't get an OutputDevice here, but then the caller also has no need
+ // for the correct PageSisze right now...
+ Printer *pPrinter = dynamic_cast< Printer * >(lcl_GetOutputDevice( *m_pPrintUIOptions ));
+ if (pPrinter)
+ {
+ if (bPrintProspect)
+ {
+ aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages );
+ // we just state what output size we would need
+ // the rest is nowadays up to vcl
+ aPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ),
+ TWIP_TO_MM100( aTmpSize.Height() ));
+ }
+ else
+ {
+ // printing HTML source view
+ aTmpSize = pPrinter->GetPaperSize();
+ aTmpSize = pPrinter->LogicToLogic( aTmpSize,
+ pPrinter->GetMapMode(), MapMode( MAP_100TH_MM ));
+ aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
+ }
+ }
+ }
+ else
+ {
+ aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages );
+ aPageSize = awt::Size ( TWIP_TO_MM100( aTmpSize.Width() ),
+ TWIP_TO_MM100( aTmpSize.Height() ));
+ }
- Size aPgSize( pDoc->GetPageSize( sal_uInt16(nRenderer + 1), bSkipEmptyPages ) );
+ aRenderer.realloc(2);
+ aRenderer[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
+ aRenderer[0].Value <<= aPageSize;
+ aRenderer[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageIncludesNonprintableArea" ) );
+ aRenderer[1].Value <<= sal_True;
+ }
- awt::Size aPageSize( TWIP_TO_MM100( aPgSize.Width() ),
- TWIP_TO_MM100( aPgSize.Height() ));
- uno::Sequence< beans::PropertyValue > aRenderer(1);
- PropertyValue &rValue = aRenderer.getArray()[0];
- rValue.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
- rValue.Value <<= aPageSize;
+ m_pPrintUIOptions->appendPrintUIOptions( aRenderer );
return aRenderer;
}
/* -----------------------------28.10.02 16:00--------------------------------
---------------------------------------------------------------------------*/
-SfxViewShell * SwXTextDocument::GuessViewShell()
+SfxViewShell * SwXTextDocument::GuessViewShell(
+ /* out */ bool &rbIsSwSrcView,
+ const uno::Reference< css::frame::XController > xController )
{
// #130810# SfxViewShell::Current() / SfxViewShell::GetObjectShell()
// must not be used (see comment from MBA)
@@ -2691,24 +2907,39 @@ SfxViewShell * SwXTextDocument::GuessViewShell()
SfxViewShell *pView = 0;
SwView *pSwView = 0;
SwPagePreView *pSwPagePreView = 0;
+ SwSrcView *pSwSrcView = 0;
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False );
+
+ // look for the view shell with the same controller in use,
+ // otherwise look for a suitable view, preferably a SwView,
+ // if that one is not found use a SwPagePreView if found.
while (pFrame)
{
pView = pFrame->GetViewShell();
pSwView = dynamic_cast< SwView * >(pView);
- if (pSwView)
- break;
+ pSwSrcView = dynamic_cast< SwSrcView * >(pView);
if (!pSwPagePreView)
pSwPagePreView = dynamic_cast< SwPagePreView * >(pView);
+ if (xController.is())
+ {
+ if (pView && pView->GetController() == xController)
+ break;
+ }
+ else if (pSwView || pSwSrcView)
+ break;
pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False );
}
- return pSwView ? pSwView : dynamic_cast< SwView * >(pSwPagePreView);
+ DBG_ASSERT( pSwView || pSwPagePreView || pSwSrcView, "failed to get view shell" );
+ if (pView)
+ rbIsSwSrcView = pSwSrcView != 0;
+ return pView;
+// return pSwView ? dynamic_cast< SfxViewShell * >(pSwView) :
+// (pSwSrcView ? dynamic_cast< SfxViewShell * >(pSwSrcView) :
+// dynamic_cast< SfxViewShell * >(pSwPagePreView) );
}
-/* -----------------------------23.08.02 16:00--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextDocument::render(
sal_Int32 nRenderer,
const uno::Any& rSelection,
@@ -2718,121 +2949,143 @@ void SAL_CALL SwXTextDocument::render(
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- SfxViewShell *pView = GuessViewShell();
- SwDoc *pDoc = GetRenderDoc( pView, rSelection );
- if (!pDoc || !pView)
- throw RuntimeException();
// due to #110067# (document page count changes sometimes during
// PDF export/printing) we can not check for the upper bound properly.
// Thus instead of throwing the exception we silently return.
- if (!(0 <= nRenderer /* && nRenderer < pDoc->GetPageCount()*/))
+ if (0 > nRenderer)
throw IllegalArgumentException();
- if (nRenderer >= pDoc->GetPageCount())
- return;
- // the view shell should be SwView for documents PDF export
- // or SwPagePreView for PDF export of the page preview
- //!! (check for SwView first as in GuessViewShell) !!
- const TypeId aSwViewTypeId = TYPE(SwView);
- ViewShell* pVwSh = pView->IsA(aSwViewTypeId) ?
- ((SwView*)pView)->GetWrtShellPtr() :
- ((SwPagePreView*)pView)->GetViewShell();
-
- uno::Reference< awt::XDevice > xRenderDevice;
- bool bFirstPage = false;
- bool bLastPage = false;
- rtl::OUString aPages;
- bool bSkipEmptyPages = false;
-
- for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty )
- {
- if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) )
- rxOptions[ nProperty].Value >>= xRenderDevice;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFirstPage" ) ) )
- rxOptions[ nProperty].Value >>= bFirstPage;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsLastPage" ) ) )
- rxOptions[ nProperty].Value >>= bLastPage;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ) )
- rxOptions[ nProperty].Value >>= aPages;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ) )
- rxOptions[ nProperty].Value >>= bSkipEmptyPages;
- }
-
- OutputDevice* pOut = 0;
- if (xRenderDevice.is())
+ const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
+ bool bIsSwSrcView = false;
+ SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
+
+ DBG_ASSERT( m_pRenderData, "data should have been created already in getRendererCount..." );
+ DBG_ASSERT( m_pPrintUIOptions, "data should have been created already in getRendererCount..." );
+ if (!bIsSwSrcView && !m_pRenderData)
+ m_pRenderData = new SwRenderData;
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ m_pPrintUIOptions->processProperties( rxOptions );
+ const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false );
+ const bool bLastPage = m_pPrintUIOptions->getBoolValue( "IsLastPage", sal_False );
+
+ SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
+ DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ if (pDoc && pView)
{
- VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
- pOut = pDevice ? pDevice->GetOutputDevice() : 0;
- }
-
- if(pVwSh && pOut)
- {
- SwPrtOptions aOptions( C2U("PDF export") );
-
- const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell);
- BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
- SwView::MakeOptions( NULL, aOptions, NULL, NULL, bWeb, NULL, NULL );
-
- Range aPageRange( nRenderer+1, nRenderer+1 );
- MultiSelection aPage( aPageRange );
- aPage.SetTotalRange( Range( 0, RANGE_MAX ) );
- aPage.Select( aPageRange );
- aOptions.aMulti = aPage;
-
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! aOptions.bPrintSelection parameter will be false.
- aOptions.bPrintSelection = FALSE;
-
- SwViewOptionAdjust_Impl* pViewOptionAdjust = pView->IsA(aSwViewTypeId) ?
- new SwViewOptionAdjust_Impl(*((SwView*)pView)->GetWrtShellPtr()) : 0;
-
-
- pVwSh->SetPDFExportOption( sal_True );
-
- // --> FME 2004-06-08 #i12836# enhanced pdf export
- //
- // First, we have to export hyperlinks, notes, and outline to pdf.
- // During this process, additional information required for tagging
- // the pdf file are collected, which are evaulated during painting.
- //
- SwWrtShell* pWrtShell = pView->IsA(aSwViewTypeId) ?
- ((SwView*)pView)->GetWrtShellPtr() :
- 0;
-
- if ( bFirstPage && pWrtShell )
+ sal_Int32 nMaxRenderer = 0;
+ if (!bIsSwSrcView)
{
- SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPages, bSkipEmptyPages, sal_False );
+ DBG_ASSERT( m_pRenderData, "m_pRenderData missing!!" );
+ nMaxRenderer = bPrintProspect?
+ m_pRenderData->GetPagePairsForProspectPrinting().size() - 1 :
+ m_pRenderData->GetPagesToPrint().size() - 1;
}
- // <--
+ // since SwSrcView::PrintSource is a poor implementation to get the number of pages to print
+ // we obmit checking of the upper bound in this case.
+ if (bIsSwSrcView || nRenderer <= nMaxRenderer)
+ {
+ if (bIsSwSrcView)
+ {
+ SwSrcView *pSwSrcView = dynamic_cast< SwSrcView * >(pView);
+ OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
+ pSwSrcView->PrintSource( pOutDev, nRenderer + 1, false );
+ }
+ else
+ {
+ // the view shell should be SwView for documents PDF export
+ // or SwPagePreView for PDF export of the page preview
+ //!! (check for SwView first as in GuessViewShell) !!
+ DBG_ASSERT( pView, "!! view missing !!" );
+ const TypeId aSwViewTypeId = TYPE(SwView);
+ ViewShell* pVwSh = 0;
+ if (pView)
+ {
+ pVwSh = pView->IsA(aSwViewTypeId) ?
+ ((SwView*)pView)->GetWrtShellPtr() :
+ ((SwPagePreView*)pView)->GetViewShell();
+ }
- pVwSh->Prt( aOptions, 0, pOut );
+ // get output device to use
+ OutputDevice * pOut = lcl_GetOutputDevice( *m_pPrintUIOptions );
- // --> FME 2004-10-08 #i35176#
- //
- // After printing the last page, we take care for the links coming
- // from the EditEngine. The links are generated during the painting
- // process, but the destinations are still missing.
- //
- if ( bLastPage && pWrtShell )
- {
- SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPages, bSkipEmptyPages, sal_True );
- }
- // <--
+ if(pVwSh && pOut && m_pRenderData->HasSwPrtOptions())
+ {
+ const rtl::OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange", OUString() );
+ const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage", sal_False );
+ bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
+
+ DBG_ASSERT(( pView->IsA(aSwViewTypeId) && m_pRenderData->IsViewOptionAdjust())
+ || (!pView->IsA(aSwViewTypeId) && !m_pRenderData->IsViewOptionAdjust()),
+ "SwView / SwViewOptionAdjust_Impl availability mismatch" );
+
+ // since printing now also use the API for PDF export this option
+ // should be set for printing as well ...
+ pVwSh->SetPDFExportOption( sal_True );
+
+ // --> FME 2004-06-08 #i12836# enhanced pdf export
+ //
+ // First, we have to export hyperlinks, notes, and outline to pdf.
+ // During this process, additional information required for tagging
+ // the pdf file are collected, which are evaulated during painting.
+ //
+ SwWrtShell* pWrtShell = pView->IsA(aSwViewTypeId) ?
+ ((SwView*)pView)->GetWrtShellPtr() :
+ 0;
+
+ if (bIsPDFExport && bFirstPage && pWrtShell)
+ {
+ SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, sal_False );
+ }
+ // <--
+
+ const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions();
+ if (bPrintProspect)
+ pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer );
+ else // normal printing and PDF export
+ pVwSh->PrintOrPDFExport( pOut, rSwPrtOptions, nRenderer );
+
+ // --> FME 2004-10-08 #i35176#
+ //
+ // After printing the last page, we take care for the links coming
+ // from the EditEngine. The links are generated during the painting
+ // process, but the destinations are still missing.
+ //
+ if (bIsPDFExport && bLastPage && pWrtShell)
+ {
+ SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, sal_True );
+ }
+ // <--
- pVwSh->SetPDFExportOption( sal_False );
- // #i96167# haggai: delete pViewOptionsAdjust here because it makes use
- // of the shell, which might get destroyed in lcl_DisposeView!
- delete pViewOptionAdjust;
+ pVwSh->SetPDFExportOption( sal_False );
- if( bLastPage && m_pHiddenViewFrame)
- {
- lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
- m_pHiddenViewFrame = 0;
+ // last page to be rendered? (not necessarily the last page of the document)
+ // -> do clean-up of data
+ if (bLastPage)
+ {
+ // #i96167# haggai: delete ViewOptionsAdjust here because it makes use
+ // of the shell, which might get destroyed in lcl_DisposeView!
+ if (m_pRenderData && m_pRenderData->IsViewOptionAdjust())
+ m_pRenderData->ViewOptionAdjustStop();
+
+ if (m_pRenderData && m_pRenderData->HasPostItData())
+ m_pRenderData->DeletePostItData();
+ if (m_pHiddenViewFrame)
+ {
+ lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
+ m_pHiddenViewFrame = 0;
+ }
+ }
+ }
+ }
}
}
+ if( bLastPage )
+ {
+ delete m_pRenderData; m_pRenderData = NULL;
+ delete m_pPrintUIOptions; m_pPrintUIOptions = NULL;
+ }
}
/* -----------------------------03.10.04 -------------------------------------
@@ -3790,3 +4043,80 @@ void SwXDocumentPropertyHelper::onChange()
if(m_pDoc)
m_pDoc->SetModified();
}
+
+
+/*****************************************************************************/
+
+SwViewOptionAdjust_Impl::SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions ) :
+ m_rShell( rSh ),
+ m_aOldViewOptions( rViewOptions )
+{
+}
+
+
+SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
+{
+ m_rShell.ApplyViewOptions( m_aOldViewOptions );
+}
+
+
+void SwViewOptionAdjust_Impl::AdjustViewOptions(
+ const SwPrtOptions *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
+ const bool bContainsHiddenChars = m_rShell.GetDoc()->ContainsHiddenChars();
+ const SwFieldType* pFldType = m_rShell.GetDoc()->GetSysFldType( RES_HIDDENTXTFLD );
+ const bool bContainsHiddenFields = pFldType && pFldType->GetDepends();
+ pFldType = m_rShell.GetDoc()->GetSysFldType( RES_HIDDENPARAFLD );
+ const bool bContainsHiddenParagraphs = pFldType && pFldType->GetDepends();
+ pFldType = m_rShell.GetDoc()->GetSysFldType( RES_JUMPEDITFLD );
+ const bool bContainsPlaceHolders = pFldType && pFldType->GetDepends();
+ const bool bContainsFields = m_rShell.IsAnyFieldInDoc();
+
+ SwViewOption aRenderViewOptions( m_aOldViewOptions );
+
+ // 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;
+ if (bContainsHiddenChars)
+ aRenderViewOptions.SetShowHiddenChar( bVal ); // hidden text
+ if (bContainsHiddenFields)
+ aRenderViewOptions.SetShowHiddenField( bVal );
+ if (bContainsHiddenParagraphs)
+ aRenderViewOptions.SetShowHiddenPara( bVal );
+
+ if (bContainsPlaceHolders)
+ {
+ // should always be printed in PDF export!
+ bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : TRUE;
+ aRenderViewOptions.SetShowPlaceHolderFields( bVal );
+ }
+
+ if (bContainsFields)
+ aRenderViewOptions.SetFldName( 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 );
+
+ if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
+ {
+ aRenderViewOptions.SetPrinting( pPrtOptions != NULL );
+ m_rShell.ApplyViewOptions( aRenderViewOptions );
+ }
+}
+
+
+/*****************************************************************************/
+
+
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 6197bb489d61..736304e6aefb 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unotxvw.cxx,v $
- * $Revision: 1.71 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -56,10 +53,10 @@
#include <svx/svdpage.hxx>
#include <svx/svdouno.hxx>
#include <svx/svdogrp.hxx>
-#include <svx/pbinitem.hxx>
+#include <editeng/pbinitem.hxx>
#include <pagedesc.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
#include <frmatr.hxx>
@@ -77,8 +74,12 @@
#include <SwStyleNameMapper.hxx>
#include <crsskip.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-
-#include <svx/editview.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/editview.hxx>
+#include <unobookmark.hxx>
+#include <unoparagraph.hxx>
+#include <unocrsrhelper.hxx>
+#include <unotextrange.hxx>
#include <sfx2/docfile.hxx>
#include "swdtflvr.hxx"
@@ -104,24 +105,8 @@ SV_IMPL_PTRARR( SelectionChangeListenerArr, XSelectionChangeListenerPtr );
* --------------------------------------------------*/
SwPaM* lcl_createPamCopy(const SwPaM& rPam)
{
- SwPaM* pRet = new SwPaM(*rPam.GetPoint());
- if(rPam.HasMark())
- {
- pRet->SetMark();
- *pRet->GetMark() = *rPam.GetMark();
- }
- if(rPam.GetNext() != (const Ring*)&rPam)
- {
- SwPaM *_pStartCrsr = (SwPaM *)rPam.GetNext();
- do
- {
- //neuen PaM erzeugen
- SwPaM* pPaM = new SwPaM(*_pStartCrsr);
- //und in den Ring einfuegen
- pPaM->MoveTo(pRet);
-
- } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != rPam.GetNext() );
- }
+ SwPaM *const pRet = new SwPaM(*rPam.GetPoint());
+ ::sw::DeepCopyPaM(rPam, *pRet);
return pRet;
}
/******************************************************************
@@ -329,8 +314,9 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
: 0;
if(pCursor && pCursor->GetDoc() == GetView()->GetDocShell()->GetDoc())
- pPam = lcl_createPamCopy(*((SwXTextCursor*)pCursor)->GetPaM());
-
+ {
+ pPam = lcl_createPamCopy(*pCursor->GetPaM());
+ }
}
else if(xPosN.is() &&
xIfcTunnel.is() &&
@@ -346,7 +332,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
else if(!pFrame && !pCell && xPos.is())
{
SwUnoInternalPaM aPam(*pDoc);
- if(SwXTextRange::XTextRangeToSwPaM(aPam, xPos))
+ if (::sw::XTextRangeToSwPaM(aPam, xPos))
{
pPam = lcl_createPamCopy(aPam);
}
@@ -429,19 +415,14 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
if(xBkm.is() && xIfcTunnel.is())
{
- SwXBookmark* pBkm = reinterpret_cast<SwXBookmark*>(
- xIfcTunnel->getSomething(SwXBookmark::getUnoTunnelId()));
- if(pBkm && pBkm->GetDoc() == pDoc)
+ ::sw::mark::IMark const*const pMark(
+ SwXBookmark::GetBookmarkInDoc(pDoc, xIfcTunnel) );
+ if (pMark)
{
- IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(pBkm->getName());
- if( ppMark != pMarkAccess->getMarksEnd() )
- {
- rSh.EnterStdMode();
- rSh.GotoMark( ppMark->get() );
- }
- return sal_True;
+ rSh.EnterStdMode();
+ rSh.GotoMark(pMark);
}
+ return sal_True;
}
// IndexMark, Index, TextField, Draw, Section, Footnote, Paragraph
//
@@ -721,7 +702,7 @@ uno::Reference< awt::XControl > SwXTextView::getControl(const uno::Reference< a
/*-- 08.03.07 13:55------------------------------------------------------
-----------------------------------------------------------------------*/
-uno::Reference< form::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException)
+uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -731,7 +712,7 @@ uno::Reference< form::XFormController > SAL_CALL SwXTextView::getFormController(
Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
- uno::Reference< form::XFormController > xController;
+ uno::Reference< form::runtime::XFormController > xController;
if ( pFormShell && pDrawView && pWindow )
xController = pFormShell->GetFormController( _Form, *pDrawView, *pWindow );
return xController;
@@ -1379,8 +1360,10 @@ void SwXTextViewCursor::gotoRange(
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc());
- if(!SwXTextRange::XTextRangeToSwPaM( rDestPam, xRange))
- throw IllegalArgumentException();
+ if (!::sw::XTextRangeToSwPaM(rDestPam, xRange))
+ {
+ throw uno::RuntimeException();
+ }
ShellModes eSelMode = m_pView->GetShellMode();
SwWrtShell& rSh = m_pView->GetWrtShell();
@@ -1435,10 +1418,13 @@ void SwXTextViewCursor::gotoRange(
{
pSrcNode = pCursor->GetPaM()->GetNode();
}
- else if(pRange && pRange->GetBookmark())
+ else if (pRange)
{
- const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark();
- pSrcNode = &(pBkmk->GetMarkPos().nNode.GetNode());
+ SwPaM aPam(pRange->GetDoc()->GetNodes());
+ if (pRange->GetPositions(aPam))
+ {
+ pSrcNode = aPam.GetNode();
+ }
}
else if (pPara && pPara->GetTxtNode())
{
@@ -1713,9 +1699,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- uno::Reference< text::XTextRange > xRg = SwXTextRange::CreateTextRangeFromPosition(pDoc,
- *pShellCrsr->Start(), 0);
- xRet = xRg->getText();
+ xRet = ::sw::CreateParentXText(*pDoc, *pShellCrsr->Start());
}
else
throw uno::RuntimeException();
@@ -1736,8 +1720,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc,
- *pShellCrsr->Start(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), 0);
}
else
throw uno::RuntimeException();
@@ -1758,8 +1741,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno::
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc,
- *pShellCrsr->End(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), 0);
}
else
throw uno::RuntimeException();
@@ -1791,7 +1773,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwXTextCursor::getTextFromPam(*pShellCrsr, uRet);
+ SwUnoCursorHelper::GetTextFromPam(*pShellCrsr, uRet);
}
default:;//prevent warning
}
@@ -1823,7 +1805,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwCursor* pShellCrsr = rSh.GetSwCrsr();
- SwXTextCursor::SetString( *pShellCrsr, aString );
+ SwUnoCursorHelper::SetString(*pShellCrsr, aString);
}
default:;//prevent warning
}
@@ -1852,7 +1834,10 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const
SwPaM* pShellCrsr = rSh.GetCrsr();
SwNode *pNode = pShellCrsr->GetNode();
if (pNode && pNode->IsTxtNode())
- SwXTextCursor::SetPropertyValue(*pShellCrsr, *m_pPropSet, rPropertyName, aValue );
+ {
+ SwUnoCursorHelper::SetPropertyValue(
+ *pShellCrsr, *m_pPropSet, rPropertyName, aValue );
+ }
else
throw RuntimeException();
}
@@ -1871,7 +1856,8 @@ Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyValue( *pShellCrsr, *m_pPropSet, rPropertyName);
+ aRet = SwUnoCursorHelper::GetPropertyValue(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
else
throw RuntimeException();
@@ -1920,7 +1906,8 @@ PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyNam
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- eState = SwXTextCursor::GetPropertyState( *pShellCrsr, *m_pPropSet, rPropertyName);
+ eState = SwUnoCursorHelper::GetPropertyState(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
else
throw RuntimeException();
@@ -1938,7 +1925,8 @@ Sequence< PropertyState > SwXTextViewCursor::getPropertyStates(
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyStates(*pShellCrsr, *m_pPropSet, rPropertyNames);
+ aRet = SwUnoCursorHelper::GetPropertyStates(
+ *pShellCrsr, *m_pPropSet, rPropertyNames);
}
return aRet;
}
@@ -1953,7 +1941,8 @@ void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwXTextCursor::SetPropertyToDefault( *pShellCrsr, *m_pPropSet, rPropertyName);
+ SwUnoCursorHelper::SetPropertyToDefault(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
}
/*-- 29.06.00 17:33:43---------------------------------------------------
@@ -1968,7 +1957,8 @@ Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyDefault( *pShellCrsr, *m_pPropSet, rPropertyName);
+ aRet = SwUnoCursorHelper::GetPropertyDefault(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
return aRet;
}
@@ -2214,5 +2204,6 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe
}
}
}
+
// -----------------------------------------------------------------------------
diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx
index 8523d69de823..cd121226a5f1 100644
--- a/sw/source/ui/uno/warnpassword.cxx
+++ b/sw/source/ui/uno/warnpassword.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: warnpassword.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
// ============================================================================
#include "warnpassword.hxx"
#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/sfxsids.hrc>
#include <ucbhelper/simpleinteractionrequest.hxx>
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 14c27c19b137..06c1a580a73f 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: attrdesc.cxx,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,10 +29,10 @@
#include "precompiled_sw.hxx"
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <vcl/svapp.hxx>
-#include <svx/itemtype.hxx>
-#include <goodies/grfmgr.hxx>
+#include <editeng/itemtype.hxx>
+#include <svtools/grfmgr.hxx>
#include <unotools/intlwrapper.hxx>
#include <comphelper/processfactory.hxx>
#include <fmtanchr.hxx>
@@ -53,9 +50,7 @@
#include <fmturl.hxx>
#include <fmthdft.hxx>
#include <fmtcnct.hxx>
-#ifndef _FMTLINE_HXX
#include <fmtline.hxx>
-#endif
#include <tgrditem.hxx>
#include <hfspacingitem.hxx>
#include <fmtruby.hxx>
@@ -687,13 +682,13 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
USHORT nId = 0;
switch ( GetAnchorId() )
{
- case FLY_AT_CNTNT: //Absatzgebundener Rahmen
+ case FLY_AT_PARA:
nId = STR_FLY_AT_CNTNT;
break;
- case FLY_IN_CNTNT: //Zeichengebundener Rahmen
+ case FLY_AS_CHAR:
nId = STR_FLY_IN_CNTNT;
break;
- case FLY_PAGE: //Seitengebundener Rahmen
+ case FLY_AT_PAGE:
nId = STR_FLY_PAGE;
break;
default:;//prevent warning
diff --git a/sw/source/ui/utlui/attrdesc.hrc b/sw/source/ui/utlui/attrdesc.hrc
index 1715fcaf4bf4..a750750566f3 100644
--- a/sw/source/ui/utlui/attrdesc.hrc
+++ b/sw/source/ui/utlui/attrdesc.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: attrdesc.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/attrdesc.src b/sw/source/ui/utlui/attrdesc.src
index dd9533a2257f..f1602efcacd8 100644
--- a/sw/source/ui/utlui/attrdesc.src
+++ b/sw/source/ui/utlui/attrdesc.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: attrdesc.src,v $
- * $Revision: 1.44 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx
index 1de7b99a2b66..3b2567673020 100644
--- a/sw/source/ui/utlui/bookctrl.cxx
+++ b/sw/source/ui/utlui/bookctrl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bookctrl.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,10 +32,10 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/dispatch.hxx>
#ifndef _EVENT_HXX //autogen
#include <vcl/event.hxx>
diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx
index 109fa3fd1545..b534b538ca54 100644
--- a/sw/source/ui/utlui/condedit.cxx
+++ b/sw/source/ui/utlui/condedit.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: condedit.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 1660f7da38c5..9be4ef6eadf3 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: content.cxx,v $
- * $Revision: 1.55.34.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,9 +30,9 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/urlbmk.hxx>
+#include <svl/urlbmk.hxx>
#include <tools/urlobj.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index eca568ca60a2..fea4b72462e3 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: glbltree.cxx,v $
- * $Revision: 1.40 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,23 +30,23 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/fcontnr.hxx>
-#include <svx/linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <sfx2/docfile.hxx>
#ifndef _HELP_HXX //autogen
#include <vcl/help.hxx>
#endif
#include <sot/filelist.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/eitem.hxx>
+#include <svl/urlbmk.hxx>
#include <svtools/filter.hxx>
#include <sfx2/docinsert.hxx>
#include <sfx2/filedlghelper.hxx>
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index 7072cb254274..5c3350346201 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gloslst.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGSISORTDTOR
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <tools/urlobj.hxx>
#include <vcl/dialog.hxx>
#include <vcl/msgbox.hxx>
@@ -48,9 +45,9 @@
#endif
#include <vcl/lstbox.hxx>
#ifndef SVTOOLS_FSTATHELPER_HXX
-#include <svtools/fstathelper.hxx>
+#include <svl/fstathelper.hxx>
#endif
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <swtypes.hxx>
#include <swmodule.hxx>
diff --git a/sw/source/ui/utlui/gloslst.hrc b/sw/source/ui/utlui/gloslst.hrc
index 34997b9bea2f..6c89f1c5ac9c 100644
--- a/sw/source/ui/utlui/gloslst.hrc
+++ b/sw/source/ui/utlui/gloslst.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gloslst.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/gloslst.src b/sw/source/ui/utlui/gloslst.src
index e33e19ffa4ee..78f96e85e741 100644
--- a/sw/source/ui/utlui/gloslst.src
+++ b/sw/source/ui/utlui/gloslst.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: gloslst.src,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 275b49a4c9e4..d40283e39146 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: initui.cxx,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -54,7 +51,7 @@
#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
#endif
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include <unomid.h>
@@ -169,6 +166,7 @@ ShellResource::ShellResource()
aStrAllPageHeadFoot( SW_RES( STR_ALLPAGE_HEADFOOT ) ),
aStrNone( SW_RES( STR_TEMPLATE_NONE )),
aFixedStr( SW_RES( STR_FIELD_FIXED )),
+ sDurationFormat( SW_RES( STR_DURATION_FORMAT )),
aTOXIndexName( SW_RES(STR_TOI)),
aTOXUserName( SW_RES(STR_TOU)),
diff --git a/sw/source/ui/utlui/initui.hrc b/sw/source/ui/utlui/initui.hrc
index 5e0c5092d6f6..367091fbd443 100644
--- a/sw/source/ui/utlui/initui.hrc
+++ b/sw/source/ui/utlui/initui.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: initui.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -64,5 +61,6 @@
#define STR_PAGEDESC_FOLLOWNAME 27
#define STR_HYPERLINK_CLICK 28
#define STR_GETREFFLD_REFITEMNOTFOUND 29
+#define STR_DURATION_FORMAT 30
#endif
diff --git a/sw/source/ui/utlui/initui.src b/sw/source/ui/utlui/initui.src
index d8ebdfc7e64e..3b08e771a309 100644
--- a/sw/source/ui/utlui/initui.src
+++ b/sw/source/ui/utlui/initui.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: initui.src,v $
- * $Revision: 1.45 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -112,6 +109,10 @@ Resource RID_SW_SHELLRES
{
Text [ en-US ] = "(fixed)" ;
};
+ String STR_DURATION_FORMAT
+ {
+ Text [en-US] = " Y: %1 M: %2 D: %3 H: %4 M: %5 S: %6";
+ };
String STR_TOI
{
Text [ en-US ] = "Alphabetical Index" ;
diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk
index 9620f28c9748..7f2aa91c0e11 100644
--- a/sw/source/ui/utlui/makefile.mk
+++ b/sw/source/ui/utlui/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.15 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index 68383d7d28c2..435f5583cd30 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navicfg.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -139,3 +136,6 @@ void SwNavigationConfig::Commit()
PutProperties(aNames, aValues);
}
+void SwNavigationConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
+
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index 4776ae5b6bdc..a2d0d2cdf2d3 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navipi.cxx,v $
- * $Revision: 1.46 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,10 +34,10 @@
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
#include <tools/list.hxx>
-#include <svtools/urlbmk.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/urlbmk.hxx>
+#include <svl/stritem.hxx>
#include <svtools/filter.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <sot/formats.hxx>
#include <sot/filelist.hxx>
#include <sfx2/event.hxx>
diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc
index a5dd85f6447b..8254e2dc92a9 100644
--- a/sw/source/ui/utlui/navipi.hrc
+++ b/sw/source/ui/utlui/navipi.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navipi.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src
index 11dc4d0831a0..0c45e3203df0 100644
--- a/sw/source/ui/utlui/navipi.src
+++ b/sw/source/ui/utlui/navipi.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: navipi.src,v $
- * $Revision: 1.60 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index 5a0030d9dd85..58e332ccbc45 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: numfmtlb.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,19 +32,19 @@
#include <hintids.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <unotools/localedatawrapper.hxx>
#include <i18npool/lang.h>
#ifndef _ZFORMAT_HXX //autogen
#define _ZFORLIST_DECLARE_TABLE
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#endif
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svx/svxids.hrc>
#include <svx/numinf.hxx>
#include <vcl/msgbox.hxx>
#include <svx/flagsdef.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <docsh.hxx>
#include <swtypes.hxx>
#include <swmodule.hxx>
diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src
index bc634893df63..de3f74fb857d 100644
--- a/sw/source/ui/utlui/poolfmt.src
+++ b/sw/source/ui/utlui/poolfmt.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: poolfmt.src,v $
- * $Revision: 1.50.224.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index 4c765ddb0357..9ab9d9f47b34 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: prcntfld.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx
index ba292aebbbe8..a5c2e6dfe419 100644
--- a/sw/source/ui/utlui/shdwcrsr.cxx
+++ b/sw/source/ui/utlui/shdwcrsr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shdwcrsr.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 85d8aa2cf7a6..27b861991e0f 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swrenamexnameddlg.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -57,13 +54,12 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <comphelper/processfactory.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <shellio.hxx>
#include <docsh.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
#include <swmodule.hxx>
-#include <unoobj.hxx>
#include <unocrsr.hxx>
#include "swrenamexnameddlg.hxx"
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
index fda2eb360592..c5325b554548 100644
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ b/sw/source/ui/utlui/textcontrolcombo.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: textcontrolcombo.cxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx
index 0ba8740fb5b2..df78a355d8c8 100644
--- a/sw/source/ui/utlui/tmplctrl.cxx
+++ b/sw/source/ui/utlui/tmplctrl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tmplctrl.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,11 +31,11 @@
// include ---------------------------------------------------------------
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
#endif
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/dispatch.hxx>
#ifndef _STATUS_HXX //autogen
#include <vcl/status.hxx>
diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx
index 0b1edf266f7e..baaff628fe5b 100644
--- a/sw/source/ui/utlui/uiitems.cxx
+++ b/sw/source/ui/utlui/uiitems.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uiitems.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +29,7 @@
#include "precompiled_sw.hxx"
-#include <svx/itemtype.hxx>
+#include <editeng/itemtype.hxx>
#include <unosett.hxx>
#include "swtypes.hxx"
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index cb6a3888d45f..facc83c6a0a9 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uitool.cxx,v $
- * $Revision: 1.26 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,21 +34,21 @@
#include <tools/datetime.hxx>
#include <vcl/svapp.hxx>
#include <unotools/collatorwrapper.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/syslocale.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/stritem.hxx>
+#include <unotools/syslocale.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
-#include <svx/pmdlitem.hxx>
+#include <editeng/pmdlitem.hxx>
#ifndef _SVX_TSTPITEM_HXX //autogen
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#endif
-#include <svx/boxitem.hxx>
-#include <svx/sizeitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <svx/pageitem.hxx>
-#include <svx/lrspitem.hxx>
-#include <svtools/style.hxx>
+#include <editeng/lrspitem.hxx>
+#include <svl/style.hxx>
#ifndef _VCL_LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
#endif
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index f2efc1d85a00..e944c3b383cf 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unotools.cxx,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -53,18 +50,19 @@
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <comphelper/processfactory.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <shellio.hxx>
#include <docsh.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
#include <swmodule.hxx>
-#include <unoobj.hxx>
+#include <TextCursorHelper.hxx>
#include <unocrsr.hxx>
#include <doc.hxx>
#include <unomid.h>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
diff --git a/sw/source/ui/utlui/unotools.hrc b/sw/source/ui/utlui/unotools.hrc
index 0a3fcff3fb4d..d68577036830 100644
--- a/sw/source/ui/utlui/unotools.hrc
+++ b/sw/source/ui/utlui/unotools.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unotools.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/unotools.src b/sw/source/ui/utlui/unotools.src
index 09dc865430d3..ac805c9da947 100644
--- a/sw/source/ui/utlui/unotools.src
+++ b/sw/source/ui/utlui/unotools.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unotools.src,v $
- * $Revision: 1.24 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src
index a67fe47aca4b..dfa3e07f9053 100644
--- a/sw/source/ui/utlui/utlui.src
+++ b/sw/source/ui/utlui/utlui.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: utlui.src,v $
- * $Revision: 1.53.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -122,6 +119,10 @@ Resource RID_SHELLRES_AUTOFMTSTRS
{
Text [ en-US ] = "Combine paragraphs";
};
+ String STR_AUTOFMTREDL_NON_BREAK_SPACE +1
+ {
+ Text [ en-US ] = "Add non breaking space";
+ };
};
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index 9a8526c941b5..dbee2286731a 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewlayoutctrl.cxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,7 +35,7 @@
#include <vcl/status.hxx>
#endif
#include <vcl/image.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svx/viewlayoutitem.hxx>
#ifndef _UTLUI_HRC
#include <utlui.hrc>
diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx
index 1a76e5bc5ecc..48cf53b6263a 100644
--- a/sw/source/ui/utlui/zoomctrl.cxx
+++ b/sw/source/ui/utlui/zoomctrl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: zoomctrl.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,7 +36,7 @@
#include <vcl/status.hxx>
#endif
#include <sfx2/app.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svx/zoomitem.hxx>
#include "swtypes.hxx"
diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk
new file mode 100644
index 000000000000..c09f81320040
--- /dev/null
+++ b/sw/source/ui/vba/makefile.mk
@@ -0,0 +1,107 @@
+#*************************************************************************
+#
+# 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=vbaswobj
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+DLLPRE =
+
+.IF "$(ENABLE_VBA)"!="YES"
+dummy:
+ @echo "not building vba..."
+.ENDIF
+
+INCPRE=$(INCCOM)$/$(TARGET)
+CDEFS+=-DVBA_OOBUILD_HACK
+# ------------------------------------------------------------------
+
+SLOFILES= \
+ $(SLO)$/vbaglobals.obj \
+ $(SLO)$/vbaapplication.obj \
+ $(SLO)$/vbadocument.obj \
+ $(SLO)$/vbawindow.obj \
+ $(SLO)$/vbasystem.obj \
+ $(SLO)$/vbarangehelper.obj \
+ $(SLO)$/vbarange.obj \
+ $(SLO)$/vbabookmark.obj \
+ $(SLO)$/vbabookmarks.obj \
+ $(SLO)$/vbavariable.obj \
+ $(SLO)$/vbavariables.obj \
+ $(SLO)$/vbaview.obj \
+ $(SLO)$/wordvbahelper.obj \
+ $(SLO)$/service.obj \
+ $(SLO)$/vbadocumentproperties.obj \
+ $(SLO)$/vbapane.obj \
+ $(SLO)$/vbapanes.obj \
+ $(SLO)$/vbaoptions.obj \
+ $(SLO)$/vbaselection.obj \
+ $(SLO)$/vbatemplate.obj \
+ $(SLO)$/vbaparagraphformat.obj \
+ $(SLO)$/vbaautotextentry.obj \
+ $(SLO)$/vbaparagraph.obj \
+ $(SLO)$/vbafind.obj \
+ $(SLO)$/vbareplacement.obj \
+ $(SLO)$/vbastyle.obj \
+ $(SLO)$/vbastyles.obj \
+ $(SLO)$/vbafont.obj \
+ $(SLO)$/vbapalette.obj \
+ $(SLO)$/vbainformationhelper.obj \
+ $(SLO)$/vbatable.obj \
+ $(SLO)$/vbatables.obj \
+ $(SLO)$/vbafield.obj \
+ $(SLO)$/vbaborders.obj \
+ $(SLO)$/vbadocuments.obj \
+ $(SLO)$/vbaheaderfooter.obj \
+ $(SLO)$/vbaheaderfooterhelper.obj \
+ $(SLO)$/vbaaddin.obj \
+ $(SLO)$/vbaaddins.obj \
+ $(SLO)$/vbadialogs.obj \
+ $(SLO)$/vbadialog.obj \
+ $(SLO)$/vbawrapformat.obj \
+ $(SLO)$/vbapagesetup.obj \
+ $(SLO)$/vbasection.obj \
+ $(SLO)$/vbasections.obj \
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+ALLTAR : \
+ $(MISC)$/$(TARGET).don \
+
+$(SLOFILES) : $(MISC)$/$(TARGET).don
+
+$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
+ +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
+ echo $@
+
diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx
new file mode 100644
index 000000000000..c21e8de37b5e
--- /dev/null
+++ b/sw/source/ui/vba/service.cxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "cppuhelper/implementationentry.hxx"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/registry/XRegistryKey.hpp"
+#include "comphelper/servicedecl.hxx"
+
+// =============================================================================
+// component exports
+// =============================================================================
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+namespace sdecl = comphelper::service_decl;
+
+namespace globals
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
+
+namespace document
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
+
+namespace wrapformat
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
+
+extern "C"
+{
+ void SAL_CALL component_getImplementationEnvironment(
+ const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
+ {
+ OSL_TRACE("In component_getImplementationEnv");
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+ }
+
+ sal_Bool SAL_CALL component_writeInfo(
+ lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
+ {
+ OSL_TRACE("In component_writeInfo");
+
+ // Component registration
+ return component_writeInfoHelper( pServiceManager, pRegistryKey,
+ globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl );
+ }
+
+ void * SAL_CALL component_getFactory(
+ const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
+ registry::XRegistryKey * pRegistryKey )
+ {
+ OSL_TRACE("In component_getFactory for %s", pImplName );
+ void* pRet = component_getFactoryHelper(
+ pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl );
+ OSL_TRACE("Ret is 0x%x", pRet);
+ return pRet;
+ }
+}
diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx
new file mode 100644
index 000000000000..8929ae96a914
--- /dev/null
+++ b/sw/source/ui/vba/vbaaddin.cxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaaddin.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/urlobj.hxx>
+#include <osl/file.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaAddin::SwVbaAddin( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const rtl::OUString& rFileURL, sal_Bool bAutoload ) throw ( uno::RuntimeException ) :
+ SwVbaAddin_BASE( rParent, rContext ), msFileURL( rFileURL ), mbAutoload( bAutoload ), mbInstalled( bAutoload )
+{
+}
+
+SwVbaAddin::~SwVbaAddin()
+{
+}
+
+::rtl::OUString SAL_CALL SwVbaAddin::getName() throw (uno::RuntimeException)
+{
+ rtl::OUString sName;
+ INetURLObject aURL( msFileURL );
+ ::osl::File::getSystemPathFromFileURL( aURL.GetLastName(), sName );
+ return sName;
+}
+
+void SAL_CALL
+SwVbaAddin::setName( const rtl::OUString& ) throw ( css::uno::RuntimeException )
+{
+ throw uno::RuntimeException( rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(" Fail to set name")), uno::Reference< uno::XInterface >() );
+}
+
+::rtl::OUString SAL_CALL SwVbaAddin::getPath() throw (uno::RuntimeException)
+{
+ INetURLObject aURL( msFileURL );
+ aURL.CutLastName();
+ return aURL.GetURLPath();
+}
+
+::sal_Bool SAL_CALL SwVbaAddin::getAutoload() throw (uno::RuntimeException)
+{
+ return mbAutoload;
+}
+
+::sal_Bool SAL_CALL SwVbaAddin::getInstalled() throw (uno::RuntimeException)
+{
+ return mbInstalled;
+}
+
+void SAL_CALL SwVbaAddin::setInstalled( ::sal_Bool _installed ) throw (uno::RuntimeException)
+{
+ if( _installed != mbInstalled )
+ {
+ mbInstalled = _installed;
+ // TODO: should call AutoExec and AutoExit etc.
+ }
+}
+
+rtl::OUString&
+SwVbaAddin::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAddin") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaAddin::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Addin" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx
new file mode 100644
index 000000000000..090f5bcc580f
--- /dev/null
+++ b/sw/source/ui/vba/vbaaddin.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * 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_VBA_ADDIN_HXX
+#define SW_VBA_ADDIN_HXX
+
+#include <ooo/vba/word/XAddin.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XAddin > SwVbaAddin_BASE;
+
+class SwVbaAddin : public SwVbaAddin_BASE
+{
+private:
+ rtl::OUString msFileURL;
+ sal_Bool mbAutoload;
+ sal_Bool mbInstalled;
+
+public:
+ SwVbaAddin( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const rtl::OUString& rFileURL, sal_Bool bAutoload ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaAddin();
+
+ // Attributes
+ virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getPath() throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoload() throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getInstalled() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setInstalled( ::sal_Bool _installed ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_ADDIN_HXX */
diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx
new file mode 100644
index 000000000000..f51e11e359b0
--- /dev/null
+++ b/sw/source/ui/vba/vbaaddins.cxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaaddins.hxx"
+#include "vbaaddin.hxx"
+#include <cppuhelper/implbase3.hxx>
+#include <unotools/pathoptions.hxx>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext )
+{
+ XNamedObjectCollectionHelper< word::XAddin >::XNamedVec maAddins;
+
+ // first get the autoload addins in the directory STARTUP
+ uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager(), uno::UNO_QUERY_THROW );
+ uno::Reference< ucb::XSimpleFileAccess > xSFA( xMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), xContext), uno::UNO_QUERY_THROW );
+ SvtPathOptions aPathOpt;
+ // FIXME: temporary the STARTUP path is located in $OO/basic3.1/program/addin
+ String aAddinPath = aPathOpt.GetAddinPath();
+ OSL_TRACE("lcl_getAddinCollection: %s", rtl::OUStringToOString( aAddinPath, RTL_TEXTENCODING_UTF8 ).getStr() );
+ if( xSFA->isFolder( aAddinPath ) )
+ {
+ uno::Sequence< rtl::OUString > sEntries = xSFA->getFolderContents( aAddinPath, sal_False );
+ sal_Int32 nEntry = sEntries.getLength();
+ for( sal_Int32 index = 0; index < nEntry; ++index )
+ {
+ rtl::OUString sUrl = sEntries[ index ];
+ if( !xSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) )
+ {
+ maAddins.push_back( uno::Reference< word::XAddin >( new SwVbaAddin( xParent, xContext, sUrl, sal_True ) ) );
+ }
+ }
+ }
+
+ // TODO: second get the customize addins in the org.openoffice.Office.Writer/GlobalTemplateList
+
+ uno::Reference< container::XIndexAccess > xAddinsAccess( new XNamedObjectCollectionHelper< word::XAddin >( maAddins ) );
+ return xAddinsAccess;
+}
+
+SwVbaAddins::SwVbaAddins( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext ) throw (uno::RuntimeException): SwVbaAddins_BASE( xParent, xContext, lcl_getAddinCollection( xParent,xContext ) )
+{
+}
+// XEnumerationAccess
+uno::Type
+SwVbaAddins::getElementType() throw (uno::RuntimeException)
+{
+ return word::XAddin::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaAddins::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumerationAccess->createEnumeration();
+}
+
+uno::Any
+SwVbaAddins::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaAddins::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAddins") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaAddins::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Addins") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbaaddins.hxx b/sw/source/ui/vba/vbaaddins.hxx
new file mode 100644
index 000000000000..6d160f78e27b
--- /dev/null
+++ b/sw/source/ui/vba/vbaaddins.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * 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_VBA_ADDINS_HXX
+#define SW_VBA_ADDINS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XAddins.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef CollTestImplHelper< ooo::vba::word::XAddins > SwVbaAddins_BASE;
+
+class SwVbaAddins : public SwVbaAddins_BASE
+{
+public:
+ SwVbaAddins( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext ) throw (css::uno::RuntimeException);
+ virtual ~SwVbaAddins() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaAddins_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_ADDINS_HXX */
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
new file mode 100644
index 000000000000..8056f9ae3deb
--- /dev/null
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include <stdio.h>
+#include "vbaapplication.hxx"
+#include "vbadocument.hxx"
+#include <osl/file.hxx>
+#include <vbahelper/vbahelper.hxx>
+#include "vbawindow.hxx"
+#include "vbasystem.hxx"
+#include "vbaoptions.hxx"
+#include "vbaselection.hxx"
+#include "vbadocuments.hxx"
+#include "vbaaddins.hxx"
+#include "vbadialogs.hxx"
+#include <ooo/vba/word/WdEnableCancelKey.hpp>
+#include <editeng/acorrcfg.hxx>
+#include "wordvbahelper.hxx"
+#include <docsh.hxx>
+
+using namespace ::ooo;
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::rtl::OUString;
+
+// Enable our own join detection for Intersection and Union
+// should be more efficient than using ScRangeList::Join ( because
+// we already are testing the same things )
+
+#define OWN_JOIN 1
+
+// #TODO is this defined somewhere else?
+#if ( defined UNX ) || ( defined OS2 ) //unix
+#define FILE_PATH_SEPERATOR "/"
+#else // windows
+#define FILE_PATH_SEPERATOR "\\"
+#endif
+
+#define EXCELVERSION "11.0"
+
+uno::Any sbxToUnoValue( SbxVariable* pVar );
+
+SwVbaApplication::SwVbaApplication( uno::Reference<uno::XComponentContext >& xContext ): SwVbaApplication_BASE( xContext )
+{
+}
+
+SwVbaApplication::~SwVbaApplication()
+{
+}
+
+SfxObjectShell* SwVbaApplication::GetDocShell( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ return static_cast< SfxObjectShell* >( word::getDocShell( xModel ) );
+}
+
+rtl::OUString SAL_CALL
+SwVbaApplication::getName() throw (uno::RuntimeException)
+{
+ static rtl::OUString appName( RTL_CONSTASCII_USTRINGPARAM("Microsoft Word" ) );
+ return appName;
+}
+
+uno::Reference< word::XDocument > SAL_CALL
+SwVbaApplication::getActiveDocument() throw (uno::RuntimeException)
+{
+ return new SwVbaDocument( this, mxContext, getCurrentDocument() );
+}
+
+uno::Reference< word::XWindow > SAL_CALL
+SwVbaApplication::getActiveWindow() throw (uno::RuntimeException)
+{
+ // #FIXME sofar can't determine Parent
+ return new SwVbaWindow( uno::Reference< XHelperInterface >(), mxContext, getCurrentDocument() );
+}
+
+uno::Reference<word::XSystem > SAL_CALL
+SwVbaApplication::getSystem() throw (uno::RuntimeException)
+{
+ return uno::Reference< word::XSystem >( new SwVbaSystem( mxContext ) );
+}
+
+uno::Reference<word::XOptions > SAL_CALL
+SwVbaApplication::getOptions() throw (uno::RuntimeException)
+{
+ return uno::Reference< word::XOptions >( new SwVbaOptions( mxContext ) );
+}
+
+uno::Any SAL_CALL
+SwVbaApplication::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ return VbaApplicationBase::CommandBars( aIndex );
+}
+
+uno::Reference< word::XSelection > SAL_CALL
+SwVbaApplication::getSelection() throw (uno::RuntimeException)
+{
+ return new SwVbaSelection( this, mxContext, getCurrentDocument() );
+}
+
+uno::Any SAL_CALL
+SwVbaApplication::Documents( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaDocuments( this, mxContext ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaApplication::Addins( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ static uno::Reference< XCollection > xCol( new SwVbaAddins( this, mxContext ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaApplication::Dialogs( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< word::XDialogs > xCol( new SwVbaDialogs( this, mxContext, getCurrentDocument() ));
+ if ( index.hasValue() )
+ return xCol->Item( index );
+ return uno::makeAny( xCol );
+}
+
+sal_Bool SAL_CALL SwVbaApplication::getDisplayAutoCompleteTips() throw (css::uno::RuntimeException)
+{
+ return SvxAutoCorrCfg::Get()->IsAutoTextTip();
+}
+
+void SAL_CALL SwVbaApplication::setDisplayAutoCompleteTips( sal_Bool _displayAutoCompleteTips ) throw (css::uno::RuntimeException)
+{
+ SvxAutoCorrCfg::Get()->SetAutoTextTip( _displayAutoCompleteTips );
+}
+
+sal_Int32 SAL_CALL SwVbaApplication::getEnableCancelKey() throw (css::uno::RuntimeException)
+{
+ // the default value is wdCancelInterrupt in Word
+ return word::WdEnableCancelKey::wdCancelInterrupt;
+}
+
+void SAL_CALL SwVbaApplication::setEnableCancelKey( sal_Int32/* _enableCancelKey */) throw (css::uno::RuntimeException)
+{
+ // seems not supported in Writer
+}
+
+float SAL_CALL SwVbaApplication::CentimetersToPoints( float _Centimeters ) throw (uno::RuntimeException)
+{
+ return VbaApplicationBase::CentimetersToPoints( _Centimeters );
+}
+
+uno::Reference< frame::XModel >
+SwVbaApplication::getCurrentDocument() throw (css::uno::RuntimeException)
+{
+ return getCurrentWordDoc( mxContext );
+}
+
+rtl::OUString&
+SwVbaApplication::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaApplication") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaApplication::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Application" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx
new file mode 100644
index 000000000000..1261590d7c56
--- /dev/null
+++ b/sw/source/ui/vba/vbaapplication.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * 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_VBA_APPLICATION_HXX
+#define SW_VBA_APPLICATION_HXX
+
+#include <ooo/vba/word/XApplication.hpp>
+#include <ooo/vba/word/XDocument.hpp>
+#include <ooo/vba/word/XWindow.hpp>
+#include <ooo/vba/word/XSystem.hpp>
+#include <ooo/vba/word/XOptions.hpp>
+#include <ooo/vba/word/XSelection.hpp>
+#include <ooo/vba/word/XAddins.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbaapplicationbase.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+//typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XApplication > SwVbaApplication_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaApplicationBase, ooo::vba::word::XApplication > SwVbaApplication_BASE;
+
+class SwVbaApplication : public SwVbaApplication_BASE
+{
+public:
+ SwVbaApplication( css::uno::Reference< css::uno::XComponentContext >& m_xContext );
+ virtual ~SwVbaApplication();
+
+ virtual SfxObjectShell* GetDocShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+
+ // XApplication
+ virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::word::XDocument > SAL_CALL getActiveDocument() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getDisplayAutoCompleteTips() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDisplayAutoCompleteTips( sal_Bool _displayAutoCompleteTips ) throw (css::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setEnableCancelKey( sal_Int32 _enableCancelKey ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+protected:
+ virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
+};
+#endif /* SW_VBA_APPLICATION_HXX */
diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx
new file mode 100644
index 000000000000..d4c153913553
--- /dev/null
+++ b/sw/source/ui/vba/vbaautotextentry.cxx
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaautotextentry.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbarange.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaAutoTextEntry::SwVbaAutoTextEntry( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XAutoTextEntry >& xEntry ) throw ( uno::RuntimeException ) :
+ SwVbaAutoTextEntry_BASE( rParent, rContext ), mxEntry( xEntry )
+{
+}
+
+SwVbaAutoTextEntry::~SwVbaAutoTextEntry()
+{
+}
+
+uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::Reference< word::XRange >& _where, const uno::Any& /*_richtext*/ ) throw ( uno::RuntimeException )
+{
+ SwVbaRange* pWhere = dynamic_cast<SwVbaRange*>( _where.get() );
+ if( pWhere )
+ {
+ uno::Reference< text::XTextRange > xTextRange = pWhere->getXTextRange();
+ xTextRange->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) ); // set marker
+ uno::Reference< text::XTextRange > xEndMarker = xTextRange->getEnd();
+ xEndMarker->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) ); // set marker
+ uno::Reference< text::XText > xText = pWhere->getXText();
+ mxEntry->applyTo( xEndMarker->getStart() );
+ uno::Reference< text::XTextCursor > xTC = xText->createTextCursorByRange( xTextRange->getStart() );
+ xTC->goRight( 1, sal_True );
+ xTC->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); // remove marker
+ xEndMarker->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); // remove marker
+ xTC->gotoRange( xEndMarker, sal_True );
+ pWhere->setXTextCursor( xTC );
+ }
+ return uno::Reference< word::XRange >( pWhere );
+}
+
+rtl::OUString&
+SwVbaAutoTextEntry::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAutoTextEntry") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaAutoTextEntry::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.AutoTextEntry" ) );
+ }
+ return aServiceNames;
+}
+
+
+SwVbaAutoTextEntries::SwVbaAutoTextEntries( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ) throw (uno::RuntimeException) : SwVbaAutoTextEntries_BASE( xParent, xContext, xIndexAccess ), mxAutoTextEntryAccess( xIndexAccess )
+{
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException)
+{
+ return word::XAutoTextEntry::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumerationAccess->createEnumeration();
+}
+
+uno::Any
+SwVbaAutoTextEntries::createCollectionObject( const css::uno::Any& aSource )
+{
+ uno::Reference< text::XAutoTextEntry > xEntry( aSource, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XAutoTextEntry >( new SwVbaAutoTextEntry( this, mxContext, xEntry ) ) );
+}
+
+rtl::OUString&
+SwVbaAutoTextEntries::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAutoTextEntries") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaAutoTextEntries::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.AutoTextEntries") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbaautotextentry.hxx b/sw/source/ui/vba/vbaautotextentry.hxx
new file mode 100644
index 000000000000..4ec2d986a877
--- /dev/null
+++ b/sw/source/ui/vba/vbaautotextentry.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * 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_VBA_AUTOTEXTENTRY_HXX
+#define SW_VBA_AUTOTEXTENTRY_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XAutoTextEntries.hpp>
+#include <ooo/vba/word/XAutoTextEntry.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <ooo/vba/word/XRange.hpp>
+#include <com/sun/star/text/XAutoTextEntry.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XAutoTextEntry > SwVbaAutoTextEntry_BASE;
+
+class SwVbaAutoTextEntry : public SwVbaAutoTextEntry_BASE
+{
+private:
+ css::uno::Reference< css::text::XAutoTextEntry > mxEntry;
+
+public:
+ SwVbaAutoTextEntry( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XAutoTextEntry >& xEntry ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaAutoTextEntry();
+
+ // XAutoTextEntry
+ virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL Insert( const css::uno::Reference< ooo::vba::word::XRange >& _where, const css::uno::Any& _richtext ) throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+
+/* class SwVbaAutoTextEntries */
+typedef CollTestImplHelper< ooo::vba::word::XAutoTextEntries > SwVbaAutoTextEntries_BASE;
+
+class SwVbaAutoTextEntries : public SwVbaAutoTextEntries_BASE
+{
+private:
+ css::uno::Reference< css::container::XIndexAccess > mxAutoTextEntryAccess;
+
+public:
+ SwVbaAutoTextEntries( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw (css::uno::RuntimeException);
+ virtual ~SwVbaAutoTextEntries() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaAutoTextEntries_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_AUTOTEXTENTRY_HXX */
diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx
new file mode 100644
index 000000000000..a710682c5194
--- /dev/null
+++ b/sw/source/ui/vba/vbabookmark.cxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbabookmark.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include "vbarange.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaBookmark::SwVbaBookmark( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext,
+ const css::uno::Reference< frame::XModel >& rModel, const rtl::OUString& rName ) throw ( css::uno::RuntimeException ) :
+ SwVbaBookmark_BASE( rParent, rContext ), mxModel( rModel ), maName( rName ), mbValid( sal_True )
+{
+ uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( mxModel, uno::UNO_QUERY_THROW );
+ mxBookmark.set( xBookmarksSupplier->getBookmarks()->getByName( maName ), uno::UNO_QUERY_THROW );
+}
+
+SwVbaBookmark::~SwVbaBookmark()
+{
+}
+
+void SwVbaBookmark::checkVality() throw ( uno::RuntimeException )
+{
+ if( !mbValid )
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("The bookmark is not valid" ) ), uno::Reference< uno::XInterface >() );
+}
+
+void SAL_CALL SwVbaBookmark::Delete() throw ( uno::RuntimeException )
+{
+ checkVality();
+ uno::Reference< text::XTextDocument > xTextDocument( mxModel, uno::UNO_QUERY_THROW );
+ xTextDocument->getText()->removeTextContent( mxBookmark );
+ mbValid = sal_False;
+}
+
+void SAL_CALL SwVbaBookmark::Select() throw ( uno::RuntimeException )
+{
+ checkVality();
+ uno::Reference< text::XTextViewCursorSupplier > xViewCursorSupplier( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xViewCursorSupplier->getViewCursor()->gotoRange( mxBookmark->getAnchor(),sal_False );
+}
+
+rtl::OUString SAL_CALL SwVbaBookmark::getName() throw ( uno::RuntimeException )
+{
+ return maName;
+}
+
+void SAL_CALL SwVbaBookmark::setName( const rtl::OUString& _name ) throw ( uno::RuntimeException )
+{
+ uno::Reference< container::XNamed > xNamed( mxBookmark, uno::UNO_QUERY_THROW );
+ xNamed->setName( _name );
+}
+
+uno::Any SAL_CALL SwVbaBookmark::Range() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextContent > xTextContent( mxBookmark, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextDocument > xTextDocument( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTextRange( xTextContent->getAnchor(), uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XRange>( new SwVbaRange( this, mxContext, xTextDocument, xTextRange->getStart(), xTextRange->getEnd(), xTextRange->getText() ) ) );
+}
+
+rtl::OUString&
+SwVbaBookmark::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBookmark") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaBookmark::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Bookmark" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbabookmark.hxx b/sw/source/ui/vba/vbabookmark.hxx
new file mode 100644
index 000000000000..632046c935d8
--- /dev/null
+++ b/sw/source/ui/vba/vbabookmark.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * 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_VBA_BOOKMARK_HXX
+#define SW_VBA_BOOKMARK_HXX
+
+#include <ooo/vba/word/XBookmark.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XBookmark > SwVbaBookmark_BASE;
+
+class SwVbaBookmark : public SwVbaBookmark_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XTextContent > mxBookmark;
+ rtl::OUString maName;
+ sal_Bool mbValid;
+
+private:
+ void checkVality() throw ( css::uno::RuntimeException );
+
+public:
+ SwVbaBookmark( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext,
+ const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& rName ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaBookmark();
+
+ // Methods
+ virtual rtl::OUString SAL_CALL getName() throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL setName( const rtl::OUString& ) throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL Delete() throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL Select() throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL Range() throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_BOOKMARK_HXX */
diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx
new file mode 100644
index 000000000000..c17c9f50f422
--- /dev/null
+++ b/sw/source/ui/vba/vbabookmarks.cxx
@@ -0,0 +1,237 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbabookmarks.hxx"
+#include "vbabookmark.hxx"
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <ooo/vba/word/WdBookmarkSortBy.hpp>
+#include "vbarange.hxx"
+#include "wordvbahelper.hxx"
+#include <cppuhelper/implbase2.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+class BookmarksEnumeration : public EnumerationHelperImpl
+{
+ uno::Reference< frame::XModel > mxModel;
+ uno::WeakReference< XHelperInterface > mxParent;
+public:
+ BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {}
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ uno::Reference< container::XNamed > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ rtl::OUString aName = xNamed->getName();
+ return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( mxParent, m_xContext, mxModel, aName ) ) );
+ }
+
+};
+
+// Bookmarks use case-insensitive name lookup in MS Word.
+typedef ::cppu::WeakImplHelper2< container::XNameAccess, container::XIndexAccess > BookmarkCollectionHelper_BASE;
+class BookmarkCollectionHelper : public BookmarkCollectionHelper_BASE
+{
+private:
+ uno::Reference< container::XNameAccess > mxNameAccess;
+ uno::Reference< container::XIndexAccess > mxIndexAccess;
+ uno::Any cachePos;
+public:
+ BookmarkCollectionHelper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) throw (uno::RuntimeException) : mxIndexAccess( xIndexAccess )
+ {
+ mxNameAccess.set( mxIndexAccess, uno::UNO_QUERY_THROW );
+ }
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return mxIndexAccess->getElementType(); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return mxIndexAccess->hasElements(); }
+ // XNameAcess
+ virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasByName(aName) )
+ throw container::NoSuchElementException();
+ return cachePos;
+ }
+ virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
+ {
+ return mxNameAccess->getElementNames();
+ }
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ {
+ if( mxNameAccess->hasByName( aName ) )
+ {
+ cachePos = mxNameAccess->getByName( aName );
+ return sal_True;
+ }
+ else
+ {
+ for( sal_Int32 nIndex = 0; nIndex < mxIndexAccess->getCount(); nIndex++ )
+ {
+ uno::Reference< container::XNamed > xNamed( mxIndexAccess->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
+ rtl::OUString aBookmarkName = xNamed->getName();
+ if( aName.equalsIgnoreAsciiCase( aBookmarkName ) )
+ {
+ cachePos <<= xNamed;
+ return sal_True;
+ }
+ }
+ }
+ return sal_False;
+ }
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return mxIndexAccess->getCount();
+ }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ return mxIndexAccess->getByIndex( Index );
+ }
+};
+
+SwVbaBookmarks::SwVbaBookmarks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xBookmarks, const uno::Reference< frame::XModel >& xModel ): SwVbaBookmarks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new BookmarkCollectionHelper( xBookmarks ) ) ), mxModel( xModel )
+{
+ mxBookmarksSupplier.set( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextDocument > xDocument( mxModel, uno::UNO_QUERY_THROW );
+ // use view cursor to insert bookmark, or it will fail if insert bookmark in table
+ // mxText = xDocument->getText();
+ mxText = word::getXTextViewCursor( mxModel )->getText();
+}
+// XEnumerationAccess
+uno::Type
+SwVbaBookmarks::getElementType() throw (uno::RuntimeException)
+{
+ return word::XBookmark::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaBookmarks::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return new BookmarksEnumeration( getParent(), mxContext,xEnumAccess->createEnumeration(), mxModel );
+}
+
+uno::Any
+SwVbaBookmarks::createCollectionObject( const css::uno::Any& aSource )
+{
+ uno::Reference< container::XNamed > xNamed( aSource, uno::UNO_QUERY_THROW );
+ rtl::OUString aName = xNamed->getName();
+ return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( getParent(), mxContext, mxModel, aName ) ) );
+}
+
+void SwVbaBookmarks::removeBookmarkByName( const rtl::OUString& rName ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextContent > xBookmark( m_xNameAccess->getByName( rName ), uno::UNO_QUERY_THROW );
+ mxText->removeTextContent( xBookmark );
+}
+
+void SwVbaBookmarks::addBookmarkByName( const rtl::OUString& rName, const uno::Reference< text::XTextRange >& rTextRange ) throw (uno::RuntimeException)
+{
+ uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark")) ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNamed > xNamed( xBookmark, uno::UNO_QUERY_THROW );
+ xNamed->setName( rName );
+ mxText->insertTextContent( rTextRange, xBookmark, sal_False );
+}
+
+uno::Any SAL_CALL
+SwVbaBookmarks::Add( const rtl::OUString& rName, const uno::Any& rRange ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextRange > xTextRange;
+ uno::Reference< word::XRange > xRange;
+ if( rRange >>= xRange )
+ {
+ SwVbaRange* pRange = dynamic_cast< SwVbaRange* >( xRange.get() );
+ if( pRange )
+ xTextRange = pRange->getXTextRange();
+ }
+ else
+ {
+ // FIXME: insert the bookmark into current view cursor
+ xTextRange.set( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW );
+ }
+
+ // remove the exist bookmark
+ // rtl::OUString aName = rName.toAsciiLowerCase();
+ rtl::OUString aName = rName;
+ if( m_xNameAccess->hasByName( aName ) )
+ removeBookmarkByName( aName );
+
+ addBookmarkByName( aName, xTextRange );
+
+ return uno::makeAny( uno::Reference< word::XBookmark >( new SwVbaBookmark( getParent(), mxContext, mxModel, aName ) ) );
+}
+
+sal_Int32 SAL_CALL
+SwVbaBookmarks::getDefaultSorting() throw (css::uno::RuntimeException)
+{
+ return word::WdBookmarkSortBy::wdSortByName;
+}
+
+void SAL_CALL
+SwVbaBookmarks::setDefaultSorting( sal_Int32/* _type*/ ) throw (css::uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+sal_Bool SAL_CALL
+SwVbaBookmarks::getShowHidden() throw (css::uno::RuntimeException)
+{
+ return sal_True;
+}
+
+void SAL_CALL
+SwVbaBookmarks::setShowHidden( sal_Bool /*_hidden*/ ) throw (css::uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+sal_Bool SAL_CALL
+SwVbaBookmarks::Exists( const rtl::OUString& rName ) throw (css::uno::RuntimeException)
+{
+ sal_Bool bExist = m_xNameAccess->hasByName( rName );
+ return bExist;
+}
+
+rtl::OUString&
+SwVbaBookmarks::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBookmarks") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaBookmarks::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Bookmarks") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbabookmarks.hxx b/sw/source/ui/vba/vbabookmarks.hxx
new file mode 100644
index 000000000000..d9047b33d49c
--- /dev/null
+++ b/sw/source/ui/vba/vbabookmarks.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * 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_VBA_BOOKMARKS_HXX
+#define SW_VBA_BOOKMARKS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XBookmarks.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XText.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XBookmarks > SwVbaBookmarks_BASE;
+
+class SwVbaBookmarks : public SwVbaBookmarks_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XBookmarksSupplier > mxBookmarksSupplier;
+ css::uno::Reference< css::text::XText > mxText;
+
+private:
+ void removeBookmarkByName( const rtl::OUString& rName ) throw (css::uno::RuntimeException);
+ void addBookmarkByName( const rtl::OUString& rName, const css::uno::Reference< css::text::XTextRange >& rTextRange ) throw (css::uno::RuntimeException);
+
+public:
+ SwVbaBookmarks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xBookmarks, const css::uno::Reference< css::frame::XModel >& xModel );
+ virtual ~SwVbaBookmarks() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaBookmarks_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+
+ // XBookmarks
+ virtual sal_Int32 SAL_CALL getDefaultSorting() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDefaultSorting( sal_Int32 _type ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getShowHidden() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setShowHidden( sal_Bool _hidden ) throw (css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL Add( const rtl::OUString& rName, const css::uno::Any& rRange ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL Exists( const rtl::OUString& rName ) throw (css::uno::RuntimeException);
+};
+
+#endif /* SW_VBA_BOOKMARKS_HXX */
diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx
new file mode 100644
index 000000000000..184f406c49ac
--- /dev/null
+++ b/sw/source/ui/vba/vbaborders.cxx
@@ -0,0 +1,378 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaborders.hxx"
+#include <ooo/vba/word/XBorder.hpp>
+#include <ooo/vba/word/WdBorderType.hpp>
+#include <ooo/vba/word/WdLineStyle.hpp>
+#include <cppuhelper/implbase3.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/table/TableBorder.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/table/ShadowLocation.hpp>
+#include "vbapalette.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+
+typedef ::cppu::WeakImplHelper1<container::XIndexAccess > RangeBorders_Base;
+typedef InheritedHelperInterfaceImpl1<word::XBorder > SwVbaBorder_Base;
+
+// #TODO sort these indexes to match the order in which Word iterates over the
+// borders, the enumeration will match the order in this list
+static const sal_Int16 supportedIndexTable[] = { word::WdBorderType::wdBorderBottom, word::WdBorderType::wdBorderDiagonalDown, word::WdBorderType::wdBorderDiagonalUp, word::WdBorderType::wdBorderHorizontal, word::WdBorderType::wdBorderLeft, word::WdBorderType::wdBorderRight, word::WdBorderType::wdBorderTop, word::WdBorderType::wdBorderVertical };
+
+const static rtl::OUString sTableBorder( RTL_CONSTASCII_USTRINGPARAM("TableBorder") );
+
+// Equiv widths in in 1/100 mm
+const static sal_Int32 OOLineThin = 35;
+const static sal_Int32 OOLineMedium = 88;
+const static sal_Int32 OOLineThick = 141;
+const static sal_Int32 OOLineHairline = 2;
+
+class SwVbaBorder : public SwVbaBorder_Base
+{
+private:
+ uno::Reference< beans::XPropertySet > m_xProps;
+ sal_Int32 m_LineType;
+ VbaPalette m_Palette;
+ bool setBorderLine( table::BorderLine& rBorderLine )
+ {
+ table::TableBorder aTableBorder;
+ m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder;
+
+ switch ( m_LineType )
+ {
+ case word::WdBorderType::wdBorderLeft:
+ aTableBorder.IsLeftLineValid = sal_True;
+ aTableBorder.LeftLine= rBorderLine;
+ break;
+ case word::WdBorderType::wdBorderTop:
+ aTableBorder.IsTopLineValid = sal_True;
+ aTableBorder.TopLine = rBorderLine;
+ break;
+
+ case word::WdBorderType::wdBorderBottom:
+ aTableBorder.IsBottomLineValid = sal_True;
+ aTableBorder.BottomLine = rBorderLine;
+ break;
+ case word::WdBorderType::wdBorderRight:
+ aTableBorder.IsRightLineValid = sal_True;
+ aTableBorder.RightLine = rBorderLine;
+ break;
+ case word::WdBorderType::wdBorderVertical:
+ aTableBorder.IsVerticalLineValid = sal_True;
+ aTableBorder.VerticalLine = rBorderLine;
+ break;
+ case word::WdBorderType::wdBorderHorizontal:
+ aTableBorder.IsHorizontalLineValid = sal_True;
+ aTableBorder.HorizontalLine = rBorderLine;
+ break;
+ case word::WdBorderType::wdBorderDiagonalDown:
+ case word::WdBorderType::wdBorderDiagonalUp:
+ // #TODO have to ignore at the momement, would be
+ // nice to investigate what we can do here
+ break;
+ default:
+ return false;
+ }
+ m_xProps->setPropertyValue( sTableBorder, uno::makeAny(aTableBorder) );
+ return true;
+ }
+
+ bool getBorderLine( table::BorderLine& rBorderLine )
+ {
+ table::TableBorder aTableBorder;
+ m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder;
+ switch ( m_LineType )
+ {
+ case word::WdBorderType::wdBorderLeft:
+ if ( aTableBorder.IsLeftLineValid )
+ rBorderLine = aTableBorder.LeftLine;
+ break;
+ case word::WdBorderType::wdBorderTop:
+ if ( aTableBorder.IsTopLineValid )
+ rBorderLine = aTableBorder.TopLine;
+ break;
+ case word::WdBorderType::wdBorderBottom:
+ if ( aTableBorder.IsBottomLineValid )
+ rBorderLine = aTableBorder.BottomLine;
+ break;
+ case word::WdBorderType::wdBorderRight:
+ if ( aTableBorder.IsRightLineValid )
+ rBorderLine = aTableBorder.RightLine;
+ break;
+ case word::WdBorderType::wdBorderVertical:
+ if ( aTableBorder.IsVerticalLineValid )
+ rBorderLine = aTableBorder.VerticalLine;
+ break;
+ case word::WdBorderType::wdBorderHorizontal:
+ if ( aTableBorder.IsHorizontalLineValid )
+ rBorderLine = aTableBorder.HorizontalLine;
+ break;
+
+ case word::WdBorderType::wdBorderDiagonalDown:
+ case word::WdBorderType::wdBorderDiagonalUp:
+ // #TODO have to ignore at the momement, would be
+ // nice to investigate what we can do here
+ break;
+ default:
+ return false;
+ }
+ return true;
+ }
+ SwVbaBorder(); // no impl
+protected:
+ virtual rtl::OUString& getServiceImplName()
+ {
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBorder") );
+ return sImplName;
+ }
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames()
+ {
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Border" ) );
+ }
+ return aServiceNames;
+ }
+public:
+ SwVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, VbaPalette& rPalette) : SwVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {}
+
+ uno::Any SAL_CALL getLineStyle() throw (uno::RuntimeException)
+ {
+ sal_Int32 nLineStyle = word::WdLineStyle::wdLineStyleNone;
+ table::BorderLine aBorderLine;
+ if ( getBorderLine( aBorderLine ) )
+ {
+ if( aBorderLine.InnerLineWidth !=0 && aBorderLine.OuterLineWidth !=0 )
+ {
+ nLineStyle = word::WdLineStyle::wdLineStyleDouble;
+ }
+ else if( aBorderLine.InnerLineWidth !=0 || aBorderLine.OuterLineWidth !=0 )
+ {
+ nLineStyle = word::WdLineStyle::wdLineStyleSingle;
+ }
+ else
+ {
+ nLineStyle = word::WdLineStyle::wdLineStyleNone;
+ }
+ }
+ return uno::makeAny( nLineStyle );
+ }
+ void SAL_CALL setLineStyle( const uno::Any& _linestyle ) throw (uno::RuntimeException)
+ {
+ // Urk no choice but to silently ignore we don't support this attribute
+ // #TODO would be nice to support the word line styles
+ sal_Int32 nLineStyle = 0;
+ _linestyle >>= nLineStyle;
+ table::BorderLine aBorderLine;
+ if ( getBorderLine( aBorderLine ) )
+ {
+ switch ( nLineStyle )
+ {
+ case word::WdLineStyle::wdLineStyleNone:
+ {
+ aBorderLine.InnerLineWidth = 0;
+ aBorderLine.OuterLineWidth = 0;
+ break;
+ }
+ case word::WdLineStyle::wdLineStyleDashDot:
+ case word::WdLineStyle::wdLineStyleDashDotDot:
+ case word::WdLineStyle::wdLineStyleDashDotStroked:
+ case word::WdLineStyle::wdLineStyleDashLargeGap:
+ case word::WdLineStyle::wdLineStyleDashSmallGap:
+ case word::WdLineStyle::wdLineStyleDot:
+ case word::WdLineStyle::wdLineStyleDouble:
+ case word::WdLineStyle::wdLineStyleDoubleWavy:
+ case word::WdLineStyle::wdLineStyleEmboss3D:
+ case word::WdLineStyle::wdLineStyleEngrave3D:
+ case word::WdLineStyle::wdLineStyleInset:
+ case word::WdLineStyle::wdLineStyleOutset:
+ case word::WdLineStyle::wdLineStyleSingle:
+ case word::WdLineStyle::wdLineStyleSingleWavy:
+ case word::WdLineStyle::wdLineStyleThickThinLargeGap:
+ case word::WdLineStyle::wdLineStyleThickThinMedGap:
+ case word::WdLineStyle::wdLineStyleThickThinSmallGap:
+ case word::WdLineStyle::wdLineStyleThinThickLargeGap:
+ case word::WdLineStyle::wdLineStyleThinThickMedGap:
+ case word::WdLineStyle::wdLineStyleThinThickSmallGap:
+ case word::WdLineStyle::wdLineStyleThinThickThinLargeGap:
+ case word::WdLineStyle::wdLineStyleThinThickThinMedGap:
+ case word::WdLineStyle::wdLineStyleThinThickThinSmallGap:
+ case word::WdLineStyle::wdLineStyleTriple:
+ {
+ aBorderLine.InnerLineWidth = 0;
+ aBorderLine.OuterLineWidth = OOLineHairline;
+ break;
+ }
+ default:
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bad param" ) ), uno::Reference< uno::XInterface >() );
+ }
+ setBorderLine( aBorderLine );
+ }
+ else
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Method failed" ) ), uno::Reference< uno::XInterface >() );
+ }
+};
+
+class RangeBorders : public RangeBorders_Base
+{
+private:
+ uno::Reference< table::XCellRange > m_xRange;
+ uno::Reference< uno::XComponentContext > m_xContext;
+ VbaPalette m_Palette;
+ sal_Int32 getTableIndex( sal_Int32 nConst )
+ {
+ // hokay return position of the index in the table
+ sal_Int32 nIndexes = getCount();
+ sal_Int32 realIndex = 0;
+ const sal_Int16* pTableEntry = supportedIndexTable;
+ for ( ; realIndex < nIndexes; ++realIndex, ++pTableEntry )
+ {
+ if ( *pTableEntry == nConst )
+ return realIndex;
+ }
+ return getCount(); // error condition
+ }
+public:
+ RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette& rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette )
+ {
+ }
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return sizeof( supportedIndexTable ) / sizeof( supportedIndexTable[0] );
+ }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+
+ sal_Int32 nIndex = getTableIndex( Index );
+ if ( nIndex >= 0 && nIndex < getCount() )
+ {
+ uno::Reference< beans::XPropertySet > xProps( m_xRange, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XBorder >( new SwVbaBorder( xProps, m_xContext, supportedIndexTable[ nIndex ], m_Palette )) );
+ }
+ throw lang::IndexOutOfBoundsException();
+ }
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return word::XBorder::static_type(0);
+ }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+};
+
+uno::Reference< container::XIndexAccess >
+rangeToBorderIndexAccess( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette& rPalette )
+{
+ return new RangeBorders( xRange, xContext, rPalette );
+}
+
+class RangeBorderEnumWrapper : public EnumerationHelper_BASE
+{
+ uno::Reference<container::XIndexAccess > m_xIndexAccess;
+ sal_Int32 nIndex;
+public:
+ RangeBorderEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < m_xIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( nIndex < m_xIndexAccess->getCount() )
+ return m_xIndexAccess->getByIndex( nIndex++ );
+ throw container::NoSuchElementException();
+ }
+};
+
+// for Table borders
+SwVbaBorders::SwVbaBorders( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, VbaPalette& rPalette ): SwVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) )
+{
+ m_xProps.set( xRange, uno::UNO_QUERY_THROW );
+}
+
+uno::Reference< container::XEnumeration >
+SwVbaBorders::createEnumeration() throw (uno::RuntimeException)
+{
+ return new RangeBorderEnumWrapper( m_xIndexAccess );
+}
+
+uno::Any
+SwVbaBorders::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource; // its already a Border object
+}
+
+uno::Type
+SwVbaBorders::getElementType() throw (uno::RuntimeException)
+{
+ return word::XBorders::static_type(0);
+}
+
+uno::Any
+SwVbaBorders::getItemByIntIndex( const sal_Int32 nIndex ) throw (uno::RuntimeException)
+{
+ return createCollectionObject( m_xIndexAccess->getByIndex( nIndex ) );
+}
+
+sal_Bool SAL_CALL SwVbaBorders::getShadow() throw (uno::RuntimeException)
+{
+ table::ShadowFormat aShadowFormat;
+ m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShadowFormat") ) ) >>= aShadowFormat;
+ return ( aShadowFormat.Location != table::ShadowLocation_NONE );
+}
+
+void SAL_CALL SwVbaBorders::setShadow( sal_Bool /*_shadow*/ ) throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+rtl::OUString&
+SwVbaBorders::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBorders") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaBorders::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Borders" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbaborders.hxx b/sw/source/ui/vba/vbaborders.hxx
new file mode 100644
index 000000000000..e8a5ff487b98
--- /dev/null
+++ b/sw/source/ui/vba/vbaborders.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * 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_VBA_BORDERS_HXX
+#define SW_VBA_BORDERS_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <ooo/vba/word/XBorders.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+typedef CollTestImplHelper< ov::word::XBorders > SwVbaBorders_BASE;
+class VbaPalette;
+class SwVbaBorders : public SwVbaBorders_BASE
+{
+ // XEnumerationAccess
+ virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::beans::XPropertySet > m_xProps;
+public:
+ SwVbaBorders( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::table::XCellRange >& xRange, VbaPalette& rPalette );
+ virtual ~SwVbaBorders() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaCollectionBaseImpl
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ virtual sal_Bool SAL_CALL getShadow() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setShadow( sal_Bool _shadow ) throw (css::uno::RuntimeException);
+
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif //SW_VBA_BORDERS_HXX
+
diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx
new file mode 100644
index 000000000000..a62fd289ca5d
--- /dev/null
+++ b/sw/source/ui/vba/vbadialog.cxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbadialog.hxx"
+#include <ooo/vba/word/WdWordDialog.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+struct WordDialogTable
+{
+ sal_Int32 wdDialog;
+ const sal_Char* ooDialog;
+};
+
+static const WordDialogTable aWordDialogTable[] =
+{
+ { word::WdWordDialog::wdDialogFileNew, ".uno:NewDoc" },
+ { word::WdWordDialog::wdDialogFileOpen, ".uno:Open" },
+ { word::WdWordDialog::wdDialogFilePrint, ".uno:Print" },
+ { word::WdWordDialog::wdDialogFileSaveAs, ".uno:SaveAs" },
+ { 0, 0 }
+};
+
+rtl::OUString
+SwVbaDialog::mapIndexToName( sal_Int32 nIndex )
+{
+ for( const WordDialogTable* pTable = aWordDialogTable; pTable != NULL; pTable++ )
+ {
+ if( nIndex == pTable->wdDialog )
+ {
+ return rtl::OUString::createFromAscii( pTable->ooDialog );
+ }
+ }
+ return rtl::OUString();
+}
+
+rtl::OUString&
+SwVbaDialog::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDialog") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaDialog::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Dialog" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbadialog.hxx b/sw/source/ui/vba/vbadialog.hxx
new file mode 100644
index 000000000000..591c77bdb41c
--- /dev/null
+++ b/sw/source/ui/vba/vbadialog.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * 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_VBA_DIALOG_HXX
+#define SW_VBA_DIALOG_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <ooo/vba/word/XDialog.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbadialogbase.hxx>
+
+typedef cppu::ImplInheritanceHelper1< VbaDialogBase, ov::word::XDialog > SwVbaDialog_BASE;
+
+class SwVbaDialog : public SwVbaDialog_BASE
+{
+public:
+ SwVbaDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nIndex ):SwVbaDialog_BASE( xParent, xContext, xModel, nIndex ) {}
+ virtual ~SwVbaDialog() {}
+
+ // Methods
+ virtual rtl::OUString mapIndexToName( sal_Int32 nIndex );
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_DIALOG_HXX */
diff --git a/sw/source/ui/vba/vbadialogs.cxx b/sw/source/ui/vba/vbadialogs.cxx
new file mode 100644
index 000000000000..f81e66dd5488
--- /dev/null
+++ b/sw/source/ui/vba/vbadialogs.cxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include <ooo/vba/word/XDialog.hpp>
+#include "vbadialogs.hxx"
+#include "vbadialog.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+uno::Any
+SwVbaDialogs::Item( const uno::Any &aItem ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ aItem >>= nIndex;
+ uno::Reference< word::XDialog > aDialog( new SwVbaDialog( uno::Reference< XHelperInterface >( Application(),uno::UNO_QUERY_THROW ), mxContext, m_xModel, nIndex ) );
+ return uno::Any( aDialog );
+}
+
+rtl::OUString&
+SwVbaDialogs::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDialogs") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaDialogs::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Dialogs" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbadialogs.hxx b/sw/source/ui/vba/vbadialogs.hxx
new file mode 100644
index 000000000000..075849c18a98
--- /dev/null
+++ b/sw/source/ui/vba/vbadialogs.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * 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_VBA_DIALOGS_HXX
+#define SW_VBA_DIALOGS_HXX
+
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <ooo/vba/word/XDialogs.hpp>
+#include <ooo/vba/XCollection.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbadialogsbase.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+typedef cppu::ImplInheritanceHelper1< VbaDialogsBase, ov::word::XDialogs > SwVbaDialogs_BASE;
+
+class SwVbaDialogs : public SwVbaDialogs_BASE
+{
+public:
+ SwVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ): SwVbaDialogs_BASE( xParent, xContext, xModel ) {}
+ virtual ~SwVbaDialogs() {}
+
+ // XCollection
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_DIALOGS_HXX */
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
new file mode 100644
index 000000000000..cef47c7e32dc
--- /dev/null
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -0,0 +1,381 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbadocument.hxx"
+#include "vbarange.hxx"
+#include "vbarangehelper.hxx"
+#include "vbadocumentproperties.hxx"
+#include "vbabookmarks.hxx"
+#include "vbavariables.hxx"
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <ooo/vba/XControlProvider.hpp>
+
+#include <vbahelper/helperdecl.hxx>
+#include <wordvbahelper.hxx>
+#include <docsh.hxx>
+#include "vbatemplate.hxx"
+#include "vbaparagraph.hxx"
+#include "vbastyles.hxx"
+#include "vbatables.hxx"
+#include "vbafield.hxx"
+#include "vbapagesetup.hxx"
+#include "vbasections.hxx"
+#include <vbahelper/vbashapes.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaDocument::SwVbaDocument( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< frame::XModel > xModel ): SwVbaDocument_BASE( xParent, xContext, xModel )
+{
+ Initialize();
+}
+SwVbaDocument::SwVbaDocument( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) : SwVbaDocument_BASE( aArgs, xContext )
+{
+ Initialize();
+}
+
+SwVbaDocument::~SwVbaDocument()
+{
+}
+
+void SwVbaDocument::Initialize()
+{
+ mxTextDocument.set( getModel(), uno::UNO_QUERY_THROW );
+}
+
+uno::Reference< word::XRange > SAL_CALL
+SwVbaDocument::getContent() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xStart = mxTextDocument->getText()->getStart();
+ uno::Reference< text::XTextRange > xEnd;
+ return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, xStart, xEnd, sal_True ) );
+}
+
+uno::Reference< word::XRange > SAL_CALL
+SwVbaDocument::Range( const uno::Any& rStart, const uno::Any& rEnd ) throw ( uno::RuntimeException )
+{
+ if( !rStart.hasValue() && !rEnd.hasValue() )
+ return getContent();
+
+ sal_Int32 nStart = 0;
+ sal_Int32 nEnd = 0;
+ rStart >>= nStart;
+ rEnd >>= nEnd;
+ nStart--;
+ nEnd--;
+
+ uno::Reference< text::XTextRange > xStart;
+ uno::Reference< text::XTextRange > xEnd;
+ if( nStart != -1 || nEnd != -1 )
+ {
+ if( nStart == -1 )
+ xStart = mxTextDocument->getText()->getStart();
+ else
+ xStart = SwVbaRangeHelper::getRangeByPosition( mxTextDocument->getText(), nStart );
+
+ if( nEnd == -1 )
+ xEnd = mxTextDocument->getText()->getEnd();
+ else
+ xEnd = SwVbaRangeHelper::getRangeByPosition( mxTextDocument->getText(), nEnd );
+ }
+
+ if( !xStart.is() && !xEnd.is() )
+ {
+ try
+ {
+ // FIXME
+ xStart = mxTextDocument->getText()->getStart();
+ xEnd = mxTextDocument->getText()->getEnd();
+ }
+ catch( uno::Exception )
+ {
+ DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
+ }
+ }
+ return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, xStart, xEnd ) );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::BuiltInDocumentProperties( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaBuiltinDocumentProperties( mxParent, mxContext, getModel() ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::CustomDocumentProperties( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaCustomDocumentProperties( mxParent, mxContext, getModel() ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Bookmarks( const uno::Any& rIndex ) throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( getModel(),uno::UNO_QUERY_THROW );
+ uno::Reference<container::XIndexAccess > xBookmarks( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xBookmarksVba( new SwVbaBookmarks( this, mxContext, xBookmarks, getModel() ) );
+ if ( rIndex.getValueTypeClass() == uno::TypeClass_VOID )
+ return uno::makeAny( xBookmarksVba );
+
+ return uno::Any( xBookmarksVba->Item( rIndex, uno::Any() ) );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Variables( const uno::Any& rIndex ) throw ( uno::RuntimeException )
+{
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocumentPropertiesSupplier( getModel(),uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
+ uno::Reference< beans::XPropertyAccess > xUserDefined( xDocumentProperties->getUserDefinedProperties(), uno::UNO_QUERY_THROW );
+
+ uno::Reference< XCollection > xVariables( new SwVbaVariables( this, mxContext, xUserDefined ) );
+ if ( rIndex.getValueTypeClass() == uno::TypeClass_VOID )
+ return uno::makeAny( xVariables );
+
+ return uno::Any( xVariables->Item( rIndex, uno::Any() ) );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Paragraphs( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaParagraphs( mxParent, mxContext, mxTextDocument ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Styles( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaStyles( mxParent, mxContext, getModel() ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Fields( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, getModel() ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Shapes( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getModel(), uno::UNO_QUERY_THROW );
+ //uno::Reference< drawing::XShapes > xShapes( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new ScVbaShapes( this, mxContext, xIndexAccess, xModel ) );
+
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Sections( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaSections( mxParent, mxContext, getModel() ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::PageSetup( ) throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, xPageProps ) ) );
+}
+
+rtl::OUString&
+SwVbaDocument::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDocument") );
+ return sImplName;
+}
+uno::Any SAL_CALL
+SwVbaDocument::getAttachedTemplate() throw (uno::RuntimeException)
+{
+ uno::Reference< word::XTemplate > xTemplate;
+ uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( getModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
+ rtl::OUString sTemplateName = xDocProps->getTemplateName();
+
+ xTemplate = new SwVbaTemplate( this, mxContext, getModel(), sTemplateName );
+ return uno::makeAny( xTemplate );
+}
+
+void SAL_CALL
+SwVbaDocument::setAttachedTemplate( const css::uno::Any& /*_attachedtemplate*/ ) throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException();
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Tables( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xColl( new SwVbaTables( mxParent, mxContext, xModel ) );
+
+ if ( aIndex.hasValue() )
+ return xColl->Item( aIndex, uno::Any() );
+ return uno::makeAny( xColl );
+}
+
+void SAL_CALL SwVbaDocument::Activate() throw (uno::RuntimeException)
+{
+ VbaDocumentBase::Activate();
+}
+
+uno::Any
+SwVbaDocument::getControlShape( const ::rtl::OUString& sName )
+{
+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+
+ sal_Int32 nCount = xIndexAccess->getCount();
+ for( int index = 0; index < nCount; index++ )
+ {
+ uno::Any aUnoObj = xIndexAccess->getByIndex( index );
+ // It seems there are some drawing objects that can not query into Control shapes?
+ uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY );
+ if( xControlShape.is() )
+ {
+ uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
+ if( sName.equals( xNamed->getName() ))
+ {
+ return aUnoObj;
+ }
+ }
+ }
+ return uno::Any();
+}
+
+uno::Reference< beans::XIntrospectionAccess > SAL_CALL
+SwVbaDocument::getIntrospection( ) throw (uno::RuntimeException)
+{
+ return uno::Reference< beans::XIntrospectionAccess >();
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::invoke( const ::rtl::OUString& aFunctionName, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
+{
+ OSL_TRACE("** SwVbaDocument::invoke( %s ), will barf",
+ rtl::OUStringToOString( aFunctionName, RTL_TEXTENCODING_UTF8 ).getStr() );
+
+ throw uno::RuntimeException(); // unsupported operation
+}
+
+void SAL_CALL
+SwVbaDocument::setValue( const ::rtl::OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
+{
+ throw uno::RuntimeException(); // unsupported operation
+}
+uno::Any SAL_CALL
+SwVbaDocument::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
+{
+ uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW );
+
+ uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
+ uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.ControlProvider" ) ), mxContext ), uno::UNO_QUERY_THROW );
+ uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) );
+ return uno::makeAny( xControl );
+}
+
+::sal_Bool SAL_CALL
+SwVbaDocument::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+::sal_Bool SAL_CALL
+SwVbaDocument::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+{
+ uno::Reference< container::XNameAccess > xFormControls( getFormControls() );
+ if ( xFormControls.is() )
+ return xFormControls->hasByName( aName );
+ return sal_False;
+}
+
+uno::Reference< container::XNameAccess >
+SwVbaDocument::getFormControls()
+{
+ uno::Reference< container::XNameAccess > xFormControls;
+ try
+ {
+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< form::XFormsSupplier > xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
+ // get the www-standard container ( maybe we should access the
+ // 'www-standard' by name rather than index, this seems an
+ // implementation detail
+ xFormControls.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return xFormControls;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaDocument::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Document" ) );
+ }
+ return aServiceNames;
+}
+
+namespace document
+{
+namespace sdecl = comphelper::service_decl;
+sdecl::vba_service_class_<SwVbaDocument, sdecl::with_args<true> > serviceImpl;
+extern sdecl::ServiceDecl const serviceDecl(
+ serviceImpl,
+ "SwVbaDocument",
+ "ooo.vba.word.Document" );
+}
+
diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx
new file mode 100644
index 000000000000..ab87798a8ded
--- /dev/null
+++ b/sw/source/ui/vba/vbadocument.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * 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_VBA_DOCUMENT_HXX
+#define SW_VBA_DOCUMENT_HXX
+
+#include <ooo/vba/word/XDocument.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbadocumentbase.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+typedef cppu::ImplInheritanceHelper1< VbaDocumentBase, ooo::vba::word::XDocument > SwVbaDocument_BASE;
+
+class SwVbaDocument : public SwVbaDocument_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+
+ void Initialize();
+ css::uno::Any getControlShape( const rtl::OUString& sName );
+ css::uno::Reference< css::container::XNameAccess > getFormControls();
+
+public:
+ SwVbaDocument( const css::uno::Reference< ooo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& m_xContext, css::uno::Reference< css::frame::XModel > xModel );
+ SwVbaDocument( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
+ virtual ~SwVbaDocument();
+
+ // XDocument
+ virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL getContent() throw ( css::uno::RuntimeException );
+ virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL Range( const css::uno::Any& rStart, const css::uno::Any& rEnd ) throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL BuiltInDocumentProperties( const css::uno::Any& index ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL CustomDocumentProperties( const css::uno::Any& index ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Bookmarks( const css::uno::Any& rIndex ) throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL Variables( const css::uno::Any& rIndex ) throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL getAttachedTemplate() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAttachedTemplate( const css::uno::Any& _attachedtemplate ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Paragraphs( const css::uno::Any& rIndex ) throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL Styles( const css::uno::Any& rIndex ) throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL Tables( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Fields( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Shapes( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Sections( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL PageSetup() throw (css::uno::RuntimeException);
+ // XInvocation
+ virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_DOCUMENT_HXX */
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
new file mode 100644
index 000000000000..50ab62dd904f
--- /dev/null
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -0,0 +1,764 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbadocumentproperties.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <ooo/vba/word/WdBuiltInProperty.hpp>
+#include <ooo/vba/office/MsoDocProperties.hpp>
+#include <memory>
+#include <boost/shared_ptr.hpp>
+#include "wordvbahelper.hxx"
+#include "fesh.hxx"
+#include "docsh.hxx"
+using namespace ::ooo::vba;
+using namespace css;
+
+sal_Int8 lcl_toMSOPropType( const uno::Type& aType ) throw ( lang::IllegalArgumentException )
+{
+ sal_Int16 msoType = office::MsoDocProperties::msoPropertyTypeString;
+
+ switch ( aType.getTypeClass() )
+ {
+ case uno::TypeClass_BOOLEAN:
+ msoType = office::MsoDocProperties::msoPropertyTypeBoolean;
+ break;
+ case uno::TypeClass_FLOAT:
+ msoType = office::MsoDocProperties::msoPropertyTypeFloat;
+ break;
+ case uno::TypeClass_STRUCT: // Assume date
+ msoType = office::MsoDocProperties::msoPropertyTypeDate;
+ break;
+ case uno::TypeClass_BYTE:
+ case uno::TypeClass_SHORT:
+ case uno::TypeClass_LONG:
+ case uno::TypeClass_HYPER:
+ msoType = office::MsoDocProperties::msoPropertyTypeNumber;
+ break;
+ default:
+ throw lang::IllegalArgumentException();
+ }
+ return msoType;
+}
+
+class PropertGetSetHelper
+{
+protected:
+ uno::Reference< frame::XModel > m_xModel;
+ uno::Reference< beans::XPropertySet > mxProps;
+public:
+ PropertGetSetHelper( const uno::Reference< frame::XModel >& xModel ):m_xModel( xModel )
+ {
+ uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( m_xModel, uno::UNO_QUERY_THROW );
+ mxProps.set( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
+ }
+ virtual ~PropertGetSetHelper() {}
+ virtual uno::Any getPropertyValue( const rtl::OUString& rPropName ) = 0;
+ virtual void setPropertyValue( const rtl::OUString& rPropName, const uno::Any& aValue ) = 0;
+ virtual uno::Reference< beans::XPropertySet > getUnoProperties() { return mxProps; }
+
+};
+
+class BuiltinPropertyGetSetHelper : public PropertGetSetHelper
+{
+public:
+ BuiltinPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel )
+ {
+ }
+ virtual uno::Any getPropertyValue( const rtl::OUString& rPropName )
+ {
+ if ( rPropName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("EditingDuration" ) ) ) )
+ {
+ sal_Int32 nSecs = 0;
+ mxProps->getPropertyValue( rPropName ) >>= nSecs;
+ return uno::makeAny( nSecs/60 ); // minutes
+ }
+ return mxProps->getPropertyValue( rPropName );
+ }
+ virtual void setPropertyValue( const rtl::OUString& rPropName, const uno::Any& aValue )
+ {
+ mxProps->setPropertyValue( rPropName, aValue );
+ }
+};
+
+class CustomPropertyGetSetHelper : public BuiltinPropertyGetSetHelper
+{
+public:
+ CustomPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :BuiltinPropertyGetSetHelper( xModel )
+ {
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( mxProps, uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocProp( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
+ mxProps.set( xDocProp->getUserDefinedProperties(), uno::UNO_QUERY_THROW );
+ }
+};
+class StatisticPropertyGetSetHelper : public PropertGetSetHelper
+{
+ SwDocShell* mpDocShell;
+ uno::Reference< beans::XPropertySet > mxModelProps;
+public:
+ StatisticPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel ) , mpDocShell( NULL )
+ {
+ mxModelProps.set( m_xModel, uno::UNO_QUERY_THROW );
+ mpDocShell = word::getDocShell( xModel );
+ }
+ virtual uno::Any getPropertyValue( const rtl::OUString& rPropName )
+ {
+ uno::Sequence< beans::NamedValue > stats;
+ try
+ {
+ // Characters, ParagraphCount & WordCount are available from
+ // the model ( and addtionally these also update the statics object )
+ //return mxProps->getPropertyValue( rPropName );
+ return mxModelProps->getPropertyValue( rPropName );
+ }
+ catch( uno::Exception& )
+ {
+ OSL_TRACE("Got exception");
+ }
+ uno::Any aReturn;
+ if ( rPropName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineCount")) ) ) // special processing needed
+ {
+ if ( mpDocShell )
+ {
+ SwFEShell* pFEShell = mpDocShell->GetFEShell();
+ if(pFEShell)
+ {
+ aReturn <<= pFEShell->GetLineCount(FALSE);
+ }
+ }
+ }
+ else
+ {
+ mxModelProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphCount") ) ) >>= stats;
+ mxProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DocumentStatistic") ) ) >>= stats;
+
+ sal_Int32 nLen = stats.getLength();
+ bool bFound = false;
+ for ( sal_Int32 index = 0; index < nLen && !bFound ; ++index )
+ {
+ if ( rPropName.equals( stats[ index ].Name ) )
+ {
+ aReturn = stats[ index ].Value;
+ bFound = true;
+ }
+ }
+ if ( !bFound )
+ throw uno::RuntimeException(); // bad Property
+ }
+ return aReturn;
+ }
+
+ virtual void setPropertyValue( const rtl::OUString& rPropName, const uno::Any& aValue )
+ {
+
+ uno::Sequence< beans::NamedValue > stats;
+ mxProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DocumentStatistic") ) ) >>= stats;
+
+ sal_Int32 nLen = stats.getLength();
+ for ( sal_Int32 index = 0; index < nLen; ++index )
+ {
+ if ( rPropName.equals( stats[ index ].Name ) )
+ {
+ stats[ index ].Value = aValue;
+ mxProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DocumentStatistic") ), uno::makeAny( stats ) );
+ break;
+ }
+ }
+ }
+};
+
+class DocPropInfo
+{
+public:
+ rtl::OUString msMSODesc;
+ rtl::OUString msOOOPropName;
+ boost::shared_ptr< PropertGetSetHelper > mpPropGetSetHelper;
+
+ static DocPropInfo createDocPropInfo( const rtl::OUString& sDesc, const rtl::OUString& sPropName, boost::shared_ptr< PropertGetSetHelper >& rHelper )
+ {
+ return createDocPropInfo( rtl::OUStringToOString( sDesc, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sPropName, RTL_TEXTENCODING_UTF8 ).getStr(), rHelper );
+ }
+
+ static DocPropInfo createDocPropInfo( const sal_Char* sDesc, const sal_Char* sPropName, boost::shared_ptr< PropertGetSetHelper >& rHelper )
+ {
+ DocPropInfo aItem;
+ aItem.msMSODesc = rtl::OUString::createFromAscii( sDesc );
+ aItem.msOOOPropName = rtl::OUString::createFromAscii( sPropName );
+ aItem.mpPropGetSetHelper = rHelper;
+ return aItem;
+ }
+ uno::Any getValue()
+ {
+ if ( mpPropGetSetHelper.get() )
+ return mpPropGetSetHelper->getPropertyValue( msOOOPropName );
+ return uno::Any();
+ }
+ void setValue( const uno::Any& rValue )
+ {
+ if ( mpPropGetSetHelper.get() )
+ mpPropGetSetHelper->setPropertyValue( msOOOPropName, rValue );
+ }
+ uno::Reference< beans::XPropertySet > getUnoProperties()
+ {
+
+ uno::Reference< beans::XPropertySet > xProps;
+ if ( mpPropGetSetHelper.get() )
+ return mpPropGetSetHelper->getUnoProperties();
+ return xProps;
+ }
+};
+
+
+typedef std::hash_map< sal_Int32, DocPropInfo > MSOIndexToOODocPropInfo;
+
+class BuiltInIndexHelper
+{
+ MSOIndexToOODocPropInfo m_docPropInfoMap;
+ BuiltInIndexHelper();
+public:
+ BuiltInIndexHelper( const uno::Reference< frame::XModel >& xModel )
+ {
+ boost::shared_ptr< PropertGetSetHelper > aStandardHelper( new BuiltinPropertyGetSetHelper( xModel ) );
+ boost::shared_ptr< PropertGetSetHelper > aUsingStatsHelper( new StatisticPropertyGetSetHelper( xModel ) );
+
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTitle ] = DocPropInfo::createDocPropInfo( "Title", "Title", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertySubject ] = DocPropInfo::createDocPropInfo( "Subject", "Subject", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyAuthor ] = DocPropInfo::createDocPropInfo( "Author", "Author", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyKeywords ] = DocPropInfo::createDocPropInfo( "Keywords", "Keywords", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyComments ] = DocPropInfo::createDocPropInfo( "Comments", "Description", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTemplate ] = DocPropInfo::createDocPropInfo( "Template", "Template", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyLastAuthor ] = DocPropInfo::createDocPropInfo( "Last author", "ModifiedBy", aStandardHelper ); // doesn't seem to exist - throw or return nothing ?
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyRevision ] = DocPropInfo::createDocPropInfo( "Revision number", "EditingCycles", aStandardHelper ); // doesn't seem to exist - throw or return nothing ?
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyAppName ] = DocPropInfo::createDocPropInfo( "Application name", "Generator", aStandardHelper ); // doesn't seem to exist - throw or return nothing ?
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTimeLastPrinted ] = DocPropInfo::createDocPropInfo( "Last print date", "PrintDate", aStandardHelper ); // doesn't seem to exist - throw or return nothing ?
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTimeCreated ] = DocPropInfo::createDocPropInfo( "Creation date", "CreationDate", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTimeLastSaved ] = DocPropInfo::createDocPropInfo( "Last save time", "ModifyDate", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyVBATotalEdit ] = DocPropInfo::createDocPropInfo( "Total editing time", "EditingDuration", aStandardHelper ); // Not sure if this is correct
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyPages ] = DocPropInfo::createDocPropInfo( "Number of pages", "PageCount", aUsingStatsHelper ); // special handling required ?
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyWords ] = DocPropInfo::createDocPropInfo( "Number of words", "WordCount", aUsingStatsHelper ); // special handling require ?
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyCharacters ] = DocPropInfo::createDocPropInfo( "Number of characters", "CharacterCount", aUsingStatsHelper ); // special handling required ?
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertySecurity ] = DocPropInfo::createDocPropInfo( "Security", "", aStandardHelper ); // doesn't seem to exist
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyCategory ] = DocPropInfo::createDocPropInfo( "Category", "Category", aStandardHelper ); // hacked in
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyFormat ] = DocPropInfo::createDocPropInfo( "Format", "", aStandardHelper ); // doesn't seem to exist
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyManager ] = DocPropInfo::createDocPropInfo( "Manager", "Manager", aStandardHelper ); // hacked in
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyCompany ] = DocPropInfo::createDocPropInfo( "Company", "Company", aStandardHelper ); // hacked in
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyBytes ] = DocPropInfo::createDocPropInfo( "Number of bytes", "", aStandardHelper ); // doesn't seem to exist - size on disk exists ( for an already saved document ) perhaps it will do ( or we need something else )
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyLines ] = DocPropInfo::createDocPropInfo( "Number of lines", "LineCount", aUsingStatsHelper ); // special handling
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyParas ] = DocPropInfo::createDocPropInfo( "Number of paragraphs", "ParagraphCount", aUsingStatsHelper ); // special handling
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertySlides ] = DocPropInfo::createDocPropInfo( "Number of slides", "" , aStandardHelper ); // doesn't seem to exist
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyNotes ] = DocPropInfo::createDocPropInfo( "Number of notes", "", aStandardHelper ); // doesn't seem to exist
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyHiddenSlides ] = DocPropInfo::createDocPropInfo("Number of hidden Slides", "", aStandardHelper ); // doesn't seem to exist
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyMMClips ] = DocPropInfo::createDocPropInfo( "Number of multimedia clips", "", aStandardHelper ); // doesn't seem to exist
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyHyperlinkBase ] = DocPropInfo::createDocPropInfo( "Hyperlink base", "AutoloadURL", aStandardHelper );
+ m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyCharsWSpaces ] = DocPropInfo::createDocPropInfo( "Number of characters (with spaces)", "", aStandardHelper ); // doesn't seem to be supported
+ }
+
+ MSOIndexToOODocPropInfo& getDocPropInfoMap() { return m_docPropInfoMap; }
+};
+
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::XDocumentProperty > SwVbaDocumentProperty_BASE;
+
+class SwVbaBuiltInDocumentProperty : public SwVbaDocumentProperty_BASE
+{
+protected:
+ DocPropInfo mPropInfo;
+public:
+ SwVbaBuiltInDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const DocPropInfo& rInfo );
+ // XDocumentProperty
+ virtual void SAL_CALL Delete( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getName( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setName( const ::rtl::OUString& Name ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual ::sal_Int8 SAL_CALL getType( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setType( ::sal_Int8 Type ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getLinkToContent( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setLinkToContent( ::sal_Bool LinkToContent ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual uno::Any SAL_CALL getValue( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setValue( const uno::Any& Value ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual rtl::OUString SAL_CALL getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setLinkSource( const rtl::OUString& LinkSource ) throw (script::BasicErrorException, uno::RuntimeException);
+ //XDefaultProperty
+ virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException) { return rtl::OUString::createFromAscii("Value"); }
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+class SwVbaCustomDocumentProperty : public SwVbaBuiltInDocumentProperty
+{
+public:
+
+ SwVbaCustomDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const DocPropInfo& rInfo );
+
+ virtual ::sal_Bool SAL_CALL getLinkToContent( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setLinkToContent( ::sal_Bool LinkToContent ) throw (script::BasicErrorException, uno::RuntimeException);
+
+ virtual rtl::OUString SAL_CALL getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setLinkSource( const rtl::OUString& LinkSource ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL Delete( ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setName( const ::rtl::OUString& Name ) throw (script::BasicErrorException, uno::RuntimeException);
+ virtual void SAL_CALL setType( ::sal_Int8 Type ) throw (script::BasicErrorException, uno::RuntimeException);
+
+};
+
+
+SwVbaCustomDocumentProperty::SwVbaCustomDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const DocPropInfo& rInfo ) : SwVbaBuiltInDocumentProperty( xParent, xContext, rInfo )
+{
+}
+
+sal_Bool
+SwVbaCustomDocumentProperty::getLinkToContent( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // #FIXME we need to store the link content somewhere
+ return sal_False;
+}
+
+void
+SwVbaCustomDocumentProperty::setLinkToContent( sal_Bool /*bLinkContent*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+}
+
+rtl::OUString
+SwVbaCustomDocumentProperty::getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // #FIXME we need to store the link content somewhere
+ return rtl::OUString();;
+}
+
+void
+SwVbaCustomDocumentProperty::setLinkSource( const rtl::OUString& /*rsLinkContent*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // #FIXME we need to store the link source somewhere
+}
+
+void SAL_CALL
+SwVbaCustomDocumentProperty::setName( const ::rtl::OUString& /*Name*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // setName on existing property ?
+ // #FIXME
+ // do we need to delete existing property and create a new one?
+}
+
+void SAL_CALL
+SwVbaCustomDocumentProperty::setType( ::sal_Int8 /*Type*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // setType, do we need to do a conversion?
+ // #FIXME the underlying value needs to be changed to the new type
+}
+
+void SAL_CALL
+SwVbaCustomDocumentProperty::Delete( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertyContainer > xContainer( mPropInfo.getUnoProperties(), uno::UNO_QUERY_THROW );
+ xContainer->removeProperty( getName() );
+}
+
+SwVbaBuiltInDocumentProperty::SwVbaBuiltInDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const DocPropInfo& rInfo ) : SwVbaDocumentProperty_BASE( xParent, xContext ), mPropInfo( rInfo )
+{
+}
+
+void SAL_CALL
+SwVbaBuiltInDocumentProperty::Delete( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // not valid for Builtin
+ throw uno::RuntimeException();
+}
+
+::rtl::OUString SAL_CALL
+SwVbaBuiltInDocumentProperty::getName( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ return mPropInfo.msMSODesc;
+}
+
+void SAL_CALL
+SwVbaBuiltInDocumentProperty::setName( const rtl::OUString& ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // not valid for Builtin
+ throw uno::RuntimeException();
+}
+
+::sal_Int8 SAL_CALL
+SwVbaBuiltInDocumentProperty::getType( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ return lcl_toMSOPropType( getValue().getValueType() );
+}
+
+void SAL_CALL
+SwVbaBuiltInDocumentProperty::setType( ::sal_Int8 /*Type*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // not valid for Builtin
+ throw uno::RuntimeException();
+}
+
+::sal_Bool SAL_CALL
+SwVbaBuiltInDocumentProperty::getLinkToContent( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ return sal_False; // built-in always false
+}
+
+void SAL_CALL
+SwVbaBuiltInDocumentProperty::setLinkToContent( ::sal_Bool /*LinkToContent*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // not valid for Builtin
+ throw uno::RuntimeException();
+}
+
+uno::Any SAL_CALL
+SwVbaBuiltInDocumentProperty::getValue( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ uno::Any aRet = mPropInfo.getValue();
+ if ( !aRet.hasValue() )
+ throw uno::RuntimeException();
+ return aRet;
+}
+
+void SAL_CALL
+SwVbaBuiltInDocumentProperty::setValue( const uno::Any& Value ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ mPropInfo.setValue( Value );
+}
+
+rtl::OUString SAL_CALL
+SwVbaBuiltInDocumentProperty::getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // not valid for Builtin
+ throw uno::RuntimeException();
+}
+
+void SAL_CALL
+SwVbaBuiltInDocumentProperty::setLinkSource( const rtl::OUString& /*LinkSource*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // not valid for Builtin
+ throw uno::RuntimeException();
+}
+
+rtl::OUString&
+SwVbaBuiltInDocumentProperty::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBuiltinDocumentProperty") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaBuiltInDocumentProperty::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.DocumentProperty" ) );
+ }
+ return aServiceNames;
+}
+typedef ::cppu::WeakImplHelper3< com::sun::star::container::XIndexAccess
+ ,com::sun::star::container::XNameAccess
+ ,com::sun::star::container::XEnumerationAccess
+ > PropertiesImpl_BASE;
+
+typedef std::hash_map< sal_Int32, uno::Reference< XDocumentProperty > > DocProps;
+
+typedef ::cppu::WeakImplHelper1< com::sun::star::container::XEnumeration > DocPropEnumeration_BASE;
+class DocPropEnumeration : public DocPropEnumeration_BASE
+{
+ DocProps mDocProps;
+ DocProps::iterator mIt;
+public:
+
+ DocPropEnumeration( const DocProps& rProps ) : mDocProps( rProps ), mIt( mDocProps.begin() ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return mIt != mDocProps.end();
+ }
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasMoreElements() )
+ throw container::NoSuchElementException();
+ return uno::makeAny( mIt++->second );
+ }
+};
+
+typedef std::hash_map< rtl::OUString, uno::Reference< XDocumentProperty >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > DocPropsByName;
+
+class BuiltInPropertiesImpl : public PropertiesImpl_BASE
+{
+protected:
+
+ uno::Reference< XHelperInterface > m_xParent;
+ uno::Reference< uno::XComponentContext > m_xContext;
+ uno::Reference< frame::XModel > m_xModel;
+ uno::Reference< document::XDocumentInfo > m_xOOOBuiltIns;
+
+ DocProps mDocProps;
+ DocPropsByName mNamedDocProps;
+
+ public:
+ BuiltInPropertiesImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel )
+ {
+ BuiltInIndexHelper builtIns( m_xModel );
+ for ( sal_Int32 index = word::WdBuiltInProperty::wdPropertyTitle; index <= word::WdBuiltInProperty::wdPropertyCharsWSpaces; ++index )
+ {
+ mDocProps[ index ] = new SwVbaBuiltInDocumentProperty( xParent, xContext, builtIns.getDocPropInfoMap()[ index ] );
+ mNamedDocProps[ mDocProps[ index ]->getName() ] = mDocProps[ index ];
+ }
+ }
+// XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return mDocProps.size();
+ }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException )
+ {
+ // correct the correct by the base class for 1 based indices
+ DocProps::iterator it = mDocProps.find( ++Index );
+ if ( it == mDocProps.end() )
+ throw lang::IndexOutOfBoundsException();
+ return uno::makeAny( it->second );
+ }
+ virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasByName( aName ) )
+ throw container::NoSuchElementException();
+ DocPropsByName::iterator it = mNamedDocProps.find( aName );
+ return uno::Any( it->second );
+
+ }
+ virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > aNames( getCount() );
+ rtl::OUString* pName = aNames.getArray();
+ DocPropsByName::iterator it_end = mNamedDocProps.end();
+ for( DocPropsByName::iterator it = mNamedDocProps.begin(); it != it_end; ++it, ++pName )
+ *pName = it->first;
+ return aNames;
+ }
+
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ {
+ DocPropsByName::iterator it = mNamedDocProps.find( aName );
+ if ( it == mNamedDocProps.end() )
+ return sal_False;
+ return sal_True;
+ }
+// XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return XDocumentProperty::static_type(0);
+ }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return mDocProps.size() > 0;
+ }
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return new DocPropEnumeration( mDocProps );
+ }
+};
+
+SwVbaBuiltinDocumentProperties::SwVbaBuiltinDocumentProperties( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : SwVbaDocumentproperties_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new BuiltInPropertiesImpl( xParent, xContext, xModel ) ) ), m_xModel( xModel )
+{
+}
+
+uno::Reference< XDocumentProperty > SAL_CALL
+SwVbaBuiltinDocumentProperties::Add( const ::rtl::OUString& /*Name*/, ::sal_Bool /*LinkToContent*/, ::sal_Int8 /*Type*/, const uno::Any& /*value*/, const uno::Any& /*LinkSource*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ throw uno::RuntimeException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("not supported for Builtin properties") ), uno::Reference< uno::XInterface >() );
+}
+
+// XEnumerationAccess
+uno::Type SAL_CALL
+SwVbaBuiltinDocumentProperties::getElementType() throw (uno::RuntimeException)
+{
+ return XDocumentProperty::static_type(0);
+}
+
+uno::Reference< container::XEnumeration > SAL_CALL
+SwVbaBuiltinDocumentProperties::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumAccess->createEnumeration();
+}
+
+// ScVbaCollectionBaseImpl
+uno::Any
+SwVbaBuiltinDocumentProperties::createCollectionObject( const uno::Any& aSource )
+{
+ // pass through
+ return aSource;
+}
+
+// XHelperInterface
+rtl::OUString&
+SwVbaBuiltinDocumentProperties::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBuiltinDocumentProperties") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaBuiltinDocumentProperties::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.DocumentProperties" ) );
+ }
+ return aServiceNames;
+}
+
+class CustomPropertiesImpl : public PropertiesImpl_BASE
+{
+ uno::Reference< XHelperInterface > m_xParent;
+ uno::Reference< uno::XComponentContext > m_xContext;
+ uno::Reference< frame::XModel > m_xModel;
+ uno::Reference< beans::XPropertySet > mxUserDefinedProp;
+ boost::shared_ptr< PropertGetSetHelper > mpPropGetSetHelper;
+public:
+ CustomPropertiesImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel )
+ {
+ // suck in the document( custom ) properties
+ uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( m_xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocProp( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
+ mxUserDefinedProp.set( xDocProp->getUserDefinedProperties(), uno::UNO_QUERY_THROW );
+ mpPropGetSetHelper.reset( new CustomPropertyGetSetHelper( m_xModel ) );
+ };
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return mxUserDefinedProp->getPropertySetInfo()->getProperties().getLength();
+ }
+
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException )
+ {
+ uno::Sequence< beans::Property > aProps = mxUserDefinedProp->getPropertySetInfo()->getProperties();
+ if ( Index >= aProps.getLength() )
+ throw lang::IndexOutOfBoundsException();
+ // How to determine type e.g Date? ( com.sun.star.util.DateTime )
+ DocPropInfo aPropInfo = DocPropInfo::createDocPropInfo( aProps[ Index ].Name, aProps[ Index ].Name, mpPropGetSetHelper );
+ return uno::makeAny( uno::Reference< XDocumentProperty >( new SwVbaCustomDocumentProperty( m_xParent, m_xContext, aPropInfo ) ) );
+ }
+
+ virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasByName( aName ) )
+ throw container::NoSuchElementException();
+
+ DocPropInfo aPropInfo = DocPropInfo::createDocPropInfo( aName, aName, mpPropGetSetHelper );
+ return uno::makeAny( uno::Reference< XDocumentProperty >( new SwVbaCustomDocumentProperty( m_xParent, m_xContext, aPropInfo ) ) );
+ }
+
+ virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
+ {
+ uno::Sequence< beans::Property > aProps = mxUserDefinedProp->getPropertySetInfo()->getProperties();
+ uno::Sequence< rtl::OUString > aNames( aProps.getLength() );
+ rtl::OUString* pString = aNames.getArray();
+ rtl::OUString* pEnd = ( pString + aNames.getLength() );
+ beans::Property* pProp = aProps.getArray();
+ for ( ; pString != pEnd; ++pString, ++pProp )
+ *pString = pProp->Name;
+ return aNames;
+ }
+
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ {
+ OSL_TRACE("hasByName(%s) returns %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( aName ) );
+ return mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( aName );
+ }
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return XDocumentProperty::static_type(0);
+ }
+
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return getCount() > 0;
+ }
+
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ // create a map of properties ( the key doesn't matter )
+ OSL_TRACE("Creating an enumeration");
+ sal_Int32 key = 0;
+ sal_Int32 nElem = getCount();
+ DocProps simpleDocPropSnapShot;
+ for ( ; key < nElem; ++key )
+ simpleDocPropSnapShot[ key ].set( getByIndex( key ), uno::UNO_QUERY_THROW );
+ OSL_TRACE("After creating the enumeration");
+ return new DocPropEnumeration( simpleDocPropSnapShot );
+ }
+
+ void addProp( const ::rtl::OUString& Name, ::sal_Int8 /*Type*/, const uno::Any& Value )
+ {
+ sal_Int16 attributes = 128;
+ uno::Reference< beans::XPropertyContainer > xContainer( mxUserDefinedProp, uno::UNO_QUERY_THROW );
+ // TODO fixme, perform the necessary Type Value conversions
+ xContainer->addProperty( Name, attributes, Value );
+ }
+
+};
+
+
+SwVbaCustomDocumentProperties::SwVbaCustomDocumentProperties( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : SwVbaBuiltinDocumentProperties( xParent, xContext, xModel )
+{
+ // replace the m_xIndexAccess implementation ( we need a virtual init )
+ m_xIndexAccess.set( new CustomPropertiesImpl( xParent, xContext, xModel ) );
+ m_xNameAccess.set( m_xIndexAccess, uno::UNO_QUERY_THROW );
+}
+
+uno::Reference< XDocumentProperty > SAL_CALL
+SwVbaCustomDocumentProperties::Add( const ::rtl::OUString& Name, ::sal_Bool LinkToContent, ::sal_Int8 Type, const uno::Any& Value, const uno::Any& LinkSource ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ CustomPropertiesImpl* pCustomProps = dynamic_cast< CustomPropertiesImpl* > ( m_xIndexAccess.get() );
+ uno::Reference< XDocumentProperty > xDocProp;
+ if ( pCustomProps )
+ {
+ rtl::OUString sLinkSource;
+ pCustomProps->addProp( Name, Type, Value );
+
+ xDocProp.set( m_xNameAccess->getByName( Name ), uno::UNO_QUERY_THROW );
+ xDocProp->setLinkToContent( LinkToContent );
+
+ if ( LinkSource >>= sLinkSource )
+ xDocProp->setLinkSource( sLinkSource );
+ }
+ return xDocProp;
+}
+
+// XHelperInterface
+rtl::OUString&
+SwVbaCustomDocumentProperties::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaCustomDocumentProperties") );
+ return sImplName;
+}
diff --git a/sw/source/ui/vba/vbadocumentproperties.hxx b/sw/source/ui/vba/vbadocumentproperties.hxx
new file mode 100644
index 000000000000..5159ea580601
--- /dev/null
+++ b/sw/source/ui/vba/vbadocumentproperties.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * 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_VBA_DOCUMENTPROPERTIES_HXX
+#define SW_VBA_DOCUMENTPROPERTIES_HXX
+
+#include <ooo/vba/XDocumentProperties.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <hash_map>
+
+typedef CollTestImplHelper< ov::XDocumentProperties > SwVbaDocumentproperties_BASE;
+
+class SwVbaBuiltinDocumentProperties : public SwVbaDocumentproperties_BASE
+{
+protected:
+ css::uno::Reference< css::frame::XModel > m_xModel;
+public:
+ SwVbaBuiltinDocumentProperties( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xDocument );
+
+ // XDocumentProperties
+ virtual css::uno::Reference< ::ooo::vba::XDocumentProperty > SAL_CALL Add( const ::rtl::OUString& Name, ::sal_Bool LinkToContent, ::sal_Int8 Type, const css::uno::Any& Value, const css::uno::Any& LinkSource ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ // ScVbaCollectionBaseImpl
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+class SwVbaCustomDocumentProperties : public SwVbaBuiltinDocumentProperties
+{
+public:
+ SwVbaCustomDocumentProperties( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xDocument );
+// XDocumentProperties
+ virtual css::uno::Reference< ::ooo::vba::XDocumentProperty > SAL_CALL Add( const ::rtl::OUString& Name, ::sal_Bool LinkToContent, ::sal_Int8 Type, const css::uno::Any& Value, const css::uno::Any& LinkSource ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+};
+
+#endif /* SW_VBA_DOCUMENTPROPERTY_HXX */
diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx
new file mode 100644
index 000000000000..8ee1e9880b7a
--- /dev/null
+++ b/sw/source/ui/vba/vbadocuments.cxx
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include <comphelper/processfactory.hxx>
+
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase3.hxx>
+
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/beans/PropertyVetoException.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/document/XTypeDetection.hpp>
+#include <com/sun/star/uri/XUriReference.hpp>
+#include <com/sun/star/uri/XUriReferenceFactory.hpp>
+
+#include <sfx2/objsh.hxx>
+#include <tools/urlobj.hxx>
+
+#include "vbaglobals.hxx"
+#include "vbadocument.hxx"
+#include "vbadocuments.hxx"
+#include <vbahelper/vbahelper.hxx>
+
+#include <hash_map>
+#include <osl/file.hxx>
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+static uno::Any
+getDocument( uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< text::XTextDocument > &xDoc, const uno::Any& aApplication )
+{
+ // FIXME: fine as long as SwVbaDocument is stateless ...
+ uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY );
+ if( !xModel.is() )
+ return uno::Any();
+
+ SwVbaDocument *pWb = new SwVbaDocument( uno::Reference< XHelperInterface >( aApplication, uno::UNO_QUERY_THROW ), xContext, xModel );
+ return uno::Any( uno::Reference< word::XDocument > (pWb) );
+}
+
+class DocumentEnumImpl : public EnumerationHelperImpl
+{
+ uno::Any m_aApplication;
+public:
+ DocumentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_aApplication( aApplication ) {}
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ uno::Reference< text::XTextDocument > xDoc( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ return getDocument( m_xContext, xDoc, m_aApplication );
+ }
+};
+
+SwVbaDocuments::SwVbaDocuments( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SwVbaDocuments_BASE( xParent, xContext, VbaDocumentsBase::WORD_DOCUMENT )
+{
+}
+// XEnumerationAccess
+uno::Type
+SwVbaDocuments::getElementType() throw (uno::RuntimeException)
+{
+ return word::XDocument::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaDocuments::createEnumeration() throw (uno::RuntimeException)
+{
+ // #FIXME its possible the DocumentEnumImpl here doens't reflect
+ // the state of this object ( although it should ) would be
+ // safer to create an enumeration based on this objects state
+ // rather than one effectively based of the desktop component
+ uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return new DocumentEnumImpl( mxContext, xEnumerationAccess->createEnumeration(), Application() );
+}
+
+uno::Any
+SwVbaDocuments::createCollectionObject( const uno::Any& aSource )
+{
+ uno::Reference< text::XTextDocument > xDoc( aSource, uno::UNO_QUERY_THROW );
+ return getDocument( mxContext, xDoc, Application() );
+}
+
+uno::Any SAL_CALL
+SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, const uno::Any& /*DocumentType*/, const uno::Any& /*Visible*/ ) throw (uno::RuntimeException)
+{
+ rtl::OUString sFileName;
+ if( Template.hasValue() && ( Template >>= sFileName ) )
+ {
+ return Open( sFileName, uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any());
+ }
+ uno::Reference <text::XTextDocument> xTextDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW );
+
+ if( xTextDoc.is() )
+ return getDocument( mxContext, xTextDoc, Application() );
+ return uno::Any();
+}
+
+// #TODO# #FIXME# can any of the unused params below be used?
+void SAL_CALL
+SwVbaDocuments::Close( const uno::Any& /*SaveChanges*/, const uno::Any& /*OriginalFormat*/, const uno::Any& /*RouteDocument*/ ) throw (uno::RuntimeException)
+{
+ VbaDocumentsBase::Close();
+}
+
+// #TODO# #FIXME# can any of the unused params below be used?
+uno::Any SAL_CALL
+SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*ConfirmConversions*/, const uno::Any& ReadOnly, const uno::Any& /*AddToRecentFiles*/, const uno::Any& /*PasswordDocument*/, const uno::Any& /*PasswordTemplate*/, const uno::Any& /*Revert*/, const uno::Any& /*WritePasswordDocument*/, const uno::Any& /*WritePasswordTemplate*/, const uno::Any& /*Format*/, const uno::Any& /*Encoding*/, const uno::Any& /*Visible*/, const uno::Any& /*OpenAndRepair*/, const uno::Any& /*DocumentDirection*/, const uno::Any& /*NoEncodingDialog*/, const uno::Any& /*XMLTransform*/ ) throw (uno::RuntimeException)
+{
+ // we need to detect if this is a URL, if not then assume its a file path
+ rtl::OUString aURL;
+ INetURLObject aObj;
+ aObj.SetURL( Filename );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ if ( bIsURL )
+ aURL = Filename;
+ else
+ osl::FileBase::getFileURLFromSystemPath( Filename, aURL );
+
+ uno::Sequence< beans::PropertyValue > sProps(0);
+
+ uno::Reference <text::XTextDocument> xSpreadDoc( VbaDocumentsBase::Open( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
+ uno::Any aRet = getDocument( mxContext, xSpreadDoc, Application() );
+ uno::Reference< word::XDocument > xDocument( aRet, uno::UNO_QUERY );
+ if ( xDocument.is() )
+ xDocument->Activate();
+ return aRet;
+}
+
+ // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci)
+uno::Any SAL_CALL
+SwVbaDocuments::Add() throw (uno::RuntimeException)
+{
+ return VbaDocumentsBase::Add();
+}
+
+void SAL_CALL
+SwVbaDocuments::Close( ) throw (uno::RuntimeException)
+{
+ VbaDocumentsBase::Close();
+}
+
+uno::Any SAL_CALL
+SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException)
+{
+ return VbaDocumentsBase::Open( Filename, ReadOnly, rProps );
+}
+
+rtl::OUString&
+SwVbaDocuments::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDocuments") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaDocuments::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Documents") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx
new file mode 100644
index 000000000000..81b936a1ae76
--- /dev/null
+++ b/sw/source/ui/vba/vbadocuments.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * 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_VBA_DOCUMENTS_HXX
+#define SW_VBA_DOCUMENTS_HXX
+
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XDocuments.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <vbahelper/vbadocumentsbase.hxx>
+#include "wordvbahelper.hxx"
+
+
+typedef cppu::ImplInheritanceHelper1< VbaDocumentsBase, ov::word::XDocuments > SwVbaDocuments_BASE;
+
+class SwVbaDocuments : public SwVbaDocuments_BASE
+{
+public:
+ SwVbaDocuments( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ virtual ~SwVbaDocuments() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaDocuments_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+
+ // Methods
+ virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template, const css::uno::Any& NewTemplate, const css::uno::Any& DocumentType, const css::uno::Any& Visible ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ConfirmConversions, const css::uno::Any& ReadOnly, const css::uno::Any& AddToRecentFiles, const css::uno::Any& PasswordDocument, const css::uno::Any& PasswordTemplate, const css::uno::Any& Revert, const css::uno::Any& WritePasswordDocument, const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Format, const css::uno::Any& Encoding, const css::uno::Any& Visible, const css::uno::Any& OpenAndRepair, const css::uno::Any& DocumentDirection, const css::uno::Any& NoEncodingDialog, const css::uno::Any& XMLTransform ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& OriginalFormat, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException);
+
+ // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci)
+ virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException);
+};
+
+#endif /* SW_VBA_DOCUMENTS_HXX */
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
new file mode 100644
index 000000000000..a33b3c208c8f
--- /dev/null
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -0,0 +1,478 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbafield.hxx"
+#include "vbarange.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <ooo/vba/word/WdFieldType.hpp>
+#include <com/sun/star/text/FilenameDisplayFormat.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <swtypes.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+// *** SwVbaField ***********************************************
+
+SwVbaField::SwVbaField( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const uno::Reference< css::text::XTextField >& xTextField) throw ( uno::RuntimeException ) : SwVbaField_BASE( rParent, rContext ), mxTextDocument( rDocument )
+{
+ mxTextField.set( xTextField, uno::UNO_QUERY_THROW );
+}
+
+// XHelperInterface
+rtl::OUString&
+SwVbaField::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaField") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaField::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Field" ) );
+ }
+ return aServiceNames;
+}
+
+// *** _ReadFieldParams ***********************************************
+// the codes are copied from ww8par5.cxx
+class _ReadFieldParams
+{
+private:
+ String aData;
+ xub_StrLen nLen, nFnd, nNext, nSavPtr;
+ String aFieldName;
+public:
+ _ReadFieldParams( const String& rData );
+ ~_ReadFieldParams();
+
+ xub_StrLen GoToTokenParam();
+ long SkipToNextToken();
+ xub_StrLen GetTokenSttPtr() const { return nFnd; }
+
+ xub_StrLen FindNextStringPiece( xub_StrLen _nStart = STRING_NOTFOUND );
+ bool GetTokenSttFromTo(xub_StrLen* _pFrom, xub_StrLen* _pTo,
+ xub_StrLen _nMax);
+
+ String GetResult() const;
+ String GetFieldName()const { return aFieldName; }
+};
+
+
+_ReadFieldParams::_ReadFieldParams( const String& _rData )
+ : aData( _rData ), nLen( _rData.Len() ), nNext( 0 )
+{
+ /*
+ erstmal nach einer oeffnenden Klammer oder einer Leerstelle oder einem
+ Anfuehrungszeichen oder einem Backslash suchen, damit der Feldbefehl
+ (also INCLUDEPICTURE bzw EINFUeGENGRAFIK bzw ...) ueberlesen wird
+ */
+ while( (nLen > nNext) && (aData.GetChar( nNext ) == ' ') )
+ ++nNext;
+
+ sal_Unicode c;
+ while( nLen > nNext
+ && (c = aData.GetChar( nNext )) != ' '
+ && c != '"'
+ && c != '\\'
+ && c != 132
+ && c != 0x201c )
+ ++nNext;
+
+ nFnd = nNext;
+ nSavPtr = nNext;
+ aFieldName = aData.Copy( 0, nFnd );
+// cLastChar = aData.GetChar( nSavPtr );
+}
+
+
+_ReadFieldParams::~_ReadFieldParams()
+{
+// aData.SetChar( nSavPtr, cLastChar );
+}
+
+
+String _ReadFieldParams::GetResult() const
+{
+ return (STRING_NOTFOUND == nFnd)
+ ? aEmptyStr
+ : aData.Copy( nFnd, (nSavPtr - nFnd) );
+}
+
+
+xub_StrLen _ReadFieldParams::GoToTokenParam()
+{
+ xub_StrLen nOld = nNext;
+ if( -2 == SkipToNextToken() )
+ return GetTokenSttPtr();
+ nNext = nOld;
+ return STRING_NOTFOUND;
+}
+
+// ret: -2: NOT a '\' parameter but normal Text
+long _ReadFieldParams::SkipToNextToken()
+{
+ long nRet = -1; // Ende
+ if (
+ (STRING_NOTFOUND != nNext) && (nLen > nNext) &&
+ STRING_NOTFOUND != (nFnd = FindNextStringPiece(nNext))
+ )
+ {
+ nSavPtr = nNext;
+
+ if ('\\' == aData.GetChar(nFnd) && '\\' != aData.GetChar(nFnd + 1))
+ {
+ nRet = aData.GetChar(++nFnd);
+ nNext = ++nFnd; // und dahinter setzen
+ }
+ else
+ {
+ nRet = -2;
+ if (
+ (STRING_NOTFOUND != nSavPtr ) &&
+ (
+ ('"' == aData.GetChar(nSavPtr - 1)) ||
+ (0x201d == aData.GetChar(nSavPtr - 1))
+ )
+ )
+ {
+ --nSavPtr;
+ }
+ }
+ }
+ return nRet;
+}
+
+// FindNextPara sucht naechsten Backslash-Parameter oder naechste Zeichenkette
+// bis zum Blank oder naechsten "\" oder zum schliessenden Anfuehrungszeichen
+// oder zum String-Ende von pStr.
+//
+// Ausgabe ppNext (falls ppNext != 0) Suchbeginn fuer naechsten Parameter bzw. 0
+//
+// Returnwert: 0 falls String-Ende erreicht,
+// ansonsten Anfang des Paramters bzw. der Zeichenkette
+//
+xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
+{
+ xub_StrLen n = ( STRING_NOTFOUND == nStart ) ? nFnd : nStart; // Anfang
+ xub_StrLen n2; // Ende
+
+ nNext = STRING_NOTFOUND; // Default fuer nicht gefunden
+
+ while( (nLen > n) && (aData.GetChar( n ) == ' ') )
+ ++n;
+
+ if( nLen == n )
+ return STRING_NOTFOUND; // String End reached!
+
+ if( (aData.GetChar( n ) == '"') // Anfuehrungszeichen vor Para?
+ || (aData.GetChar( n ) == 0x201c)
+ || (aData.GetChar( n ) == 132) )
+ {
+ n++; // Anfuehrungszeichen ueberlesen
+ n2 = n; // ab hier nach Ende suchen
+ while( (nLen > n2)
+ && (aData.GetChar( n2 ) != '"')
+ && (aData.GetChar( n2 ) != 0x201d)
+ && (aData.GetChar( n2 ) != 147) )
+ n2++; // Ende d. Paras suchen
+ }
+ else // keine Anfuehrungszeichen
+ {
+ n2 = n; // ab hier nach Ende suchen
+ while( (nLen > n2) && (aData.GetChar( n2 ) != ' ') ) // Ende d. Paras suchen
+ {
+ if( aData.GetChar( n2 ) == '\\' )
+ {
+ if( aData.GetChar( n2+1 ) == '\\' )
+ n2 += 2; // Doppel-Backslash -> OK
+ else
+ {
+ if( n2 > n )
+ n2--;
+ break; // einfach-Backslash -> Ende
+ }
+ }
+ else
+ n2++; // kein Backslash -> OK
+ }
+ }
+ if( nLen > n2 )
+ {
+ if(aData.GetChar( n2 ) != ' ') n2++;
+ nNext = n2;
+ }
+ return n;
+}
+
+
+
+// read parameters "1-3" or 1-3 with both values between 1 and nMax
+bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax)
+{
+ USHORT nStart = 0;
+ USHORT nEnd = 0;
+ xub_StrLen n = GoToTokenParam();
+ if( STRING_NOTFOUND != n )
+ {
+
+ String sParams( GetResult() );
+
+ xub_StrLen nIndex = 0;
+ String sStart( sParams.GetToken(0, '-', nIndex) );
+ if( STRING_NOTFOUND != nIndex )
+ {
+ nStart = static_cast<USHORT>(sStart.ToInt32());
+ nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32());
+ }
+ }
+ if( pFrom ) *pFrom = nStart;
+ if( pTo ) *pTo = nEnd;
+
+ return nStart && nEnd && (nMax >= nStart) && (nMax >= nEnd);
+}
+
+// *** SwVbaFields ***********************************************
+
+uno::Any lcl_createField( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Any& aSource )
+{
+ uno::Reference< text::XTextField > xTextField( aSource, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextDocument > xTextDocument( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< word::XField > xField( new SwVbaField( xParent, xContext, xTextDocument, xTextField ) );
+ return uno::makeAny( xField );
+}
+
+typedef ::cppu::WeakImplHelper1< css::container::XEnumeration > FieldEnumeration_BASE;
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > FieldCollectionHelper_BASE;
+
+class FieldEnumeration : public FieldEnumeration_BASE
+{
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxModel;
+ uno::Reference< container::XEnumeration > mxEnumeration;
+public:
+ FieldEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< container::XEnumeration >& xEnumeration ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxEnumeration( xEnumeration )
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return mxEnumeration->hasMoreElements();
+ }
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasMoreElements() )
+ throw container::NoSuchElementException();
+ return lcl_createField( mxParent, mxContext, mxModel, mxEnumeration->nextElement() );
+ }
+};
+
+class FieldCollectionHelper : public FieldCollectionHelper_BASE
+{
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxModel;
+ uno::Reference< container::XEnumerationAccess > mxEnumerationAccess;
+public:
+ FieldCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) throw (css::uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
+ {
+ uno::Reference< text::XTextFieldsSupplier > xSupp( xModel, uno::UNO_QUERY_THROW );
+ mxEnumerationAccess.set( xSupp->getTextFields(), uno::UNO_QUERY_THROW );
+ }
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return mxEnumerationAccess->getElementType(); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return mxEnumerationAccess->hasElements(); }
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
+ sal_Int32 nCount = 0;
+ while( xEnumeration->hasMoreElements() )
+ {
+ ++nCount;
+ xEnumeration->nextElement();
+ }
+ return nCount;
+ }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ if( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
+ sal_Int32 nCount = 0;
+ while( xEnumeration->hasMoreElements() )
+ {
+ if( nCount == Index )
+ {
+ return xEnumeration->nextElement();
+ }
+ ++nCount;
+ }
+ throw lang::IndexOutOfBoundsException();
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
+ return uno::Reference< container::XEnumeration >( new FieldEnumeration( mxParent, mxContext, mxModel, xEnumeration ) );
+ }
+};
+
+SwVbaFields::SwVbaFields( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) : SwVbaFields_BASE( xParent, xContext , uno::Reference< container::XIndexAccess >( new FieldCollectionHelper( xParent, xContext, xModel ) ) ), mxModel( xModel )
+{
+ mxMSF.set( mxModel, uno::UNO_QUERY_THROW );
+}
+
+uno::Reference< word::XField > SAL_CALL
+SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& Type, const css::uno::Any& Text, const css::uno::Any& /*PreserveFormatting*/ ) throw (css::uno::RuntimeException)
+{
+ sal_Int32 nType = word::WdFieldType::wdFieldEmpty;
+ Type >>= nType;
+ rtl::OUString sText;
+ Text >>= sText;
+
+ String sFieldName;
+ if( ( nType == word::WdFieldType::wdFieldEmpty ) && ( sText.getLength() > 0 ) )
+ {
+ _ReadFieldParams aReadParam(sText);
+ sFieldName = aReadParam.GetFieldName();
+ }
+
+ uno::Reference< text::XTextContent > xTextField;
+ if( nType == word::WdFieldType::wdFieldFileName || sFieldName.EqualsIgnoreCaseAscii("FILENAME") )
+ {
+ xTextField.set( Create_Field_FileName( sText ), uno::UNO_QUERY_THROW );
+ }
+ else
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+
+ SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() );
+ uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange();
+ uno::Reference< text::XText > xText = xTextRange->getText();
+ xText->insertTextContent( xTextRange, xTextField, true );
+ return uno::Reference< word::XField >( new SwVbaField( mxParent, mxContext, uno::Reference< text::XTextDocument >( mxModel, uno::UNO_QUERY_THROW ), uno::Reference< text::XTextField >( xTextField, uno::UNO_QUERY_THROW ) ) );
+}
+
+uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl::OUString _text ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString::createFromAscii("com.sun.star.text.TextField.FileName") ), uno::UNO_QUERY_THROW );
+ sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT;
+ if( _text.getLength() > 0 )
+ {
+ long nRet;
+ _ReadFieldParams aReadParam( _text );
+ while (-1 != (nRet = aReadParam.SkipToNextToken()))
+ {
+ switch (nRet)
+ {
+ case 'p':
+ nFileFormat = text::FilenameDisplayFormat::FULL;
+ break;
+ case '*':
+ //Skip over MERGEFORMAT
+ aReadParam.SkipToNextToken();
+ break;
+ default:
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ break;
+ }
+ }
+ }
+
+ uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW );
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FileFormat") ), uno::makeAny( nFileFormat ) );
+
+ return xTextField;
+}
+
+uno::Reference< container::XEnumeration > SAL_CALL
+SwVbaFields::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumerationAccess->createEnumeration();
+}
+
+// ScVbaCollectionBaseImpl
+uno::Any
+SwVbaFields::createCollectionObject( const uno::Any& aSource )
+{
+ return lcl_createField( mxParent, mxContext, mxModel, aSource );
+}
+
+sal_Int32 SAL_CALL SwVbaFields::Update() throw (uno::RuntimeException)
+{
+ sal_Int32 nUpdate = 1;
+ try
+ {
+ uno::Reference< text::XTextFieldsSupplier > xSupp( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< util::XRefreshable > xRef( xSupp->getTextFields(), uno::UNO_QUERY_THROW );
+ xRef->refresh();
+ nUpdate = 0;
+ }catch( uno::Exception )
+ {
+ nUpdate = 1;
+ }
+ return nUpdate;
+}
+
+// XHelperInterface
+rtl::OUString&
+SwVbaFields::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFields") );
+ return sImplName;
+}
+
+// XEnumerationAccess
+uno::Type SAL_CALL
+SwVbaFields::getElementType() throw (uno::RuntimeException)
+{
+ return word::XField::static_type(0);
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaFields::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Fields" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbafield.hxx b/sw/source/ui/vba/vbafield.hxx
new file mode 100644
index 000000000000..3c55acf73e9d
--- /dev/null
+++ b/sw/source/ui/vba/vbafield.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * 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_VBA_FIELD_HXX
+#define SW_VBA_FIELD_HXX
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <ooo/vba/word/XField.hpp>
+#include <ooo/vba/word/XFields.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XField > SwVbaField_BASE;
+
+class SwVbaField : public SwVbaField_BASE
+{
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ css::uno::Reference< css::text::XTextField > mxTextField;
+public:
+ SwVbaField( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const css::uno::Reference< css::text::XTextField >& xTextField) throw ( css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+// *** SwVbaFields ***********************************************
+
+typedef CollTestImplHelper< ov::word::XFields > SwVbaFields_BASE;
+
+class SwVbaFields : public SwVbaFields_BASE
+{
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
+private:
+ css::uno::Reference< css::text::XTextField > Create_Field_FileName( const rtl::OUString _text ) throw (css::uno::RuntimeException);
+
+public:
+ SwVbaFields( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+ // XFields
+ virtual css::uno::Reference< ::ooo::vba::word::XField > SAL_CALL Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& Type, const css::uno::Any& Text, const css::uno::Any& PreserveFormatting ) throw (css::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL Update() throw (css::uno::RuntimeException);
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ // ScVbaCollectionBaseImpl
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
new file mode 100644
index 000000000000..79112109bf8c
--- /dev/null
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -0,0 +1,428 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbafind.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbareplacement.hxx"
+#include <ooo/vba/word/WdFindWrap.hpp>
+#include <ooo/vba/word/WdReplace.hpp>
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include "wordvbahelper.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaFind::SwVbaFind( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) throw ( uno::RuntimeException ) :
+ SwVbaFind_BASE( rParent, rContext ), mxModel( xModel ), mxTextRange( xTextRange ), mbReplace( sal_False ), mnReplaceType( word::WdReplace::wdReplaceOne ), mnWrap( word::WdFindWrap::wdFindStop )
+{
+ mxReplaceable.set( mxModel, uno::UNO_QUERY_THROW );
+ mxPropertyReplace.set( mxReplaceable->createReplaceDescriptor(), uno::UNO_QUERY_THROW );
+ mxTVC = word::getXTextViewCursor( mxModel );
+ mxSelSupp.set( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+}
+
+SwVbaFind::~SwVbaFind()
+{
+}
+
+sal_Bool SwVbaFind::InRange( const uno::Reference< text::XTextRange >& xCurrentRange ) throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRangeCompare > xTRC( mxTextRange->getText(), uno::UNO_QUERY_THROW );
+ if( xTRC->compareRegionStarts( mxTextRange, xCurrentRange ) >= 0 && xTRC->compareRegionEnds( mxTextRange, xCurrentRange ) <= 0 )
+ return sal_True;
+ return sal_False;
+}
+
+sal_Bool SwVbaFind::InEqualRange( const uno::Reference< text::XTextRange >& xCurrentRange ) throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRangeCompare > xTRC( mxTextRange->getText(), uno::UNO_QUERY_THROW );
+ if( xTRC->compareRegionStarts( mxTextRange, xCurrentRange ) == 0 && xTRC->compareRegionEnds( mxTextRange, xCurrentRange ) == 0 )
+ return sal_True;
+ return sal_False;
+}
+
+void SwVbaFind::SetReplaceWith( const rtl::OUString& rText ) throw (uno::RuntimeException)
+{
+ mxPropertyReplace->setReplaceString( rText );
+ mbReplace = sal_True;
+}
+
+rtl::OUString SwVbaFind::GetReplaceWith() throw (uno::RuntimeException)
+{
+ return mxPropertyReplace->getReplaceString();
+}
+void SwVbaFind::SetReplace( sal_Int32 type )
+{
+ mnReplaceType = type;
+ mbReplace = sal_True;
+}
+
+rtl::OUString SwVbaFind::ReplaceWildcards( const rtl::OUString& /*rText*/ ) throw ( uno::RuntimeException )
+{
+ // TODO:
+ return rtl::OUString();
+}
+
+uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xFoundOne;
+ if( mxTVC->getString().getLength() > 0 )
+ {
+ if( getForward() )
+ {
+ xFoundOne.set( mxReplaceable->findNext( mxTextRange->getStart(), uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) ), uno::UNO_QUERY );
+ }
+ else
+ {
+ xFoundOne.set( mxReplaceable->findNext( mxTextRange->getEnd(), uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) ), uno::UNO_QUERY );
+ }
+
+ if( xFoundOne.is() && InEqualRange( xFoundOne ) )
+ {
+ xFoundOne.set( mxReplaceable->findNext( xFoundOne, uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) ), uno::UNO_QUERY );
+ }
+ else if( xFoundOne.is() && !InRange( xFoundOne ) )
+ {
+ xFoundOne = uno::Reference< text::XTextRange >();
+ }
+ }
+ else
+ {
+ xFoundOne.set( mxReplaceable->findNext( mxTextRange, uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) ), uno::UNO_QUERY );
+ }
+
+ if( !xFoundOne.is() && ( getWrap() == word::WdFindWrap::wdFindContinue || getWrap() == word::WdFindWrap::wdFindAsk ) )
+ {
+ if( getForward() )
+ {
+ mxTVC->gotoStart(sal_False);
+ xFoundOne.set( mxReplaceable->findNext( mxTextRange->getStart(), uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) ), uno::UNO_QUERY );
+ }
+ else
+ {
+ mxTVC->gotoEnd( sal_False );
+ xFoundOne.set( mxReplaceable->findNext( mxTextRange->getEnd(), uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) ), uno::UNO_QUERY );
+
+ }
+ }
+ return xFoundOne;
+}
+
+sal_Bool SwVbaFind::SearchReplace() throw (uno::RuntimeException)
+{
+ sal_Bool result = sal_False;
+
+ // TODO: map wildcards in area to OOo wildcards
+
+ if( mbReplace )
+ {
+ switch( mnReplaceType )
+ {
+ case word::WdReplace::wdReplaceNone:
+ {
+ result = sal_True;
+ break;
+ }
+ case word::WdReplace::wdReplaceOne:
+ {
+ uno::Reference< text::XTextRange > xFindOne = FindOneElement();
+ if( xFindOne.is() )
+ {
+ xFindOne->setString( GetReplaceWith() );
+ result = mxSelSupp->select( uno::makeAny( xFindOne ) );
+ }
+ break;
+ }
+ case word::WdReplace::wdReplaceAll:
+ {
+ uno::Reference< container::XIndexAccess > xIndexAccess = mxReplaceable->findAll( uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) );
+ if( xIndexAccess->getCount() > 0 )
+ {
+ for( sal_Int32 i = 0; i < xIndexAccess->getCount(); i++ )
+ {
+ uno::Reference< text::XTextRange > xTextRange( xIndexAccess->getByIndex( i ), uno::UNO_QUERY_THROW );
+ if( mnWrap == word::WdFindWrap::wdFindContinue || mnWrap == word::WdFindWrap::wdFindAsk || InRange( xTextRange ) )
+ {
+ xTextRange->setString( GetReplaceWith() );
+ result = sal_True;
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ result = sal_False;
+ }
+ }
+ }
+ else
+ {
+ uno::Reference< text::XTextRange > xFindOne = FindOneElement();
+ if( xFindOne.is() )
+ result = mxSelSupp->select( uno::makeAny( xFindOne ) );
+ }
+
+ return result;
+}
+
+::rtl::OUString SAL_CALL SwVbaFind::getText() throw (uno::RuntimeException)
+{
+ return mxPropertyReplace->getSearchString();
+}
+
+void SAL_CALL SwVbaFind::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeException)
+{
+ mxPropertyReplace->setSearchString( _text );
+}
+
+uno::Any SAL_CALL SwVbaFind::getReplacement() throw (uno::RuntimeException)
+{
+ return uno::makeAny( uno::Reference< word::XReplacement >( new SwVbaReplacement( this, mxContext, mxPropertyReplace ) ) );
+}
+
+void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+::sal_Bool SAL_CALL SwVbaFind::getForward() throw (uno::RuntimeException)
+{
+ sal_Bool bBackward = sal_False;
+ mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchBackwards") ) ) >>= bBackward;
+ return !bBackward;
+}
+
+void SAL_CALL SwVbaFind::setForward( ::sal_Bool _forward ) throw (uno::RuntimeException)
+{
+ sal_Bool bBackward = !_forward;
+ mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchBackwards") ), uno::makeAny( bBackward ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaFind::getWrap() throw (uno::RuntimeException)
+{
+ // seems not supported in Writer
+ return mnWrap;
+}
+
+void SAL_CALL SwVbaFind::setWrap( ::sal_Int32 _wrap ) throw (uno::RuntimeException)
+{
+ // seems not supported in Writer
+ mnWrap = _wrap;
+}
+
+::sal_Bool SAL_CALL SwVbaFind::getFormat() throw (uno::RuntimeException)
+{
+ return mxPropertyReplace->getValueSearch();
+}
+
+void SAL_CALL SwVbaFind::setFormat( ::sal_Bool _format ) throw (uno::RuntimeException)
+{
+ mxPropertyReplace->setValueSearch( _format );
+}
+
+::sal_Bool SAL_CALL SwVbaFind::getMatchCase() throw (uno::RuntimeException)
+{
+ sal_Bool value = sal_False;
+ mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchCaseSensitive") ) ) >>= value;
+ return value;
+}
+
+void SAL_CALL SwVbaFind::setMatchCase( ::sal_Bool _matchcase ) throw (uno::RuntimeException)
+{
+ mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchCaseSensitive") ), uno::makeAny( _matchcase ) );
+}
+
+::sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() throw (uno::RuntimeException)
+{
+ sal_Bool value = sal_False;
+ mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchWords") ) ) >>= value;
+ return value;
+}
+
+void SAL_CALL SwVbaFind::setMatchWholeWord( ::sal_Bool _matchwholeword ) throw (uno::RuntimeException)
+{
+ mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchWords") ), uno::makeAny( _matchwholeword ) );
+}
+
+::sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() throw (uno::RuntimeException)
+{
+ sal_Bool value = sal_False;
+ mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchRegularExpression") ) ) >>= value;
+ return value;
+}
+
+void SAL_CALL SwVbaFind::setMatchWildcards( ::sal_Bool _matchwildcards ) throw (uno::RuntimeException)
+{
+ mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchRegularExpression") ), uno::makeAny( _matchwildcards ) );
+}
+
+::sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() throw (uno::RuntimeException)
+{
+ sal_Bool value = sal_False;
+ mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ) ) >>= value;
+ return value;
+}
+
+void SAL_CALL SwVbaFind::setMatchSoundsLike( ::sal_Bool _matchsoundslike ) throw (uno::RuntimeException)
+{
+ // seems not accurate
+ mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ), uno::makeAny( _matchsoundslike ) );
+}
+
+::sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() throw (uno::RuntimeException)
+{
+ sal_Bool value = sal_False;
+ mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ) ) >>= value;
+ if( value )
+ mxPropertyReplace->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarityRelax") ) ) >>= value;
+ return value;
+}
+
+void SAL_CALL SwVbaFind::setMatchAllWordForms( ::sal_Bool _matchallwordforms ) throw (uno::RuntimeException)
+{
+ // seems not accurate
+ mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarity") ), uno::makeAny( _matchallwordforms ) );
+ mxPropertyReplace->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SearchSimilarityRelax") ), uno::makeAny( _matchallwordforms ) );
+}
+
+uno::Any SAL_CALL SwVbaFind::getStyle() throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+sal_Bool SAL_CALL
+SwVbaFind::Execute( const uno::Any& FindText, const uno::Any& MatchCase, const uno::Any& MatchWholeWord, const uno::Any& MatchWildcards, const uno::Any& MatchSoundsLike, const uno::Any& MatchAllWordForms, const uno::Any& Forward, const uno::Any& Wrap, const uno::Any& Format, const uno::Any& ReplaceWith, const uno::Any& Replace, const uno::Any& /*MatchKashida*/, const uno::Any& /*MatchDiacritics*/, const uno::Any& /*MatchAlefHamza*/, const uno::Any& /*MatchControl*/, const uno::Any& /*MatchPrefix*/, const uno::Any& /*MatchSuffix*/, const uno::Any& /*MatchPhrase*/, const uno::Any& /*IgnoreSpace*/, const uno::Any& /*IgnorePunct*/ ) throw (uno::RuntimeException)
+{
+ sal_Bool result = sal_False;
+ if( FindText.hasValue() )
+ {
+ rtl::OUString sText;
+ FindText >>= sText;
+ setText( sText );
+ }
+
+ sal_Bool bValue = sal_False;
+ if( MatchCase.hasValue() )
+ {
+ MatchCase >>= bValue;
+ setMatchCase( bValue );
+ }
+
+ if( MatchWholeWord.hasValue() )
+ {
+ MatchWholeWord >>= bValue;
+ setMatchWholeWord( bValue );
+ }
+
+ if( MatchWildcards.hasValue() )
+ {
+ MatchWildcards >>= bValue;
+ setMatchWildcards( bValue );
+ }
+
+ if( MatchSoundsLike.hasValue() )
+ {
+ MatchSoundsLike >>= bValue;
+ setMatchSoundsLike( bValue );
+ }
+
+ if( MatchAllWordForms.hasValue() )
+ {
+ MatchAllWordForms >>= bValue;
+ setMatchAllWordForms( bValue );
+ }
+
+ if( Forward.hasValue() )
+ {
+ Forward >>= bValue;
+ setForward( bValue );
+ }
+
+ if( Wrap.hasValue() )
+ {
+ sal_Int32 nWrapType = 0;
+ Wrap >>= nWrapType;
+ setWrap( nWrapType );
+ }
+
+ if( Format.hasValue() )
+ {
+ Format >>= bValue;
+ setFormat( bValue );
+ }
+
+ if( ReplaceWith.hasValue() )
+ {
+ rtl::OUString sValue;
+ ReplaceWith >>= sValue;
+ SetReplaceWith( sValue );
+ }
+
+ if( Replace.hasValue() )
+ {
+ sal_Int32 nValue(0);
+ Replace >>= nValue;
+ SetReplace( nValue );
+ }
+
+ result = SearchReplace();
+
+ return result;
+}
+
+void SAL_CALL
+SwVbaFind::ClearFormatting( ) throw (uno::RuntimeException)
+{
+ uno::Sequence< beans::PropertyValue > aSearchAttribs;
+ mxPropertyReplace->setSearchAttributes( aSearchAttribs );
+}
+
+rtl::OUString&
+SwVbaFind::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFind") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaFind::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Find" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx
new file mode 100644
index 000000000000..1252050c7823
--- /dev/null
+++ b/sw/source/ui/vba/vbafind.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * 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_VBA_FIND_HXX
+#define SW_VBA_FIND_HXX
+
+#include <ooo/vba/word/XFind.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/util/XReplaceable.hpp>
+#include <com/sun/star/util/XPropertyReplace.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XFind > SwVbaFind_BASE;
+
+class SwVbaFind : public SwVbaFind_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XTextRange > mxTextRange;
+ css::uno::Reference< css::util::XReplaceable > mxReplaceable;
+ css::uno::Reference< css::util::XPropertyReplace> mxPropertyReplace;
+ css::uno::Reference< css::text::XTextViewCursor> mxTVC;
+ css::uno::Reference< css::view::XSelectionSupplier> mxSelSupp;
+ sal_Bool mbReplace;
+ sal_Int32 mnReplaceType;
+ sal_Int32 mnWrap;
+
+private:
+ sal_Bool InRange( const css::uno::Reference< css::text::XTextRange >& xCurrentRange ) throw ( css::uno::RuntimeException );
+ sal_Bool InEqualRange( const css::uno::Reference< css::text::XTextRange >& xCurrentRange ) throw ( css::uno::RuntimeException );
+ void SetReplace( sal_Int32 type );
+ void SetReplaceWith( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
+ rtl::OUString GetReplaceWith() throw ( css::uno::RuntimeException );
+ rtl::OUString ReplaceWildcards( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
+ css::uno::Reference< css::text::XTextRange > FindOneElement() throw ( css::uno::RuntimeException );
+ sal_Bool SearchReplace() throw ( css::uno::RuntimeException );
+
+public:
+ SwVbaFind( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextRange >& xTextRange ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaFind();
+
+ // Attributes
+ virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getReplacement() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setReplacement( const css::uno::Any& _replacement ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getForward() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setForward( ::sal_Bool _forward ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getWrap() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setWrap( ::sal_Int32 _wrap ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getFormat() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setFormat( ::sal_Bool _format ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getMatchCase() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMatchCase( ::sal_Bool _matchcase ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getMatchWholeWord() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMatchWholeWord( ::sal_Bool _matchwholeword ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getMatchWildcards() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMatchWildcards( ::sal_Bool _matchwildcards ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getMatchSoundsLike() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMatchSoundsLike( ::sal_Bool _matchsoundslike ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getMatchAllWordForms() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMatchAllWordForms( ::sal_Bool _matchallwordforms ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStyle( const css::uno::Any& _style ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual ::sal_Bool SAL_CALL Execute( const css::uno::Any& FindText, const css::uno::Any& MatchCase, const css::uno::Any& MatchWholeWord, const css::uno::Any& MatchWildcards, const css::uno::Any& MatchSoundsLike, const css::uno::Any& MatchAllWordForms, const css::uno::Any& Forward, const css::uno::Any& Wrap, const css::uno::Any& Format, const css::uno::Any& ReplaceWith, const css::uno::Any& Replace, const css::uno::Any& MatchKashida, const css::uno::Any& MatchDiacritics, const css::uno::Any& MatchAlefHamza, const css::uno::Any& MatchControl, const css::uno::Any& MatchPrefix, const css::uno::Any& MatchSuffix, const css::uno::Any& MatchPhrase, const css::uno::Any& IgnoreSpace, const css::uno::Any& IgnorePunct ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL ClearFormatting( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_FIND_HXX */
diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx
new file mode 100644
index 000000000000..47f39bcbefda
--- /dev/null
+++ b/sw/source/ui/vba/vbafont.cxx
@@ -0,0 +1,216 @@
+#include "vbafont.hxx"
+#include <com/sun/star/awt/FontUnderline.hpp>
+#include <ooo/vba/word/WdUnderline.hpp>
+#include <hash_map>
+#include <ooo/vba/word/WdColorIndex.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+const uno::Any aLongAnyTrue( sal_Int16(-1) );
+const uno::Any aLongAnyFalse( sal_Int16( 0 ) );
+
+struct MapPair
+{
+ sal_Int32 nMSOConst;
+ sal_Int32 nOOOConst;
+};
+
+static MapPair UnderLineTable[] = {
+ { word::WdUnderline::wdUnderlineNone, com::sun::star::awt::FontUnderline::NONE },
+ { word::WdUnderline::wdUnderlineSingle, com::sun::star::awt::FontUnderline::SINGLE },
+ { word::WdUnderline::wdUnderlineWords, com::sun::star::awt::FontUnderline::SINGLE },
+ { word::WdUnderline::wdUnderlineDouble, com::sun::star::awt::FontUnderline::DOUBLE },
+ { word::WdUnderline::wdUnderlineDotted, com::sun::star::awt::FontUnderline::DOTTED },
+ { word::WdUnderline::wdUnderlineThick, com::sun::star::awt::FontUnderline::BOLDDASH },
+ { word::WdUnderline::wdUnderlineDash, com::sun::star::awt::FontUnderline::DASH },
+ { word::WdUnderline::wdUnderlineDotDash, com::sun::star::awt::FontUnderline::DASHDOT },
+ { word::WdUnderline::wdUnderlineDotDotDash, com::sun::star::awt::FontUnderline::DASHDOTDOT },
+ { word::WdUnderline::wdUnderlineWavy, com::sun::star::awt::FontUnderline::WAVE },
+ { word::WdUnderline::wdUnderlineDottedHeavy, com::sun::star::awt::FontUnderline::BOLDDOTTED },
+ { word::WdUnderline::wdUnderlineDashHeavy, com::sun::star::awt::FontUnderline::BOLDDASH },
+ { word::WdUnderline::wdUnderlineDotDashHeavy, com::sun::star::awt::FontUnderline::BOLDDASHDOT },
+ { word::WdUnderline::wdUnderlineDotDotDashHeavy, com::sun::star::awt::FontUnderline::BOLDDASHDOTDOT },
+ { word::WdUnderline::wdUnderlineWavyHeavy, com::sun::star::awt::FontUnderline::BOLDWAVE },
+ { word::WdUnderline::wdUnderlineDashLong, com::sun::star::awt::FontUnderline::LONGDASH },
+ { word::WdUnderline::wdUnderlineWavyDouble, com::sun::star::awt::FontUnderline::DOUBLEWAVE },
+ { word::WdUnderline::wdUnderlineDashLongHeavy, com::sun::star::awt::FontUnderline::BOLDLONGDASH },
+};
+
+typedef std::hash_map< sal_Int32, sal_Int32 > ConstToConst;
+class UnderLineMapper
+{
+ ConstToConst MSO2OOO;
+ ConstToConst OOO2MSO;
+private:
+ UnderLineMapper()
+ {
+ sal_Int32 nLen = sizeof( UnderLineTable )/ sizeof( UnderLineTable[0] );
+
+ for ( sal_Int32 index=0; index<nLen; ++index )
+ {
+ MSO2OOO[ UnderLineTable[ index ].nMSOConst ] = UnderLineTable[ index ].nOOOConst;
+ OOO2MSO[ UnderLineTable[ index ].nOOOConst ] = UnderLineTable[ index ].nMSOConst;
+ }
+ }
+public:
+ static rtl::OUString propName()
+ {
+ static rtl::OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("CharUnderline") );
+ return sPropName;
+ }
+
+ static UnderLineMapper& instance()
+ {
+ static UnderLineMapper theMapper;
+ return theMapper;
+ }
+
+ sal_Int32 getOOOFromMSO( sal_Int32 nMSOConst ) throw( lang::IllegalArgumentException )
+ {
+ ConstToConst::iterator it = MSO2OOO.find( nMSOConst );
+ if ( it == MSO2OOO.end() )
+ throw lang::IllegalArgumentException();
+ return it->second;
+ }
+ sal_Int32 getMSOFromOOO( sal_Int32 nOOOConst ) throw( lang::IllegalArgumentException )
+ {
+ ConstToConst::iterator it = OOO2MSO.find( nOOOConst );
+ if ( it == OOO2MSO.end() )
+ throw lang::IllegalArgumentException();
+ return it->second;
+ }
+};
+
+SwVbaFont::SwVbaFont( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xPalette, uno::Reference< css::beans::XPropertySet > xPropertySet ) throw ( css::uno::RuntimeException ) : SwVbaFont_BASE( xParent, xContext, xPalette, xPropertySet )
+{
+}
+
+uno::Any SAL_CALL
+SwVbaFont::getUnderline() throw (uno::RuntimeException)
+{
+ sal_Int32 nOOVal = 0;
+ mxFont->getPropertyValue( UnderLineMapper::propName() ) >>= nOOVal;
+ return uno::makeAny( UnderLineMapper::instance().getMSOFromOOO( nOOVal ) );
+}
+
+void SAL_CALL
+SwVbaFont::setUnderline( const uno::Any& _underline ) throw (uno::RuntimeException)
+{
+ sal_Int32 nMSOVal = 0;
+
+ if ( _underline >>= nMSOVal )
+ {
+ sal_Int32 nOOVal = UnderLineMapper::instance().getOOOFromMSO( nMSOVal );
+ mxFont->setPropertyValue( UnderLineMapper::propName(), uno::makeAny( nOOVal ) );
+ }
+}
+
+rtl::OUString&
+SwVbaFont::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFont") );
+ return sImplName;
+}
+
+void SAL_CALL
+SwVbaFont::setColorIndex( const uno::Any& _colorindex ) throw( uno::RuntimeException )
+{
+ sal_Int32 nIndex = 0;
+ _colorindex >>= nIndex;
+ return setColor( OORGBToXLRGB(mxPalette->getByIndex( nIndex )) );
+}
+
+uno::Any SAL_CALL
+SwVbaFont::getColorIndex() throw ( uno::RuntimeException )
+{
+ sal_Int32 nColor = 0;
+
+ XLRGBToOORGB( getColor() ) >>= nColor;
+ sal_Int32 nElems = mxPalette->getCount();
+ sal_Int32 nIndex = 0;
+ for ( sal_Int32 count=0; count<nElems; ++count )
+ {
+ sal_Int32 nPaletteColor = 0;
+ mxPalette->getByIndex( count ) >>= nPaletteColor;
+ if ( nPaletteColor == nColor )
+ {
+ nIndex = count;
+ break;
+ }
+ }
+ return uno::makeAny( nIndex );
+}
+uno::Any SAL_CALL
+SwVbaFont::getSubscript() throw ( uno::RuntimeException )
+{
+ sal_Bool bRes = sal_False;
+ SwVbaFont_BASE::getSubscript() >>= bRes;
+ if ( bRes )
+ return aLongAnyTrue;
+ return aLongAnyFalse;
+}
+
+uno::Any SAL_CALL
+SwVbaFont::getSuperscript() throw ( uno::RuntimeException )
+{
+ sal_Bool bRes = sal_False;
+ SwVbaFont_BASE::getSuperscript() >>= bRes;
+ if ( bRes )
+ return aLongAnyTrue;
+ return aLongAnyFalse;
+}
+
+uno::Any SAL_CALL
+SwVbaFont::getBold() throw (uno::RuntimeException)
+{
+ sal_Bool bRes = sal_False;
+ SwVbaFont_BASE::getBold() >>= bRes;
+ if ( bRes )
+ return aLongAnyTrue;
+ return aLongAnyFalse;
+}
+
+uno::Any SAL_CALL
+SwVbaFont::getItalic() throw (uno::RuntimeException)
+{
+ sal_Bool bRes = sal_False;
+ SwVbaFont_BASE::getItalic() >>= bRes;
+ if ( bRes )
+ return aLongAnyTrue;
+ return aLongAnyFalse;
+}
+
+uno::Any SAL_CALL
+SwVbaFont::getStrikethrough() throw (css::uno::RuntimeException)
+{
+ sal_Bool bRes = sal_False;
+ SwVbaFont_BASE::getStrikethrough() >>= bRes;
+ if ( bRes )
+ return aLongAnyTrue;
+ return aLongAnyFalse;
+}
+
+uno::Any SAL_CALL
+SwVbaFont::getShadow() throw (uno::RuntimeException)
+{
+ sal_Bool bRes = sal_False;
+ SwVbaFont_BASE::getShadow() >>= bRes;
+ if ( bRes )
+ return aLongAnyTrue;
+ return aLongAnyFalse;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaFont::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Font" ) );
+ }
+ return aServiceNames;
+}
+
+
diff --git a/sw/source/ui/vba/vbafont.hxx b/sw/source/ui/vba/vbafont.hxx
new file mode 100644
index 000000000000..1500c2a314dd
--- /dev/null
+++ b/sw/source/ui/vba/vbafont.hxx
@@ -0,0 +1,31 @@
+#ifndef VBA_FONT_HXX
+#define VBA_FONT_HXX
+
+#include <vbahelper/vbafontbase.hxx>
+#include <ooo/vba/word/XFont.hpp>
+
+typedef cppu::ImplInheritanceHelper1< VbaFontBase, ov::word::XFont > SwVbaFont_BASE;
+
+class SwVbaFont : public SwVbaFont_BASE
+{
+public:
+ SwVbaFont( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xPalette, css::uno::Reference< css::beans::XPropertySet > xPropertySet ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaFont(){}
+
+ // Attributes
+ virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getColorIndex() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getUnderline() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setUnderline( const css::uno::Any& _underline ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getSubscript() throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL getSuperscript() throw ( css::uno::RuntimeException );
+
+ virtual css::uno::Any SAL_CALL getBold() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getItalic() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getStrikethrough() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getShadow() throw (css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif
diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx
new file mode 100644
index 000000000000..b95c5e5c9e3d
--- /dev/null
+++ b/sw/source/ui/vba/vbaglobals.cxx
@@ -0,0 +1,193 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include <vbahelper/helperdecl.hxx>
+#include "vbaglobals.hxx"
+
+#include <comphelper/unwrapargs.hxx>
+
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <cppuhelper/bootstrap.hxx>
+#include "vbaapplication.hxx"
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::ooo::vba;
+
+
+rtl::OUString sDocCtxName( RTL_CONSTASCII_USTRINGPARAM("WordDocumentContext") );
+
+// =============================================================================
+// SwVbaGlobals
+// =============================================================================
+
+SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : SwVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, sDocCtxName )
+{
+ OSL_TRACE("SwVbaGlobals::SwVbaGlobals()");
+ uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
+ aInitArgs[ 0 ].Name = rtl::OUString::createFromAscii("Application");
+ aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
+ aInitArgs[ 1 ].Name = sDocCtxName;
+ aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
+
+ init( aInitArgs );
+}
+
+SwVbaGlobals::~SwVbaGlobals()
+{
+ OSL_TRACE("SwVbaGlobals::~SwVbaGlobals");
+}
+
+// =============================================================================
+// XGlobals
+// =============================================================================
+uno::Reference<word::XApplication >
+SwVbaGlobals::getApplication() throw (uno::RuntimeException)
+{
+ OSL_TRACE("In SwVbaGlobals::getApplication");
+ if ( !mxApplication.is() )
+ mxApplication.set( new SwVbaApplication( mxContext) );
+
+ return mxApplication;
+}
+
+uno::Reference<word::XSystem > SAL_CALL
+SwVbaGlobals::getSystem() throw (uno::RuntimeException)
+{
+ return getApplication()->getSystem();
+}
+
+uno::Reference< word::XDocument > SAL_CALL
+SwVbaGlobals::getActiveDocument() throw (uno::RuntimeException)
+{
+ return getApplication()->getActiveDocument();
+}
+
+uno::Reference< word::XWindow > SAL_CALL
+SwVbaGlobals::getActiveWindow() throw (uno::RuntimeException)
+{
+ return getApplication()->getActiveWindow();
+}
+
+rtl::OUString SAL_CALL
+SwVbaGlobals::getName() throw (uno::RuntimeException)
+{
+ return getApplication()->getName();
+}
+
+uno::Reference<word::XOptions > SAL_CALL
+SwVbaGlobals::getOptions() throw (uno::RuntimeException)
+{
+ return getApplication()->getOptions();
+}
+
+uno::Any SAL_CALL
+SwVbaGlobals::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ return getApplication()->CommandBars( aIndex );
+}
+
+uno::Any SAL_CALL
+SwVbaGlobals::Documents( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ return getApplication()->Documents( index );
+}
+
+uno::Any SAL_CALL
+SwVbaGlobals::Addins( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ return getApplication()->Addins( index );
+}
+
+uno::Any SAL_CALL
+SwVbaGlobals::Dialogs( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ return getApplication()->Dialogs( index );
+}
+
+uno::Reference<word::XSelection > SAL_CALL
+SwVbaGlobals::getSelection() throw (uno::RuntimeException)
+{
+ return getApplication()->getSelection();
+}
+
+float SAL_CALL SwVbaGlobals::CentimetersToPoints( float _Centimeters ) throw (uno::RuntimeException)
+{
+ return getApplication()->CentimetersToPoints( _Centimeters );
+}
+
+rtl::OUString&
+SwVbaGlobals::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaGlobals") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaGlobals::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals" ) );
+ }
+ return aServiceNames;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
+{
+ static bool bInit = false;
+ static uno::Sequence< rtl::OUString > serviceNames( SwVbaGlobals_BASE::getAvailableServiceNames() );
+ if ( !bInit )
+ {
+ rtl::OUString names[] = {
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.word.Document" ) ),
+// #FIXME #TODO make Application a proper service
+// ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.word.Application" ) ),
+ };
+ sal_Int32 nWordServices = ( sizeof( names )/ sizeof( names[0] ) );
+ sal_Int32 startIndex = serviceNames.getLength();
+ serviceNames.realloc( serviceNames.getLength() + nWordServices );
+ for ( sal_Int32 index = 0; index < nWordServices; ++index )
+ serviceNames[ startIndex + index ] = names[ index ];
+ bInit = true;
+ }
+ return serviceNames;
+}
+
+namespace globals
+{
+namespace sdecl = comphelper::service_decl;
+sdecl::vba_service_class_<SwVbaGlobals, sdecl::with_args<true> > serviceImpl;
+extern sdecl::ServiceDecl const serviceDecl(
+ serviceImpl,
+ "SwVbaGlobals",
+ "ooo.vba.word.Globals" );
+}
+
diff --git a/sw/source/ui/vba/vbaglobals.hxx b/sw/source/ui/vba/vbaglobals.hxx
new file mode 100644
index 000000000000..9bb2e8fa606d
--- /dev/null
+++ b/sw/source/ui/vba/vbaglobals.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * 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_VBA_GLOBALS_HXX
+#define SW_VBA_GLOBALS_HXX
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <ooo/vba/word/XGlobals.hpp>
+#include <ooo/vba/word/XApplication.hpp>
+#include <ooo/vba/word/XSystem.hpp>
+#include <ooo/vba/word/XOptions.hpp>
+#include <ooo/vba/word/XSelection.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <vbahelper/vbahelper.hxx>
+#include <vbahelper/vbaglobalbase.hxx>
+
+// =============================================================================
+// class SwVbaGlobals
+// =============================================================================
+
+
+typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::word::XGlobals > SwVbaGlobals_BASE;
+
+class SwVbaGlobals : public SwVbaGlobals_BASE
+{
+private:
+ css::uno::Reference< ooo::vba::word::XApplication > mxApplication;
+
+ virtual css::uno::Reference< ooo::vba::word::XApplication > getApplication() throw (css::uno::RuntimeException);
+
+public:
+
+ SwVbaGlobals( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& rxContext );
+ virtual ~SwVbaGlobals();
+
+ // XGlobals
+ virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::word::XDocument > SAL_CALL getActiveDocument() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
+ // XMultiServiceFactory
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_GLOBALS_HXX */
diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx
new file mode 100644
index 000000000000..6fb7061c573f
--- /dev/null
+++ b/sw/source/ui/vba/vbaheaderfooter.cxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaheaderfooter.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <ooo/vba/word/WdHeaderFooterIndex.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include "vbarange.hxx"
+#include <vbahelper/vbashapes.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaHeaderFooter::SwVbaHeaderFooter( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& rProps, sal_Bool isHeader, sal_Int32 index ) throw ( uno::RuntimeException ) : SwVbaHeaderFooter_BASE( rParent, rContext ), mxModel( xModel ), mxPageStyleProps( rProps ), mbHeader( isHeader ), mnIndex( index )
+{
+}
+
+sal_Bool SAL_CALL SwVbaHeaderFooter::getIsHeader() throw (uno::RuntimeException)
+{
+ return mbHeader;
+}
+
+sal_Bool SAL_CALL SwVbaHeaderFooter::getLinkToPrevious() throw (uno::RuntimeException)
+{
+ // seems always false
+ return sal_False;
+}
+
+void SAL_CALL SwVbaHeaderFooter::setLinkToPrevious( ::sal_Bool /*_linktoprevious*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+uno::Reference< word::XRange > SAL_CALL SwVbaHeaderFooter::getRange() throw (uno::RuntimeException)
+{
+ rtl::OUString sPropsNameText;
+ if( mbHeader )
+ {
+ sPropsNameText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderText") );
+ }
+ else
+ {
+ sPropsNameText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterText") );
+ }
+ if( mnIndex == word::WdHeaderFooterIndex::wdHeaderFooterEvenPages )
+ {
+ sPropsNameText.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Left") ) );
+ }
+
+ uno::Reference< text::XText > xText( mxPageStyleProps->getPropertyValue( sPropsNameText ), uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextDocument > xDocument( mxModel, uno::UNO_QUERY_THROW );
+ return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, xDocument, xText->getStart(), xText->getEnd(), xText ) );
+}
+
+uno::Any SAL_CALL
+SwVbaHeaderFooter::Shapes( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxModel, uno::UNO_QUERY_THROW );
+ //uno::Reference< drawing::XShapes > xShapes( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new ScVbaShapes( this, mxContext, xIndexAccess, mxModel ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+rtl::OUString&
+SwVbaHeaderFooter::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaHeaderFooter") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaHeaderFooter::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Pane" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbaheaderfooter.hxx b/sw/source/ui/vba/vbaheaderfooter.hxx
new file mode 100644
index 000000000000..dba10ff767d8
--- /dev/null
+++ b/sw/source/ui/vba/vbaheaderfooter.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * 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_VBA_HEADERFOOTER_HXX
+#define SW_VBA_HEADERFOOTER_HXX
+
+#include <ooo/vba/word/XHeaderFooter.hpp>
+#include <ooo/vba/word/XRange.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XHeaderFooter > SwVbaHeaderFooter_BASE;
+
+class SwVbaHeaderFooter : public SwVbaHeaderFooter_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::beans::XPropertySet > mxPageStyleProps;
+ sal_Bool mbHeader;
+ sal_Int32 mnIndex;
+
+public:
+ SwVbaHeaderFooter( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, sal_Bool isHeader, sal_Int32 index ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaHeaderFooter(){}
+
+ // Attributes
+ virtual ::sal_Bool SAL_CALL getIsHeader() throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getLinkToPrevious() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLinkToPrevious( ::sal_Bool _linktoprevious ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ::ooo::vba::word::XRange > SAL_CALL getRange() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Shapes( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_HEADERFOOTER_HXX */
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
new file mode 100644
index 000000000000..240bba8d900b
--- /dev/null
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaheaderfooterhelper.hxx"
+#include "wordvbahelper.hxx"
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+#define FIRST_PAGE 1;
+
+// Class HeaderFooterHelper
+
+sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
+
+ sal_Bool isOn = sal_False;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isOn;
+ if( !isOn )
+ return sal_False;
+
+ sal_Bool isShared = sal_False;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared"))) >>= isShared;
+
+ rtl::OUString aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderText") );
+ if( !isShared )
+ {
+ if( 0 == xPageCursor->getPage() % 2 )
+ {
+ aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextLeft") );
+ }
+ else
+ {
+ aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextRight") );
+ }
+ }
+
+ uno::Reference< text::XText > xText( xStyleProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW );
+ //FIXME: can not compare in this way?
+ return ( xText == xCurrentText );
+}
+
+sal_Bool HeaderFooterHelper::isFirstPageHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ if( isHeader( xModel, xCurrentText ) )
+ {
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ // FIXME: getPage allways returns 1
+ sal_Int32 nPage = xPageCursor->getPage();
+ return nPage == FIRST_PAGE;
+ }
+ return sal_False;
+}
+
+sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ if( isHeader( xModel, xCurrentText ) )
+ {
+ uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
+ sal_Bool isShared = sal_False;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared"))) >>= isShared;
+ if( !isShared )
+ {
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ return ( 0 == xPageCursor->getPage() % 2 );
+ }
+ }
+ return sal_False;
+}
+
+sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
+
+ sal_Bool isOn = sal_False;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isOn;
+ if( !isOn )
+ return sal_False;
+
+ sal_Bool isShared = sal_False;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared"))) >>= isShared;
+
+ rtl::OUString aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterText") );
+ if( !isShared )
+ {
+ if( 0 == xPageCursor->getPage() % 2 )
+ {
+ aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterTextLeft") );
+ }
+ else
+ {
+ aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterTextRight") );
+ }
+ }
+
+ uno::Reference< text::XText > xText( xStyleProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW );
+
+ return ( xText == xCurrentText );
+}
+
+sal_Bool HeaderFooterHelper::isFirstPageFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ if( isFooter( xModel, xCurrentText ) )
+ {
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ sal_Int32 nPage = xPageCursor->getPage();
+ return nPage == FIRST_PAGE;
+ }
+ return sal_False;
+}
+
+sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ if( isFooter( xModel, xCurrentText ) )
+ {
+ uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
+ sal_Bool isShared = sal_False;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared"))) >>= isShared;
+ if( !isShared )
+ {
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ return ( 0 == xPageCursor->getPage() % 2 );
+ }
+ }
+ return sal_False;
+}
+
+sal_Bool HeaderFooterHelper::isPrimaryHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ if( isHeader( xModel, xCurrentText ) )
+ {
+ return( !( isFirstPageHeader( xModel, xCurrentText ) && isEvenPagesHeader( xModel, xCurrentText ) ) );
+ }
+ return sal_False;
+}
+
+sal_Bool HeaderFooterHelper::isPrimaryFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+{
+ if( isHeader( xModel, xCurrentText ) )
+ {
+ return( !( isFirstPageFooter( xModel, xCurrentText ) && isEvenPagesFooter( xModel, xCurrentText ) ) );
+ }
+ return sal_False;
+}
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
new file mode 100644
index 000000000000..30f4a0222549
--- /dev/null
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * 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_WORD_VBA_HEADERFOOTERHELPER_HXX
+#define SW_WORD_VBA_HEADERFOOTERHELPER_HXX
+
+#include <vbahelper/vbahelper.hxx>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/style/XStyle.hpp>
+
+class HeaderFooterHelper
+{
+public:
+ static sal_Bool isHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+ static sal_Bool isFirstPageHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+ static sal_Bool isEvenPagesHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+ static sal_Bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+ static sal_Bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+ static sal_Bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+ static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+ static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+};
+
+#endif
diff --git a/sw/source/ui/vba/vbainformationhelper.cxx b/sw/source/ui/vba/vbainformationhelper.cxx
new file mode 100644
index 000000000000..6fdf8f9f9449
--- /dev/null
+++ b/sw/source/ui/vba/vbainformationhelper.cxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbainformationhelper.hxx"
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "wordvbahelper.hxx"
+#include <docsh.hxx>
+#include <doc.hxx>
+#include <vbahelper/vbahelper.hxx>
+#include <swtypes.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+static const sal_Int32 DEFAULT_PAGE_DISTANCE = 500;
+
+sal_Int32 SwVbaInformationHelper::handleWdActiveEndPageNumber( const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor ) throw( css::uno::RuntimeException )
+{
+ uno::Reference< text::XPageCursor > xPageCursor( xTVCursor, uno::UNO_QUERY_THROW );
+ return xPageCursor->getPage();
+}
+
+sal_Int32 SwVbaInformationHelper::handleWdNumberOfPagesInDocument( const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException )
+{
+ return word::getPageCount( xModel );
+}
+
+double SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor ) throw( css::uno::RuntimeException )
+{
+ xTVCursor->collapseToStart();
+ uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
+ sal_Int32 nTopMargin = 0;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ) ) >>= nTopMargin;
+ sal_Int32 nCurrentPos = xTVCursor->getPosition().Y;
+
+ sal_Int32 nCurrentPage = handleWdActiveEndPageNumber( xTVCursor );
+ sal_Int32 nPageHeight = word::getDocShell( xModel )->GetDoc()->GetPageSize( nCurrentPage, sal_False ).Height();
+ // FIXME: handle multipul page style
+ // it is very strange that the curros position is incorrect when open Word file.
+ // e.g. if current cursor in the top left of the text body of the first page without header,
+ // the top value of current position should be 0, but is 201 when open a Word file.
+ nCurrentPos = nCurrentPos + nTopMargin - ( DEFAULT_PAGE_DISTANCE + TWIP_TO_MM100( nPageHeight ) ) * ( nCurrentPage - 1 );
+ return Millimeter::getInPoints( nCurrentPos );
+}
diff --git a/sw/source/ui/vba/vbainformationhelper.hxx b/sw/source/ui/vba/vbainformationhelper.hxx
new file mode 100644
index 000000000000..6aeb8439812b
--- /dev/null
+++ b/sw/source/ui/vba/vbainformationhelper.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * 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_VBA_INFORMATIONHELPER_HXX
+#define SW_VBA_INFORMATIONHELPER_HXX
+
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+class SwVbaInformationHelper
+{
+public:
+ static sal_Int32 handleWdActiveEndPageNumber( const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor ) throw( css::uno::RuntimeException );
+ static sal_Int32 handleWdNumberOfPagesInDocument( const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException );
+ static double handleWdVerticalPositionRelativeToPage( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor ) throw( css::uno::RuntimeException );
+ //static double verticalPositionRelativeToPageBoundary( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor, const css::uno::Reference< css::beans::XPropertySet >& xStyleProps ) throw( css::uno::RuntimeException );
+
+};
+#endif /* SW_VBA_INFORMATIONHELPER_HXX */
diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx
new file mode 100644
index 000000000000..d59d0326cf5e
--- /dev/null
+++ b/sw/source/ui/vba/vbaoptions.cxx
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaoptions.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <ooo/vba/word/WdDefaultFilePath.hpp>
+#include <ooo/vba/word/WdLineStyle.hpp>
+#include <ooo/vba/word/WdLineWidth.hpp>
+#include <ooo/vba/word/WdColorIndex.hpp>
+#include <com/sun/star/util/XStringSubstitution.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <osl/file.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaOptions::SwVbaOptions( uno::Reference<uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : SwVbaOptions_BASE( uno::Reference< XHelperInterface >(), xContext )
+{
+ mxFactory.set( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+}
+
+SwVbaOptions::~SwVbaOptions()
+{
+}
+
+uno::Any SAL_CALL
+SwVbaOptions::DefaultFilePath( sal_Int32 _path ) throw ( uno::RuntimeException )
+{
+ switch( _path )
+ {
+ case word::WdDefaultFilePath::wdDocumentsPath:
+ {
+ msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work") );
+ break;
+ }
+ case word::WdDefaultFilePath::wdPicturesPath:
+ {
+ msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Gallery") );
+ break;
+ }
+ case word::WdDefaultFilePath::wdUserTemplatesPath:
+ case word::WdDefaultFilePath::wdWorkgroupTemplatesPath:
+ {
+ msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Template") );
+ break;
+ }
+ case word::WdDefaultFilePath::wdStartupPath:
+ {
+ msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Addin") );
+ break;
+ }
+ case word::WdDefaultFilePath::wdUserOptionsPath:
+ {
+ msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserConfig") );
+ break;
+ }
+ case word::WdDefaultFilePath::wdToolsPath:
+ case word::WdDefaultFilePath::wdProgramPath:
+ {
+ msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Module") );
+ break;
+ }
+ case word::WdDefaultFilePath::wdTempFilePath:
+ {
+ msDefaultFilePath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Temp") );
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception( SbERR_NOT_IMPLEMENTED, rtl::OUString() );
+ break;
+ }
+ }
+ return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) );
+}
+
+void SwVbaOptions::setValueEvent( const uno::Any& value )
+{
+ rtl::OUString sNewPath;
+ value >>= sNewPath;
+ rtl::OUString sNewPathUrl;
+ ::osl::File::getFileURLFromSystemPath( sNewPath, sNewPathUrl );
+ uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW );
+ rtl::OUString sOldPathUrl;
+ xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sOldPathUrl;
+ // path could be a multipath, Microsoft doesn't support this feature in Word currently
+ // only the last path is from interest.
+ sal_Int32 nIndex = sOldPathUrl.lastIndexOf( sal_Unicode(';') );
+ if( nIndex != -1 )
+ {
+ sNewPathUrl = sOldPathUrl.copy( 0, nIndex + 1 ).concat( sNewPathUrl );
+ }
+ xPathSettings->setPropertyValue( msDefaultFilePath, uno::makeAny( sNewPathUrl ) );
+}
+
+uno::Any SwVbaOptions::getValueEvent()
+{
+ uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW );
+ rtl::OUString sPathUrl;
+ xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sPathUrl;
+ // path could be a multipath, Microsoft doesn't support this feature in Word currently
+ // only the last path is from interest.
+ sal_Int32 nIndex = sPathUrl.lastIndexOf( sal_Unicode(';') );
+ if( nIndex != -1 )
+ {
+ sPathUrl = sPathUrl.copy( nIndex + 1 );
+ }
+ rtl::OUString sPath;
+ ::osl::File::getSystemPathFromFileURL( sPathUrl, sPath );
+ return uno::makeAny( sPath );
+}
+
+sal_Int32 SAL_CALL SwVbaOptions::getDefaultBorderLineStyle() throw (uno::RuntimeException)
+{
+ return word::WdLineStyle::wdLineStyleSingle;
+}
+
+void SAL_CALL SwVbaOptions::setDefaultBorderLineStyle( ::sal_Int32 /*_defaultborderlinestyle*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+sal_Int32 SAL_CALL SwVbaOptions::getDefaultBorderLineWidth() throw (uno::RuntimeException)
+{
+ return word::WdLineWidth::wdLineWidth050pt;
+}
+
+void SAL_CALL SwVbaOptions::setDefaultBorderLineWidth( ::sal_Int32 /*_defaultborderlinewidth*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+sal_Int32 SAL_CALL SwVbaOptions::getDefaultBorderColorIndex() throw (uno::RuntimeException)
+{
+ return word::WdColorIndex::wdAuto;
+}
+
+void SAL_CALL SwVbaOptions::setDefaultBorderColorIndex( ::sal_Int32 /*_defaultbordercolorindex*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getReplaceSelection() throw (uno::RuntimeException)
+{
+ return sal_True;
+}
+
+void SAL_CALL SwVbaOptions::setReplaceSelection( ::sal_Bool /*_replaceselection*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getMapPaperSize() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setMapPaperSize( ::sal_Bool /*_mappapersize*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatAsYouTypeApplyHeadings() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatAsYouTypeApplyHeadings( ::sal_Bool /*_autoformatasyoutypeapplyheadings*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatAsYouTypeApplyBulletedLists() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatAsYouTypeApplyBulletedLists( ::sal_Bool /*_autoformatasyoutypeapplybulletedlists*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatAsYouTypeApplyNumberedLists() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatAsYouTypeApplyNumberedLists( ::sal_Bool /*_autoformatasyoutypeapplynumberedlists*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatAsYouTypeFormatListItemBeginning() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatAsYouTypeFormatListItemBeginning( ::sal_Bool /*_autoformatasyoutypeformatlistitembeginning*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatAsYouTypeDefineStyles() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatAsYouTypeDefineStyles( ::sal_Bool /*_autoformatasyoutypedefinestyles*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatApplyHeadings() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatApplyHeadings( ::sal_Bool /*_autoformatapplyheadings*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatApplyLists() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatApplyLists( ::sal_Bool /*_autoformatapplylists*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaOptions::getAutoFormatApplyBulletedLists() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaOptions::setAutoFormatApplyBulletedLists( ::sal_Bool /*_autoformatapplybulletedlists*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+
+rtl::OUString&
+SwVbaOptions::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaOptions") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaOptions::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Options" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbaoptions.hxx b/sw/source/ui/vba/vbaoptions.hxx
new file mode 100644
index 000000000000..ec1f70068e48
--- /dev/null
+++ b/sw/source/ui/vba/vbaoptions.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * 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_VBA_OPTIONS_HXX
+#define SW_VBA_OPTIONS_HXX
+
+#include <ooo/vba/word/XOptions.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <vbahelper/vbapropvalue.hxx>
+#include <comphelper/processfactory.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XOptions > SwVbaOptions_BASE;
+
+class SwVbaOptions : public SwVbaOptions_BASE,
+ public PropListener
+{
+private:
+ rtl::OUString msDefaultFilePath;
+ css::uno::Reference< css::lang::XMultiServiceFactory > mxFactory;
+public:
+ SwVbaOptions( css::uno::Reference< css::uno::XComponentContext >& m_xContext ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaOptions();
+
+ // Attributes
+ virtual ::sal_Int32 SAL_CALL getDefaultBorderLineStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDefaultBorderLineStyle( ::sal_Int32 _defaultborderlinestyle ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDefaultBorderLineWidth() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDefaultBorderLineWidth( ::sal_Int32 _defaultborderlinewidth ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDefaultBorderColorIndex() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDefaultBorderColorIndex( ::sal_Int32 _defaultbordercolorindex ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getReplaceSelection() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setReplaceSelection( ::sal_Bool _replaceselection ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getMapPaperSize() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMapPaperSize( ::sal_Bool _mappapersize ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeApplyHeadings() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatAsYouTypeApplyHeadings( ::sal_Bool _autoformatasyoutypeapplyheadings ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeApplyBulletedLists() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatAsYouTypeApplyBulletedLists( ::sal_Bool _autoformatasyoutypeapplybulletedlists ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeApplyNumberedLists() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatAsYouTypeApplyNumberedLists( ::sal_Bool _autoformatasyoutypeapplynumberedlists ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeFormatListItemBeginning() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatAsYouTypeFormatListItemBeginning( ::sal_Bool _autoformatasyoutypeformatlistitembeginning ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeDefineStyles() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatAsYouTypeDefineStyles( ::sal_Bool _autoformatasyoutypedefinestyles ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatApplyHeadings() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatApplyHeadings( ::sal_Bool _autoformatapplyheadings ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatApplyLists() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatApplyLists( ::sal_Bool _autoformatapplylists ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoFormatApplyBulletedLists() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFormatApplyBulletedLists( ::sal_Bool _autoformatapplybulletedlists ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual css::uno::Any SAL_CALL DefaultFilePath( sal_Int32 _path ) throw ( css::uno::RuntimeException );
+
+ //PropListener
+ virtual void setValueEvent( const css::uno::Any& value );
+ virtual css::uno::Any getValueEvent();
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_OPTIONS_HXX */
diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx
new file mode 100644
index 000000000000..1cdda8152207
--- /dev/null
+++ b/sw/source/ui/vba/vbapagesetup.cxx
@@ -0,0 +1,272 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbapagesetup.hxx"
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <ooo/vba/word/WdSectionStart.hpp>
+#include <ooo/vba/word/WdOrientation.hpp>
+#include "wordvbahelper.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+SwVbaPageSetup::SwVbaPageSetup(const uno::Reference< XHelperInterface >& xParent,
+ const uno::Reference< uno::XComponentContext >& xContext,
+ const uno::Reference< frame::XModel >& xModel,
+ const uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException):
+ SwVbaPageSetup_BASE( xParent, xContext )
+{
+ mxModel.set( xModel, uno::UNO_QUERY_THROW );
+ mxPageProps.set( xProps, uno::UNO_QUERY_THROW );
+ mnOrientPortrait = word::WdOrientation::wdOrientPortrait;
+ mnOrientLandscape = word::WdOrientation::wdOrientLandscape;
+}
+
+double SAL_CALL SwVbaPageSetup::getGutter() throw (uno::RuntimeException)
+{
+ // not support in Writer
+ return 0;
+}
+
+void SAL_CALL SwVbaPageSetup::setGutter( double _gutter ) throw (uno::RuntimeException)
+{
+ // default add gutter into left margin
+ if( _gutter != 0 )
+ {
+ double margin = VbaPageSetupBase::getLeftMargin() + _gutter;
+ VbaPageSetupBase::setLeftMargin( margin );
+ }
+}
+
+double SAL_CALL SwVbaPageSetup::getHeaderDistance() throw (uno::RuntimeException)
+{
+ sal_Bool isHeaderOn = sal_False;
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn;
+ if( !isHeaderOn )
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_True ) );
+ return VbaPageSetupBase::getHeaderMargin();
+}
+
+ /**
+ * changes the value of TopMargin to the value of new MS-Word-HeaderDistance. Subtracts the difference
+ * between old TopMargin and the new headerDistance from the value of HeaderSpacing (which defines the
+ * space between the header and the body of the text). calculates the new HeaderHeight (= height of the
+ * header + headerBodyDistance).
+ *
+ * @param: headerDistance is the value that is set in MS Word for the distance from the top of the page
+ * to the header
+ */
+void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) throw (uno::RuntimeException)
+{
+ sal_Int32 newHeaderDistance = Millimeter::getInHundredthsOfOneMillimeter( _headerdistance );
+ sal_Bool isHeaderOn = sal_False;
+ sal_Int32 aktTopMargin = 0;
+ sal_Int32 aktSpacing = 0;
+ sal_Int32 aktHeaderHeight = 0;
+
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn;
+ if( !isHeaderOn )
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_True ) );
+
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin"))) >>= aktTopMargin;
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance"))) >>= aktSpacing;
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight"))) >>= aktHeaderHeight;
+
+ sal_Int32 newSpacing = aktSpacing - ( newHeaderDistance - aktTopMargin );
+ sal_Int32 height = aktHeaderHeight - aktSpacing;
+ sal_Int32 newHeaderHeight = newSpacing + height;
+
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), uno::makeAny( newHeaderDistance ) );
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance")), uno::makeAny( newSpacing ) );
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")), uno::makeAny( newHeaderHeight ) );
+}
+
+double SAL_CALL SwVbaPageSetup::getFooterDistance() throw (uno::RuntimeException)
+{
+ sal_Bool isFooterOn = sal_False;
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isFooterOn;
+ if( !isFooterOn )
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_True ) );
+ return VbaPageSetupBase::getFooterMargin();
+}
+
+void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw (uno::RuntimeException)
+{
+ sal_Int32 newFooterDistance = Millimeter::getInHundredthsOfOneMillimeter( _footerdistance );
+ sal_Bool isFooterOn = sal_False;
+ sal_Int32 aktBottomMargin = 0;
+ sal_Int32 aktSpacing = 0;
+ sal_Int32 aktFooterHeight = 0;
+
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isFooterOn;
+ if( !isFooterOn )
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_True ) );
+
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin"))) >>= aktBottomMargin;
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance"))) >>= aktSpacing;
+ mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight"))) >>= aktFooterHeight;
+
+ sal_Int32 newSpacing = aktSpacing - ( newFooterDistance - aktBottomMargin );
+ sal_Int32 height = aktFooterHeight - aktSpacing;
+ sal_Int32 newFooterHeight = newSpacing + height;
+
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), uno::makeAny( newFooterDistance ) );
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance")), uno::makeAny( newSpacing ) );
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")), uno::makeAny( newFooterHeight ) );
+}
+
+sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException)
+{
+ rtl::OUString pageStyle = getStyleOfFirstPage();
+ if( pageStyle.equalsAscii( "First Page" ) )
+ return sal_True;
+
+ return sal_False;
+}
+
+void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status ) throw (uno::RuntimeException)
+{
+ if( status == getDifferentFirstPageHeaderFooter() )
+ return;
+
+ rtl::OUString newStyle;
+ if( status )
+ newStyle = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("First Page") );
+ else
+ newStyle = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") );
+
+ uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW );
+ sal_Int32 nTopMargin = 0;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin"))) >>= nTopMargin;
+ sal_Int32 nBottomMargin = 0;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin"))) >>= nBottomMargin;
+ sal_Int32 nLeftMargin = 0;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin"))) >>= nLeftMargin;
+ sal_Int32 nRightMargin = 0;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin"))) >>= nRightMargin;
+ sal_Int32 nHeaderHeight = 0;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight"))) >>= nHeaderHeight;
+ sal_Int32 nFooterHeight = 0;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight"))) >>= nFooterHeight;
+
+ sal_Bool isHeaderOn = sal_False;
+ xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn;
+ if( isHeaderOn )
+ {
+ nTopMargin += nHeaderHeight;
+ nBottomMargin += nFooterHeight;
+ xStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_False ) );
+ xStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_False ) );
+ }
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW );
+ if( xPageCursor->getPage() != 1 )
+ {
+ xPageCursor->jumpToFirstPage();
+ }
+
+ uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ), uno::UNO_QUERY );
+ if( xTableProps.is() )
+ {
+ xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ), uno::makeAny( newStyle ) );
+ }
+ else
+ {
+ xCursorProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ), uno::makeAny( newStyle ) );
+ }
+
+ uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW );
+ xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ), uno::makeAny( nTopMargin ) );
+ xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin") ), uno::makeAny( nBottomMargin ) );
+ xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ), uno::makeAny( nLeftMargin ) );
+ xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ), uno::makeAny( nRightMargin ) );
+}
+
+rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException)
+{
+ rtl::OUString styleFirstPage;
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW );
+ if( xPageCursor->getPage() != 1 )
+ {
+ xPageCursor->jumpToFirstPage();
+ }
+
+ uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ), uno::UNO_QUERY );
+ if( xTableProps.is() )
+ {
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ) ) >>= styleFirstPage;
+ }
+ else
+ {
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ) ) >>= styleFirstPage;
+ }
+ return styleFirstPage;
+}
+
+::sal_Int32 SAL_CALL SwVbaPageSetup::getSectionStart() throw (uno::RuntimeException)
+{
+ // FIXME:
+ sal_Int32 wdSectionStart = word::WdSectionStart::wdSectionNewPage;
+ uno::Reference< container::XNamed > xNamed( mxPageProps, uno::UNO_QUERY_THROW );
+ rtl::OUString sStyleName = xNamed->getName();
+ //mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sStyleName;
+ if( sStyleName.equalsAscii("Left Page") )
+ wdSectionStart = word::WdSectionStart::wdSectionEvenPage;
+ else if( sStyleName.equalsAscii("Right Page") )
+ wdSectionStart = word::WdSectionStart::wdSectionOddPage;
+ else
+ wdSectionStart = word::WdSectionStart::wdSectionNewPage;
+ return wdSectionStart;
+}
+
+void SAL_CALL SwVbaPageSetup::setSectionStart( ::sal_Int32 /*_sectionstart*/ ) throw (uno::RuntimeException)
+{
+ // fail to find corresponding feature in Writer
+ // #FIXME:
+}
+
+rtl::OUString&
+SwVbaPageSetup::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaPageSetup") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaPageSetup::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.PageSetup" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbapagesetup.hxx b/sw/source/ui/vba/vbapagesetup.hxx
new file mode 100644
index 000000000000..df7c59a728ce
--- /dev/null
+++ b/sw/source/ui/vba/vbapagesetup.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * 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_VBA_PAGESETUP_HXX
+#define SW_VBA_PAGESETUP_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <ooo/vba/word/XPageSetup.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbapagesetupbase.hxx>
+
+typedef cppu::ImplInheritanceHelper1< VbaPageSetupBase, ooo::vba::word::XPageSetup > SwVbaPageSetup_BASE;
+
+class SwVbaPageSetup : public SwVbaPageSetup_BASE
+{
+private:
+ rtl::OUString getStyleOfFirstPage() throw (css::uno::RuntimeException);
+
+public:
+ SwVbaPageSetup( const css::uno::Reference< ooo::vba::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::frame::XModel >& xModel,
+ const css::uno::Reference< css::beans::XPropertySet >& xProps ) throw (css::uno::RuntimeException);
+ virtual ~SwVbaPageSetup(){}
+
+ // Attributes
+ virtual double SAL_CALL getGutter() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setGutter( double _gutter ) throw (css::uno::RuntimeException);
+ virtual double SAL_CALL getHeaderDistance() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHeaderDistance( double _headerdistance ) throw (css::uno::RuntimeException);
+ virtual double SAL_CALL getFooterDistance() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setFooterDistance( double _footerdistance ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getDifferentFirstPageHeaderFooter() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDifferentFirstPageHeaderFooter( sal_Bool status ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getSectionStart() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSectionStart( ::sal_Int32 _sectionstart ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif
diff --git a/sw/source/ui/vba/vbapalette.cxx b/sw/source/ui/vba/vbapalette.cxx
new file mode 100644
index 000000000000..12554e792e5e
--- /dev/null
+++ b/sw/source/ui/vba/vbapalette.cxx
@@ -0,0 +1,75 @@
+#include "vbapalette.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <ooo/vba/word/WdColor.hpp>
+#include <ooo/vba/word/WdColorIndex.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::ooo::vba::word;
+using namespace ::com::sun::star;
+
+static const sal_Int32 ColorTable[] =
+{
+WdColor::wdColorAutomatic, // 0
+WdColor::wdColorBlack, // 1
+WdColor::wdColorBlue, // 2
+WdColor::wdColorTurquoise, // 3
+WdColor::wdColorBrightGreen, // 4
+WdColor::wdColorPink, // 5
+WdColor::wdColorRed, // 6
+WdColor::wdColorYellow, // 7
+WdColor::wdColorWhite, // 8
+WdColor::wdColorDarkBlue, // 9
+WdColor::wdColorTeal, // 10
+WdColor::wdColorGreen, // 11
+WdColor::wdColorViolet, // 12
+WdColor::wdColorDarkRed, // 13
+WdColor::wdColorDarkYellow, // 14
+WdColor::wdColorGray50, // 15
+WdColor::wdColorGray25, // 16
+};
+
+typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE;
+
+class DefaultPalette : public XIndexAccess_BASE
+{
+public:
+ DefaultPalette(){}
+
+ // Methods XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException)
+ {
+ return sizeof(ColorTable) / sizeof(ColorTable[0]);
+ }
+
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+ return uno::makeAny( sal_Int32( ColorTable[ Index ] ) );
+ }
+
+ // Methods XElementAcess
+ virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException)
+ {
+ return ::getCppuType( (sal_Int32*)0 );
+ }
+ virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+
+};
+
+VbaPalette::VbaPalette()
+{
+ mxPalette = new DefaultPalette();
+}
+
+uno::Reference< container::XIndexAccess >
+VbaPalette::getPalette() const
+{
+
+ return mxPalette;
+}
+
diff --git a/sw/source/ui/vba/vbapalette.hxx b/sw/source/ui/vba/vbapalette.hxx
new file mode 100644
index 000000000000..6179f1723c0b
--- /dev/null
+++ b/sw/source/ui/vba/vbapalette.hxx
@@ -0,0 +1,15 @@
+#ifndef VBAPALETTE_HXX
+#define VBAPALETTE_HXX
+#include <vbahelper/vbahelper.hxx>
+
+class VbaPalette
+{
+ css::uno::Reference< css::container::XIndexAccess > mxPalette;
+public:
+ VbaPalette();
+ // if no palette available e.g. because the document doesn't have a
+ // palette defined then a default palette will be returned.
+ css::uno::Reference< css::container::XIndexAccess > getPalette() const;
+};
+
+#endif
diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx
new file mode 100644
index 000000000000..dc5d5ccff882
--- /dev/null
+++ b/sw/source/ui/vba/vbapane.cxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbapane.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbaview.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaPane::SwVbaPane( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext,
+ const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) :
+ SwVbaPane_BASE( rParent, rContext ), mxModel( xModel )
+{
+}
+
+SwVbaPane::~SwVbaPane()
+{
+}
+
+uno::Any SAL_CALL
+SwVbaPane::View() throw ( css::uno::RuntimeException )
+{
+ return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, mxModel ) ) );
+}
+
+void SAL_CALL
+SwVbaPane::Close( ) throw ( css::uno::RuntimeException )
+{
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CloseWin"));
+ dispatchRequests( mxModel,url );
+}
+
+rtl::OUString&
+SwVbaPane::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaPane") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaPane::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Pane" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbapane.hxx b/sw/source/ui/vba/vbapane.hxx
new file mode 100644
index 000000000000..b8a6fff38da3
--- /dev/null
+++ b/sw/source/ui/vba/vbapane.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * 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_VBA_PANE_HXX
+#define SW_VBA_PANE_HXX
+
+#include <ooo/vba/word/XPane.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XPane > SwVbaPane_BASE;
+
+class SwVbaPane : public SwVbaPane_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+
+public:
+ SwVbaPane( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext,
+ const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaPane();
+
+ // Methods
+ virtual css::uno::Any SAL_CALL View( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_PANE_HXX */
diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx
new file mode 100644
index 000000000000..b536c800a854
--- /dev/null
+++ b/sw/source/ui/vba/vbapanes.cxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbapanes.hxx"
+#include "vbapane.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+// I assume there is only one pane in Writer
+typedef ::cppu::WeakImplHelper1<container::XIndexAccess > PanesIndexAccess_Base;
+class PanesIndexAccess : public PanesIndexAccess_Base
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxModel;
+
+public:
+ PanesIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) {}
+ ~PanesIndexAccess(){}
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return 1;
+ }
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if( Index != 1 )
+ throw container::NoSuchElementException();
+ return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) );
+ }
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return word::XPane::static_type(0);
+ }
+ virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+};
+
+class PanesEnumWrapper : public EnumerationHelper_BASE
+{
+ uno::Reference<container::XIndexAccess > m_xIndexAccess;
+ sal_Int32 nIndex;
+public:
+ PanesEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < m_xIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( nIndex < m_xIndexAccess->getCount() )
+ return m_xIndexAccess->getByIndex( nIndex++ );
+ throw container::NoSuchElementException();
+ }
+};
+
+SwVbaPanes::SwVbaPanes( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ): SwVbaPanes_BASE( xParent, xContext, new PanesIndexAccess( xParent, xContext, xModel ) ), mxModel( xModel )
+{
+}
+// XEnumerationAccess
+uno::Type
+SwVbaPanes::getElementType() throw (uno::RuntimeException)
+{
+ return word::XPane::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaPanes::createEnumeration() throw (uno::RuntimeException)
+{
+ return new PanesEnumWrapper( m_xIndexAccess );
+}
+
+uno::Any
+SwVbaPanes::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaPanes::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaPanes") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaPanes::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Panes") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbapanes.hxx b/sw/source/ui/vba/vbapanes.hxx
new file mode 100644
index 000000000000..76c24166cfa7
--- /dev/null
+++ b/sw/source/ui/vba/vbapanes.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * 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_VBA_PANES_HXX
+#define SW_VBA_PANES_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XPanes.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef CollTestImplHelper< ooo::vba::word::XPanes > SwVbaPanes_BASE;
+
+class SwVbaPanes : public SwVbaPanes_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+
+public:
+ SwVbaPanes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+ virtual ~SwVbaPanes() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaPanes_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_PANES_HXX */
diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx
new file mode 100644
index 000000000000..333fd4ca9a98
--- /dev/null
+++ b/sw/source/ui/vba/vbaparagraph.cxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaparagraph.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbarange.hxx"
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaParagraph::SwVbaParagraph( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xDocument, const uno::Reference< text::XTextRange >& xTextRange ) throw ( uno::RuntimeException ) :
+ SwVbaParagraph_BASE( rParent, rContext ), mxTextDocument( xDocument ), mxTextRange( xTextRange )
+{
+}
+
+SwVbaParagraph::~SwVbaParagraph()
+{
+}
+
+uno::Reference< word::XRange > SAL_CALL
+SwVbaParagraph::getRange( ) throw ( uno::RuntimeException )
+{
+ return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, mxTextRange->getStart(), mxTextRange->getEnd(), mxTextRange->getText(), sal_True ) );
+}
+
+rtl::OUString&
+SwVbaParagraph::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraph") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaParagraph::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Paragraph" ) );
+ }
+ return aServiceNames;
+}
+
+
+//typedef ::cppu::WeakImplHelper1< container::XEnumeration > ParagraphEnumeration_BASE;
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > ParagraphCollectionHelper_BASE;
+
+class ParagraphCollectionHelper : public ParagraphCollectionHelper_BASE
+{
+private:
+ uno::Reference< text::XTextDocument > mxTextDocument;
+
+ uno::Reference< container::XEnumeration > getEnumeration() throw (uno::RuntimeException)
+ {
+ uno::Reference< container::XEnumerationAccess > xParEnumAccess( mxTextDocument->getText(), uno::UNO_QUERY_THROW );
+ return xParEnumAccess->createEnumeration();
+ }
+
+public:
+ ParagraphCollectionHelper( const uno::Reference< text::XTextDocument >& xDocument ) throw (uno::RuntimeException): mxTextDocument( xDocument )
+ {
+ }
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return text::XTextRange::static_type(0); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return sal_True; }
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ sal_Int32 nCount = 0;
+ uno::Reference< container::XEnumeration > xParEnum = getEnumeration();
+ while( xParEnum->hasMoreElements() )
+ {
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW );
+ if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Paragraph") ) ) )
+ {
+ nCount++;
+ }
+ }
+ return nCount;
+ }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ if( Index < getCount() )
+ {
+ sal_Int32 nCount = 0;
+ uno::Reference< container::XEnumeration > xParEnum = getEnumeration();
+ while( xParEnum->hasMoreElements() )
+ {
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW );
+ if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Paragraph") ) ) )
+ {
+ if( Index == nCount )
+ return uno::makeAny( xServiceInfo );
+ nCount++;
+ }
+ }
+ }
+ throw lang::IndexOutOfBoundsException();
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return getEnumeration();
+ }
+};
+
+SwVbaParagraphs::SwVbaParagraphs( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xDocument ) throw (uno::RuntimeException) : SwVbaParagraphs_BASE( xParent, xContext, new ParagraphCollectionHelper( xDocument ) ), mxTextDocument( xDocument )
+{
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaParagraphs::getElementType() throw (uno::RuntimeException)
+{
+ return word::XParagraph::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaParagraphs::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumerationAccess->createEnumeration();
+}
+
+uno::Any
+SwVbaParagraphs::createCollectionObject( const css::uno::Any& aSource )
+{
+ uno::Reference< text::XTextRange > xTextRange( aSource, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XParagraph >( new SwVbaParagraph( this, mxContext, mxTextDocument, xTextRange ) ) );
+}
+
+rtl::OUString&
+SwVbaParagraphs::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraphs") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaParagraphs::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Paragraphs") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbaparagraph.hxx b/sw/source/ui/vba/vbaparagraph.hxx
new file mode 100644
index 000000000000..894ac61cc7e6
--- /dev/null
+++ b/sw/source/ui/vba/vbaparagraph.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * 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_VBA_PARAGRAPH_HXX
+#define SW_VBA_PARAGRAPH_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XParagraphs.hpp>
+#include <ooo/vba/word/XParagraph.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XParagraph > SwVbaParagraph_BASE;
+
+class SwVbaParagraph : public SwVbaParagraph_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ css::uno::Reference< css::text::XTextRange > mxTextRange;
+
+public:
+ SwVbaParagraph( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& xDocument, const css::uno::Reference< css::text::XTextRange >& xTextRange ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaParagraph();
+
+ // XParagraph
+ virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL getRange() throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+
+/* class SwVbaParagraphs */
+typedef CollTestImplHelper< ooo::vba::word::XParagraphs > SwVbaParagraphs_BASE;
+
+class SwVbaParagraphs : public SwVbaParagraphs_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+public:
+ SwVbaParagraphs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextDocument >& xDocument ) throw (css::uno::RuntimeException);
+ virtual ~SwVbaParagraphs() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaParagraphs_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_PARAGRAPH_HXX */
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
new file mode 100644
index 000000000000..07a822ad5752
--- /dev/null
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -0,0 +1,573 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaparagraphformat.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "wordvbahelper.hxx"
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <ooo/vba/word/WdLineSpacing.hpp>
+#include <ooo/vba/word/WdParagraphAlignment.hpp>
+#include <ooo/vba/word/WdOutlineLevel.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/style/BreakType.hpp>
+
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+static const sal_Int16 CHARACTER_INDENT_FACTOR = 12;
+static const sal_Int16 PERCENT100 = 100;
+static const sal_Int16 PERCENT150 = 150;
+static const sal_Int16 PERCENT200 = 200;
+
+SwVbaParagraphFormat::SwVbaParagraphFormat( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< beans::XPropertySet >& rParaProps ) : SwVbaParagraphFormat_BASE( rParent, rContext ), mxTextDocument( rTextDocument ), mxParaProps( rParaProps )
+{
+}
+
+SwVbaParagraphFormat::~SwVbaParagraphFormat()
+{
+}
+
+sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() throw (uno::RuntimeException)
+{
+ style::ParagraphAdjust aParaAdjust = style::ParagraphAdjust_LEFT;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaAdjust") ) ) >>= aParaAdjust;
+ return getMSWordAlignment( aParaAdjust );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setAlignment( sal_Int32 _alignment ) throw (uno::RuntimeException)
+{
+ style::ParagraphAdjust aParaAdjust = ( style::ParagraphAdjust ) getOOoAlignment( _alignment );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaAdjust") ), uno::makeAny( aParaAdjust ) );
+}
+
+float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() throw (uno::RuntimeException)
+{
+ sal_Int32 indent = 0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaFirstLineIndent") ) ) >>= indent;
+ return (float)( Millimeter::getInPoints( indent ) );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setFirstLineIndent( float _firstlineindent ) throw (uno::RuntimeException)
+{
+ sal_Int32 indent = Millimeter::getInHundredthsOfOneMillimeter( _firstlineindent );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaFirstLineIndent") ), uno::makeAny( indent ) );
+}
+
+uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() throw (uno::RuntimeException)
+{
+ sal_Bool bKeep = sal_False;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaKeepTogether") ) ) >>= bKeep;
+ return uno::makeAny ( bKeep );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogether ) throw (uno::RuntimeException)
+{
+ sal_Bool bKeep = sal_False;
+ if( _keeptogether >>= bKeep )
+ {
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaKeepTogether") ), uno::makeAny( bKeep ) );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+}
+
+uno::Any SAL_CALL SwVbaParagraphFormat::getKeepWithNext() throw (uno::RuntimeException)
+{
+ sal_Bool bKeep = sal_False;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaSplit") ) ) >>= bKeep;
+ return uno::makeAny ( bKeep );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithnext ) throw (uno::RuntimeException)
+{
+ sal_Bool bKeep = sal_False;
+ if( _keepwithnext >>= bKeep )
+ {
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaSplit") ), uno::makeAny( bKeep ) );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+}
+
+uno::Any SAL_CALL SwVbaParagraphFormat::getHyphenation() throw (uno::RuntimeException)
+{
+ sal_Bool bHypn = sal_False;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation") ) ) >>= bHypn;
+ return uno::makeAny ( bHypn );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation ) throw (uno::RuntimeException)
+{
+ sal_Bool bHypn = sal_False;
+ if( _hyphenation >>= bHypn )
+ {
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation") ), uno::makeAny( bHypn ) );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+}
+
+float SAL_CALL SwVbaParagraphFormat::getLineSpacing() throw (uno::RuntimeException)
+{
+ style::LineSpacing aLineSpacing;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ) ) >>= aLineSpacing;
+ return getMSWordLineSpacing( aLineSpacing );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setLineSpacing( float _linespacing ) throw (uno::RuntimeException)
+{
+ style::LineSpacing aLineSpacing;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ) ) >>= aLineSpacing;
+ aLineSpacing = getOOoLineSpacing( _linespacing, aLineSpacing.Mode );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ), uno::makeAny( aLineSpacing ) );
+}
+
+sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() throw (uno::RuntimeException)
+{
+ style::LineSpacing aLineSpacing;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ) ) >>= aLineSpacing;
+ return getMSWordLineSpacingRule( aLineSpacing );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingrule ) throw (uno::RuntimeException)
+{
+ style::LineSpacing aLineSpacing = getOOoLineSpacingFromRule( _linespacingrule );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineSpacing") ), uno::makeAny( aLineSpacing ) );
+}
+
+uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() throw (uno::RuntimeException)
+{
+ sal_Bool noLineNum = sal_False;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineNumberCount") ) ) >>= noLineNum;
+ return uno::makeAny ( noLineNum );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumber ) throw (uno::RuntimeException)
+{
+ sal_Bool noLineNum = sal_False;
+ if( _nolinenumber >>= noLineNum )
+ {
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineNumberCount") ), uno::makeAny( noLineNum ) );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+}
+
+sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() throw (uno::RuntimeException)
+{
+ sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText;
+ rtl::OUString aHeading;
+ const rtl::OUString HEADING = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Heading") );
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aHeading;
+ if( aHeading.indexOf( HEADING ) == 0 )
+ {
+ // get the sub string after "Heading"
+ nLevel = aHeading.copy( HEADING.getLength() ).toInt32();
+ }
+ return nLevel;
+}
+
+void SAL_CALL SwVbaParagraphFormat::setOutlineLevel( sal_Int32 /*_outlinelevel*/ ) throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() throw (uno::RuntimeException)
+{
+ style::BreakType aBreakType;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ) ) >>= aBreakType;
+ sal_Bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH );
+ return uno::makeAny( bBreakBefore );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbefore ) throw (uno::RuntimeException)
+{
+ sal_Bool bBreakBefore = sal_False;
+ if( _breakbefore >>= bBreakBefore )
+ {
+ style::BreakType aBreakType;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ) ) >>= aBreakType;
+ if( bBreakBefore )
+ {
+ if( aBreakType == style::BreakType_NONE )
+ aBreakType = style::BreakType_PAGE_BEFORE;
+ else if ( aBreakType == style::BreakType_PAGE_AFTER )
+ aBreakType = style::BreakType_PAGE_BOTH;
+ }
+ else
+ {
+ if( aBreakType == style::BreakType_PAGE_BOTH )
+ aBreakType = style::BreakType_PAGE_AFTER;
+ else if ( aBreakType == style::BreakType_PAGE_BEFORE )
+ aBreakType = style::BreakType_PAGE_AFTER;
+ }
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ), uno::makeAny( aBreakType ) );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+}
+
+float SAL_CALL SwVbaParagraphFormat::getSpaceBefore() throw (uno::RuntimeException)
+{
+ sal_Int32 nSpace = 0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTopMargin") ) ) >>= nSpace;
+ return (float)( Millimeter::getInPoints( nSpace ) );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setSpaceBefore( float _space ) throw (uno::RuntimeException)
+{
+ sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTopMargin") ), uno::makeAny( nSpace ) );
+}
+
+float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() throw (uno::RuntimeException)
+{
+ sal_Int32 nSpace = 0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaBottomMargin") ) ) >>= nSpace;
+ return (float)( Millimeter::getInPoints( nSpace ) );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setSpaceAfter( float _space ) throw (uno::RuntimeException)
+{
+ sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaBottomMargin") ), uno::makeAny( nSpace ) );
+}
+
+float SAL_CALL SwVbaParagraphFormat::getLeftIndent() throw (uno::RuntimeException)
+{
+ sal_Int32 nIndent = 0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLeftMargin") ) ) >>= nIndent;
+ return (float)( Millimeter::getInPoints( nIndent ) );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setLeftIndent( float _leftindent ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _leftindent );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLeftMargin") ), uno::makeAny( nIndent ) );
+}
+
+float SAL_CALL SwVbaParagraphFormat::getRightIndent() throw (uno::RuntimeException)
+{
+ sal_Int32 nIndent = 0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaRightMargin") ) ) >>= nIndent;
+ return (float)( Millimeter::getInPoints( nIndent ) );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setRightIndent( float _rightindent ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _rightindent );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaRightMargin") ), uno::makeAny( nIndent ) );
+}
+
+uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException)
+{
+ sal_Bool bWidow = sal_False;
+ sal_Int8 nWidow = 0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaWidows") ) ) >>= nWidow;
+ sal_Int8 nOrphan = 0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaOrphans") ) ) >>= nOrphan;
+ // if the amount of single lines on one page > 1 and the same of start and end of the paragraph,
+ // true is retured.
+ bWidow = ( nWidow > 1 && nOrphan == nWidow );
+ return uno::makeAny( bWidow );
+}
+
+void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontrol ) throw (uno::RuntimeException)
+{
+ // if we get true, the part of the paragraph on one page has to be
+ // at least two lines
+ sal_Bool bWidow = sal_False;
+ if( _widowcontrol >>= bWidow )
+ {
+ sal_Int8 nControl = bWidow? 2:1;
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaWidows") ), uno::makeAny( nControl ) );
+ mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaOrphans") ), uno::makeAny( nControl ) );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+}
+
+style::LineSpacing SwVbaParagraphFormat::getOOoLineSpacing( float _lineSpace, sal_Int16 mode )
+{
+ style::LineSpacing aLineSpacing;
+ if( mode != style::LineSpacingMode::MINIMUM && mode != style::LineSpacingMode::FIX )
+ {
+ // special behaviour of word: if the space is set to these values, the rule and
+ // the height are changed accordingly
+ if( _lineSpace == CHARACTER_INDENT_FACTOR )
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::PROP;
+ aLineSpacing.Height = PERCENT100;
+ }
+ else if( _lineSpace == ( sal_Int16 )( CHARACTER_INDENT_FACTOR * 1.5 ) )
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::PROP;
+ aLineSpacing.Height = PERCENT150;
+ }
+ else if( _lineSpace == ( sal_Int16 )( ( CHARACTER_INDENT_FACTOR ) * 2 ) )
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::PROP;
+ aLineSpacing.Height = PERCENT200;
+ }
+ else
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::FIX;
+ aLineSpacing.Height = ( sal_Int16 )( Millimeter::getInHundredthsOfOneMillimeter( _lineSpace ) );
+ }
+ }
+ else
+ {
+ aLineSpacing.Mode = mode;
+ aLineSpacing.Height = ( sal_Int16 )( Millimeter::getInHundredthsOfOneMillimeter( _lineSpace ) );
+ }
+ return aLineSpacing;
+}
+
+style::LineSpacing SwVbaParagraphFormat::getOOoLineSpacingFromRule( sal_Int32 _linespacingrule )
+{
+ style::LineSpacing aLineSpacing;
+ switch( _linespacingrule )
+ {
+ case word::WdLineSpacing::wdLineSpace1pt5:
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::PROP;
+ aLineSpacing.Height = PERCENT150;
+ break;
+ }
+ case word::WdLineSpacing::wdLineSpaceAtLeast:
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::MINIMUM;
+ aLineSpacing.Height = getCharHeight();
+ break;
+ }
+ case word::WdLineSpacing::wdLineSpaceDouble:
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::PROP;
+ aLineSpacing.Height = getCharHeight();
+ break;
+ }
+ case word::WdLineSpacing::wdLineSpaceExactly:
+ case word::WdLineSpacing::wdLineSpaceMultiple:
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::FIX;
+ aLineSpacing.Height = getCharHeight();
+ break;
+ }
+ case word::WdLineSpacing::wdLineSpaceSingle:
+ {
+ aLineSpacing.Mode = style::LineSpacingMode::PROP;
+ aLineSpacing.Height = PERCENT100;
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ break;
+ }
+ }
+ return aLineSpacing;
+}
+
+float SwVbaParagraphFormat::getMSWordLineSpacing( style::LineSpacing& rLineSpacing )
+{
+ float wdLineSpacing = 0;
+ if( rLineSpacing.Mode != style::LineSpacingMode::PROP )
+ {
+ wdLineSpacing = (float)( Millimeter::getInPoints( rLineSpacing.Height ) );
+ }
+ else
+ {
+ wdLineSpacing = (float)( CHARACTER_INDENT_FACTOR * rLineSpacing.Height ) / PERCENT100;
+ }
+ return wdLineSpacing;
+}
+
+sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing& rLineSpacing )
+{
+ sal_Int32 wdLineSpacing = word::WdLineSpacing::wdLineSpaceSingle;
+ switch( rLineSpacing.Mode )
+ {
+ case style::LineSpacingMode::PROP:
+ {
+ switch( rLineSpacing.Height )
+ {
+ case PERCENT100:
+ {
+ wdLineSpacing = word::WdLineSpacing::wdLineSpaceSingle;
+ break;
+ }
+ case PERCENT150:
+ {
+ wdLineSpacing = word::WdLineSpacing::wdLineSpace1pt5;
+ break;
+ }
+ case PERCENT200:
+ {
+ wdLineSpacing = word::WdLineSpacing::wdLineSpaceDouble;
+ break;
+ }
+ default:
+ {
+ wdLineSpacing = word::WdLineSpacing::wdLineSpaceMultiple;
+ }
+ }
+ break;
+ }
+ case style::LineSpacingMode::MINIMUM:
+ {
+ wdLineSpacing = word::WdLineSpacing::wdLineSpaceAtLeast;
+ break;
+ }
+ case style::LineSpacingMode::FIX:
+ case style::LineSpacingMode::LEADING:
+ {
+ wdLineSpacing = word::WdLineSpacing::wdLineSpaceExactly;
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+ }
+ return wdLineSpacing;
+}
+
+sal_Int16 SwVbaParagraphFormat::getCharHeight() throw (uno::RuntimeException)
+{
+ float fCharHeight = 0.0;
+ mxParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharHeight") ) ) >>= fCharHeight;
+ return (sal_Int16)( Millimeter::getInHundredthsOfOneMillimeter( fCharHeight ) );
+}
+
+sal_Int32 SwVbaParagraphFormat::getOOoAlignment( sal_Int32 _alignment )
+{
+ sal_Int32 nParaAjust = style::ParagraphAdjust_LEFT;
+ switch( _alignment )
+ {
+ case word::WdParagraphAlignment::wdAlignParagraphCenter:
+ {
+ nParaAjust = style::ParagraphAdjust_CENTER;
+ break;
+ }
+ case word::WdParagraphAlignment::wdAlignParagraphJustify:
+ {
+ nParaAjust = style::ParagraphAdjust_BLOCK;
+ break;
+ }
+ case word::WdParagraphAlignment::wdAlignParagraphLeft:
+ {
+ nParaAjust = style::ParagraphAdjust_LEFT;
+ break;
+ }
+ case word::WdParagraphAlignment::wdAlignParagraphRight:
+ {
+ nParaAjust = style::ParagraphAdjust_RIGHT;
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+ }
+ return nParaAjust;
+}
+
+sal_Int32 SwVbaParagraphFormat::getMSWordAlignment( sal_Int32 _alignment )
+{
+ sal_Int32 wdAlignment = word::WdParagraphAlignment::wdAlignParagraphLeft;
+ switch( _alignment )
+ {
+ case style::ParagraphAdjust_CENTER:
+ {
+ wdAlignment = word::WdParagraphAlignment::wdAlignParagraphCenter;
+ break;
+ }
+ case style::ParagraphAdjust_LEFT:
+ {
+ wdAlignment = word::WdParagraphAlignment::wdAlignParagraphLeft;
+ break;
+ }
+ case style::ParagraphAdjust_BLOCK:
+ {
+ wdAlignment = word::WdParagraphAlignment::wdAlignParagraphJustify;
+ break;
+ }
+ case style::ParagraphAdjust_RIGHT:
+ {
+ wdAlignment = word::WdParagraphAlignment::wdAlignParagraphRight;
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+ }
+ return wdAlignment;
+}
+
+rtl::OUString&
+SwVbaParagraphFormat::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraphFormat") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaParagraphFormat::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ParagraphFormat" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx
new file mode 100644
index 000000000000..684390820e13
--- /dev/null
+++ b/sw/source/ui/vba/vbaparagraphformat.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * 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_VBA_PARAGRAPHFORMAT_HXX
+#define SW_VBA_PARAGRAPHFORMAT_HXX
+
+#include <ooo/vba/word/XParagraphFormat.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XParagraphFormat > SwVbaParagraphFormat_BASE;
+
+class SwVbaParagraphFormat : public SwVbaParagraphFormat_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ css::uno::Reference< css::beans::XPropertySet > mxParaProps;
+
+private:
+ css::style::LineSpacing getOOoLineSpacing( float _lineSpace, sal_Int16 mode );
+ css::style::LineSpacing getOOoLineSpacingFromRule( sal_Int32 _linespacingrule );
+ float getMSWordLineSpacing( css::style::LineSpacing& rLineSpacing );
+ sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing& rLineSpacing );
+ sal_Int16 getCharHeight() throw (css::uno::RuntimeException);
+ sal_Int32 getOOoAlignment( sal_Int32 _alignment );
+ sal_Int32 getMSWordAlignment( sal_Int32 _alignment );
+
+public:
+ SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::beans::XPropertySet >& rParaProps );
+ virtual ~SwVbaParagraphFormat();
+
+ // Attributes
+ virtual ::sal_Int32 SAL_CALL getAlignment() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getFirstLineIndent() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setFirstLineIndent( float _firstlineindent ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getKeepTogether() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setKeepTogether( const css::uno::Any& _keeptogether ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getKeepWithNext() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setKeepWithNext( const css::uno::Any& _keepwithnext ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getHyphenation() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHyphenation( const css::uno::Any& _hyphenation ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getLineSpacing() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLineSpacing( float _linespacing ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getLineSpacingRule() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLineSpacingRule( ::sal_Int32 _linespacingrule ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getNoLineNumber() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setNoLineNumber( const css::uno::Any& _nolinenumber ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getOutlineLevel() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setOutlineLevel( ::sal_Int32 _outlinelevel ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPageBreakBefore() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setPageBreakBefore( const css::uno::Any& _pagebreakbefore ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getSpaceBefore() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSpaceBefore( float _spacebefore ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getSpaceAfter() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSpaceAfter( float _spaceafter ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getLeftIndent() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLeftIndent( float _leftindent ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getRightIndent() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setRightIndent( float _rightindent ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getTabStops() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setTabStops( const css::uno::Any& _tabstops ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getWidowControl() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setWidowControl( const css::uno::Any& _widowcontrol ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_PARAGRAPHFORMAT_HXX */
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
new file mode 100644
index 000000000000..2f1ee48ec5ef
--- /dev/null
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -0,0 +1,345 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbarange.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbarangehelper.hxx"
+#include <ooo/vba/word/WdBreakType.hpp>
+#include <com/sun/star/style/BreakType.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include "wordvbahelper.hxx"
+#include "vbaparagraphformat.hxx"
+#include "vbastyle.hxx"
+#include "vbafont.hxx"
+#include "vbapalette.hxx"
+#include "vbapagesetup.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, sal_Bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument )
+{
+ uno::Reference< text::XTextRange > xEnd;
+ initialize( rStart, xEnd );
+}
+
+SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, sal_Bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument )
+{
+ initialize( rStart, rEnd );
+}
+
+SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, const uno::Reference< text::XText >& rText, sal_Bool _bMaySpanEndOfDocument ) throw (uno::RuntimeException) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument( rTextDocument ), mxText( rText ), mbMaySpanEndOfDocument( _bMaySpanEndOfDocument )
+{
+ initialize( rStart, rEnd );
+}
+
+SwVbaRange::~SwVbaRange()
+{
+}
+
+void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd ) throw (uno::RuntimeException)
+{
+ if( !mxText.is() )
+ {
+ mxText = mxTextDocument->getText();
+ }
+
+ mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText );
+ mxTextCursor->collapseToStart();
+
+ if( rEnd.is() )
+ mxTextCursor->gotoRange( rEnd, sal_True );
+ else
+ mxTextCursor->gotoEnd( sal_True );
+}
+
+uno::Reference< text::XTextRange > SAL_CALL
+SwVbaRange::getXTextRange() throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextRange > xTextRange( mxTextCursor, uno::UNO_QUERY_THROW );
+ return xTextRange;
+}
+
+void SwVbaRange::setXTextRange( const uno::Reference< text::XTextRange >& xRange ) throw (uno::RuntimeException)
+{
+ mxTextCursor->gotoRange( xRange->getStart(), sal_False );
+ mxTextCursor->gotoRange( xRange->getEnd(), sal_True );
+}
+
+/**
+* The complexity in this method is because we need to workaround
+* an issue that the last paragraph in a document does not have a trailing CRLF.
+* @return
+*/
+rtl::OUString SAL_CALL
+SwVbaRange::getText() throw ( uno::RuntimeException )
+{
+ rtl::OUString aText = mxTextCursor->getString();
+ sal_Int32 nLen = aText.getLength();
+
+ // FIXME: should add a line separator if the range includes the last paragraph
+ if( nLen == 0 )
+ {
+ if( mxTextCursor->isCollapsed() )
+ {
+ mxTextCursor->goRight( 1, sal_True );
+ aText = mxTextCursor->getString();
+ mxTextCursor->collapseToStart();
+ }
+ else
+ {
+ uno::Reference< text::XTextRange > xStart = mxTextCursor->getStart();
+ uno::Reference< text::XTextRange > xEnd = mxTextCursor->getEnd();
+ mxTextCursor->collapseToEnd();
+ mxTextCursor->goRight( 1, sal_True );
+ mxTextCursor->gotoRange( xStart, sal_False );
+ mxTextCursor->gotoRange( xEnd, sal_True );
+ }
+ }
+
+ return aText;
+}
+
+void SAL_CALL
+SwVbaRange::setText( const rtl::OUString& rText ) throw ( uno::RuntimeException )
+{
+ if( rText.indexOf( '\n' ) != -1 )
+ {
+ mxTextCursor->setString( rtl::OUString() );
+ // process CR in strings
+ uno::Reference< text::XTextRange > xRange( mxTextCursor, uno::UNO_QUERY_THROW );
+ SwVbaRangeHelper::insertString( xRange, mxText, rText, sal_True );
+ }
+ else
+ {
+ mxTextCursor->setString( rText );
+ }
+}
+
+// FIXME: test is not pass
+void SAL_CALL SwVbaRange::InsertBreak( const uno::Any& _breakType ) throw (uno::RuntimeException)
+{
+ // default type is wdPageBreak;
+ sal_Int32 nBreakType = word::WdBreakType::wdPageBreak;
+ if( _breakType.hasValue() )
+ _breakType >>= nBreakType;
+
+ style::BreakType eBreakType = style::BreakType_NONE;
+ switch( nBreakType )
+ {
+ case word::WdBreakType::wdPageBreak:
+ eBreakType = style::BreakType_PAGE_BEFORE;
+ break;
+ case word::WdBreakType::wdColumnBreak:
+ eBreakType = style::BreakType_COLUMN_AFTER;
+ break;
+ case word::WdBreakType::wdLineBreak:
+ case word::WdBreakType::wdLineBreakClearLeft:
+ case word::WdBreakType::wdLineBreakClearRight:
+ case word::WdBreakType::wdSectionBreakContinuous:
+ case word::WdBreakType::wdSectionBreakEvenPage:
+ case word::WdBreakType::wdSectionBreakNextPage:
+ case word::WdBreakType::wdSectionBreakOddPage:
+ case word::WdBreakType::wdTextWrappingBreak:
+ DebugHelper::exception( SbERR_NOT_IMPLEMENTED, rtl::OUString() );
+ break;
+ default:
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+
+ if( eBreakType != style::BreakType_NONE )
+ {
+ if( !mxTextCursor->isCollapsed() )
+ {
+ mxTextCursor->setString( rtl::OUString() );
+ mxTextCursor->collapseToStart();
+ }
+
+ uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
+ xProp->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ), uno::makeAny( eBreakType ) );
+ }
+}
+
+void SAL_CALL
+SwVbaRange::Select() throw ( uno::RuntimeException )
+{
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextViewCursor > xTextViewCursor = word::getXTextViewCursor( xModel );
+ xTextViewCursor->gotoRange( mxTextCursor->getStart(), sal_False );
+ xTextViewCursor->gotoRange( mxTextCursor->getEnd(), sal_True );
+}
+
+void SAL_CALL
+SwVbaRange::InsertParagraph() throw ( uno::RuntimeException )
+{
+ mxTextCursor->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) );
+ InsertParagraphBefore();
+}
+
+void SAL_CALL
+SwVbaRange::InsertParagraphBefore() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xTextRange = mxTextCursor->getStart();
+ mxText->insertControlCharacter( xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, sal_True );
+ mxTextCursor->gotoRange( xTextRange, sal_True );
+}
+
+void SAL_CALL
+SwVbaRange::InsertParagraphAfter() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xTextRange = mxTextCursor->getEnd();
+ mxText->insertControlCharacter( xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, sal_True );
+}
+
+uno::Reference< word::XParagraphFormat > SAL_CALL
+SwVbaRange::getParagraphFormat() throw ( uno::RuntimeException )
+{
+ uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
+ return uno::Reference< word::XParagraphFormat >( new SwVbaParagraphFormat( this, mxContext, mxTextDocument, xParaProps ) );
+}
+
+void SAL_CALL
+SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) throw ( uno::RuntimeException )
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+uno::Reference< word::XStyle > SAL_CALL
+SwVbaRange::getStyle() throw ( uno::RuntimeException )
+{
+ rtl::OUString aStyleName;
+ rtl::OUString aStyleType;
+ uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
+ if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") ) ) >>= aStyleName ) && aStyleName.getLength() )
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") );
+ }
+ else if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aStyleName ) && aStyleName.getLength() )
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
+ }
+ if( aStyleType.getLength() == 0 )
+ {
+ DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
+ }
+ uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW);
+ uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( aStyleType ), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xStyleProps( xStylesAccess->getByName( aStyleName ), uno::UNO_QUERY_THROW );
+ return uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProps ) );
+}
+
+void SAL_CALL
+SwVbaRange::setStyle( const uno::Reference< word::XStyle >& rStyle ) throw ( uno::RuntimeException )
+{
+ uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
+ SwVbaStyle::setStyle( xParaProps, rStyle );
+}
+
+uno::Reference< word::XFont > SAL_CALL
+SwVbaRange::getFont() throw ( uno::RuntimeException )
+{
+ VbaPalette aColors;
+ return new SwVbaFont( mxParent, mxContext, aColors.getPalette(), uno::Reference< beans::XPropertySet >( getXTextRange(), uno::UNO_QUERY_THROW ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaRange::getLanguageID() throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
+ return SwVbaStyle::getLanguageID( xParaProps );
+}
+
+void SAL_CALL SwVbaRange::setLanguageID( ::sal_Int32 _languageid ) throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
+ SwVbaStyle::setLanguageID( xParaProps, _languageid );
+}
+
+uno::Any SAL_CALL
+SwVbaRange::PageSetup( ) throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ rtl::OUString aPageStyleName;
+ xParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
+ uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xPageProps( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaRange::getStart() throw (uno::RuntimeException)
+{
+ uno::Reference< text::XText > xText = mxTextDocument->getText();
+ return SwVbaRangeHelper::getPosition( xText, mxTextCursor->getStart() );
+}
+
+void SAL_CALL SwVbaRange::setStart( ::sal_Int32 _start ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XText > xText = mxTextDocument->getText();
+ uno::Reference< text::XTextRange > xStart = SwVbaRangeHelper::getRangeByPosition( xText, _start );
+ uno::Reference< text::XTextRange > xEnd = mxTextCursor->getEnd();
+
+ mxTextCursor->gotoRange( xStart, sal_False );
+ mxTextCursor->gotoRange( xEnd, sal_True );
+}
+
+::sal_Int32 SAL_CALL SwVbaRange::getEnd() throw (uno::RuntimeException)
+{
+ uno::Reference< text::XText > xText = mxTextDocument->getText();
+ return SwVbaRangeHelper::getPosition( xText, mxTextCursor->getEnd() );
+}
+
+void SAL_CALL SwVbaRange::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XText > xText = mxTextDocument->getText();
+ uno::Reference< text::XTextRange > xEnd = SwVbaRangeHelper::getRangeByPosition( xText, _end );
+
+ mxTextCursor->collapseToStart();
+ mxTextCursor->gotoRange( xEnd, sal_True );
+}
+
+rtl::OUString&
+SwVbaRange::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaRange") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaRange::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Range" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx
new file mode 100644
index 000000000000..73992494f146
--- /dev/null
+++ b/sw/source/ui/vba/vbarange.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * 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_VBA_RANGE_HXX
+#define SW_VBA_RANGE_HXX
+
+#include <ooo/vba/word/XRange.hpp>
+#include <ooo/vba/word/XParagraphFormat.hpp>
+#include <ooo/vba/word/XFont.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <ooo/vba/word/XStyle.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XRange > SwVbaRange_BASE;
+
+class SwVbaRange : public SwVbaRange_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ css::uno::Reference< css::text::XTextCursor > mxTextCursor;
+ css::uno::Reference< css::text::XText > mxText;
+ sal_Bool mbMaySpanEndOfDocument;
+
+private:
+ void initialize( const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd ) throw (css::uno::RuntimeException);
+public:
+ SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
+ SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
+ SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
+ virtual ~SwVbaRange();
+ css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; }
+
+ virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException);
+ void setXTextRange( const css::uno::Reference< css::text::XTextRange >& xRange ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::text::XText > getXText() { return mxText; }
+ void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; }
+
+ // Attribute
+ virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setText( const rtl::OUString& rText ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setParagraphFormat( const css::uno::Reference< ooo::vba::word::XParagraphFormat >& rParagraphFormat ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XStyle > SAL_CALL getStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStyle( const css::uno::Reference< ooo::vba::word::XStyle >& _xStyle ) throw (css::uno::RuntimeException);
+
+ virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ // Methods
+ virtual void SAL_CALL InsertBreak( const css::uno::Any& _breakType ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL InsertParagraph() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL InsertParagraphBefore() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL InsertParagraphAfter() throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getLanguageID() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL PageSetup() throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getStart() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStart( ::sal_Int32 _start ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getEnd() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setEnd( ::sal_Int32 _end ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_RANGE_HXX */
diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx
new file mode 100644
index 000000000000..4fd9e5f143f1
--- /dev/null
+++ b/sw/source/ui/vba/vbarangehelper.cxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbarangehelper.hxx"
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+/**
+ * get a range in a xText by creating
+ * a cursor that iterates over the text. If the iterating cursor is
+ * equal to the desired position, the range equivalent is returned.
+ * Some special cases are tables that are inside of the text, because the
+ * position has to be adjusted.
+ * @param xText a text where a range position is searched
+ * @param position a position inside o the text
+ * @return a range for the postion; null is returned if no range can be
+ * constructed.
+ */
+uno::Reference< text::XTextRange > SwVbaRangeHelper::getRangeByPosition( const uno::Reference< text::XText >& rText, sal_Int32 _position ) throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xRange;
+ if( rText.is() )
+ {
+ sal_Int32 nPos = 0;
+ uno::Reference< text::XTextCursor > xCursor = rText->createTextCursor();
+ xCursor->collapseToStart();
+ sal_Bool bCanGo = sal_True;
+ while( !xRange.is() && bCanGo )
+ {
+ if( _position == nPos )
+ {
+ xRange = xCursor->getStart();
+ }
+ else
+ {
+ bCanGo = xCursor->goRight( 1, sal_False );
+ nPos++;
+ }
+ }
+ }
+ return xRange;
+}
+
+
+void SwVbaRangeHelper::insertString( uno::Reference< text::XTextRange >& rTextRange, uno::Reference< text::XText >& rText, const rtl::OUString& rStr, sal_Bool _bAbsorb ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nlastIndex = 0;
+ sal_Int32 nIndex = 0;
+ uno::Reference< text::XTextRange > xRange = rTextRange;
+
+ while(( nIndex = rStr.indexOf('\n', nlastIndex)) >= 0 )
+ {
+ xRange = xRange->getEnd();
+ if( nlastIndex < ( nIndex - 1 ) )
+ {
+ rText->insertString( xRange, rStr.copy( nlastIndex, ( nIndex - 1 - nlastIndex ) ), _bAbsorb );
+ xRange = xRange->getEnd();
+ }
+
+ rText->insertControlCharacter( xRange, text::ControlCharacter::PARAGRAPH_BREAK, _bAbsorb );
+ nlastIndex = nIndex + 1;
+ }
+
+ if( nlastIndex < rStr.getLength() )
+ {
+ xRange = xRange->getEnd();
+
+ rtl::OUString aWatt = rStr.copy( nlastIndex );
+ rText->insertString( xRange, aWatt, _bAbsorb );
+ }
+}
+
+uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Reference< text::XTextRange >& rTextRange, const uno::Reference< text::XText >& rText ) throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextCursor > xTextCursor;
+ sal_Bool bGotTextCursor = sal_False;
+
+ try
+ {
+ xTextCursor = rText->createTextCursorByRange( rTextRange );
+ bGotTextCursor = sal_True;
+ }
+ catch (uno::Exception& e)
+ {
+ DebugHelper::exception(e);
+ }
+
+ if( !bGotTextCursor )
+ {
+ try
+ {
+ uno::Reference< text::XText > xText = rTextRange->getText();
+ xTextCursor = xText->createTextCursor();
+ bGotTextCursor = sal_True;
+ }
+ catch( uno::Exception& e )
+ {
+ DebugHelper::exception(e);
+ }
+ }
+
+ if( !bGotTextCursor )
+ {
+ try
+ {
+ xTextCursor = rText->createTextCursor();
+ bGotTextCursor = sal_True;
+ }
+ catch( uno::Exception& e )
+ {
+ DebugHelper::exception(e);
+ }
+ }
+ return xTextCursor;
+}
+
+sal_Int32 SwVbaRangeHelper::getPosition( const uno::Reference< text::XText >& rText, const uno::Reference< text::XTextRange >& rTextRange ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nPosition = -1;
+ if( rText.is() && rTextRange.is() )
+ {
+ nPosition = 0;
+ uno::Reference< text::XTextCursor > xCursor = rText->createTextCursor();
+ xCursor->collapseToStart();
+ uno::Reference< text::XTextRangeCompare > xCompare( rText, uno::UNO_QUERY_THROW );
+ // compareValue is 0 if the ranges are equal
+ sal_Int32 nCompareValue = xCompare->compareRegionStarts( xCursor->getStart(), rTextRange );
+ sal_Bool canGo = sal_True;
+
+ while( nCompareValue !=0 && canGo )
+ {
+ canGo = xCursor->goRight( 1, sal_False );
+ nCompareValue = xCompare->compareRegionStarts( xCursor->getStart(), rTextRange );
+ nPosition++;
+ }
+
+ // check fails: no correct position found
+ if( !canGo && nCompareValue != 0 )
+ {
+ nPosition = -1;
+ }
+ }
+
+ return nPosition;
+}
diff --git a/sw/source/ui/vba/vbarangehelper.hxx b/sw/source/ui/vba/vbarangehelper.hxx
new file mode 100644
index 000000000000..71bdf20f94a2
--- /dev/null
+++ b/sw/source/ui/vba/vbarangehelper.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * 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_VBA_RANGEHELPER_HXX
+#define SW_VBA_RANGEHELPER_HXX
+
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XText.hpp>
+
+class SwVbaRangeHelper
+{
+public:
+ static css::uno::Reference< css::text::XTextRange > getRangeByPosition( const css::uno::Reference< css::text::XText >& rText, sal_Int32 _position )throw ( css::uno::RuntimeException );
+ static void insertString( css::uno::Reference< css::text::XTextRange >& rTextRange, css::uno::Reference< css::text::XText >& rText, const rtl::OUString& rStr, sal_Bool _bAbsorb ) throw ( css::uno::RuntimeException );
+ static css::uno::Reference< css::text::XTextCursor > initCursor( const css::uno::Reference< css::text::XTextRange >& rTextRange, const css::uno::Reference< css::text::XText >& rText ) throw ( css::uno::RuntimeException );
+ static sal_Int32 getPosition( const css::uno::Reference< css::text::XText >& rText, const css::uno::Reference< css::text::XTextRange >& rTextRange ) throw ( css::uno::RuntimeException );
+
+};
+#endif /* SW_VBA_RANGEHELPER_HXX */
diff --git a/sw/source/ui/vba/vbareplacement.cxx b/sw/source/ui/vba/vbareplacement.cxx
new file mode 100644
index 000000000000..81f2bb193412
--- /dev/null
+++ b/sw/source/ui/vba/vbareplacement.cxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbareplacement.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaReplacement::SwVbaReplacement( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< util::XPropertyReplace >& xPropertyReplace ) throw ( uno::RuntimeException ) :
+ SwVbaReplacement_BASE( rParent, rContext ), mxPropertyReplace( xPropertyReplace )
+{
+}
+
+SwVbaReplacement::~SwVbaReplacement()
+{
+}
+
+::rtl::OUString SAL_CALL SwVbaReplacement::getText() throw (uno::RuntimeException)
+{
+ return mxPropertyReplace->getReplaceString();
+}
+
+void SAL_CALL SwVbaReplacement::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeException)
+{
+ mxPropertyReplace->setReplaceString( _text );
+}
+
+rtl::OUString&
+SwVbaReplacement::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaReplacement") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaReplacement::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Replacement" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbareplacement.hxx b/sw/source/ui/vba/vbareplacement.hxx
new file mode 100644
index 000000000000..b257fb7a3abc
--- /dev/null
+++ b/sw/source/ui/vba/vbareplacement.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * 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_VBA_REPLACEMENT_HXX
+#define SW_VBA_REPLACEMENT_HXX
+
+#include <ooo/vba/word/XReplacement.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/util/XPropertyReplace.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XReplacement > SwVbaReplacement_BASE;
+
+class SwVbaReplacement : public SwVbaReplacement_BASE
+{
+private:
+ css::uno::Reference< css::util::XPropertyReplace> mxPropertyReplace;
+
+public:
+ SwVbaReplacement( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::util::XPropertyReplace >& xPropertyReplace ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaReplacement();
+
+ // Attributes
+ virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_REPLACEMENT_HXX */
diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx
new file mode 100644
index 000000000000..2e685fbb1676
--- /dev/null
+++ b/sw/source/ui/vba/vbasection.cxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbasection.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbapagesetup.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaSection::SwVbaSection( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) throw ( uno::RuntimeException ) :
+ SwVbaSection_BASE( rParent, rContext ), mxModel( xModel ), mxPageProps( xProps )
+{
+}
+
+SwVbaSection::~SwVbaSection()
+{
+}
+
+::sal_Bool SAL_CALL SwVbaSection::getProtectedForForms() throw (uno::RuntimeException)
+{
+ return sal_False;
+}
+
+void SAL_CALL SwVbaSection::setProtectedForForms( ::sal_Bool /*_protectedforforms*/ ) throw (uno::RuntimeException)
+{
+}
+
+uno::Any SAL_CALL SwVbaSection::Headers( ) throw (uno::RuntimeException)
+{
+ return uno::Any();
+}
+
+uno::Any SAL_CALL SwVbaSection::Footers( ) throw (uno::RuntimeException)
+{
+ return uno::Any();
+}
+
+uno::Any SAL_CALL
+SwVbaSection::PageSetup( ) throw (uno::RuntimeException)
+{
+ return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, mxPageProps ) ) );
+}
+
+rtl::OUString&
+SwVbaSection::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSection") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaSection::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Section" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbasection.hxx b/sw/source/ui/vba/vbasection.hxx
new file mode 100644
index 000000000000..90a2972c2f52
--- /dev/null
+++ b/sw/source/ui/vba/vbasection.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * 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_VBA_SECTION_HXX
+#define SW_VBA_SECTION_HXX
+
+#include <ooo/vba/word/XSection.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XSection > SwVbaSection_BASE;
+
+class SwVbaSection : public SwVbaSection_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::beans::XPropertySet > mxPageProps;
+
+public:
+ SwVbaSection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaSection();
+
+ // Attributes
+ virtual ::sal_Bool SAL_CALL getProtectedForForms() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setProtectedForForms( ::sal_Bool _protectedforforms ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual css::uno::Any SAL_CALL Headers( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Footers( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL PageSetup( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_SECTION_HXX */
diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx
new file mode 100644
index 000000000000..faa53fa657b5
--- /dev/null
+++ b/sw/source/ui/vba/vbasections.cxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbasections.hxx"
+#include "vbasection.hxx"
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/style/XStyle.hpp>
+#include <docsh.hxx>
+#include <doc.hxx>
+#include "wordvbahelper.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > SectionEnumeration_BASE;
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > SectionCollectionHelper_Base;
+typedef std::vector< uno::Reference< beans::XPropertySet > > XSectionVec;
+
+class SectionEnumeration : public SectionEnumeration_BASE
+{
+ XSectionVec mxSections;
+ XSectionVec::iterator mIt;
+
+public:
+ SectionEnumeration( const XSectionVec& rVec ) : mxSections( rVec ), mIt( mxSections.begin() ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( mIt != mxSections.end() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( hasMoreElements() )
+ return uno::makeAny( *mIt++ );
+ throw container::NoSuchElementException();
+ }
+};
+
+// here I regard pagestyle as section
+class SectionCollectionHelper : public SectionCollectionHelper_Base
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxModel;
+ XSectionVec mxSections;
+
+public:
+ SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
+ {
+ uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles") ) ), uno::UNO_QUERY_THROW );
+ sal_Int32 nCount = xPageStyles->getCount();
+ for( sal_Int32 index = 0; index < nCount; ++index )
+ {
+ uno::Reference< style::XStyle > xStyle( xPageStyles->getByIndex( index ), uno::UNO_QUERY_THROW );
+ // only the pagestyles in using are considered
+ if( xStyle->isInUse( ) )
+ {
+ uno::Reference< beans::XPropertySet > xPageProps( xStyle, uno::UNO_QUERY_THROW );
+ mxSections.push_back( xPageProps );
+ }
+ }
+ }
+
+ ~SectionCollectionHelper(){}
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return mxSections.size();
+ }
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw css::lang::IndexOutOfBoundsException();
+
+ uno::Reference< beans::XPropertySet > xPageProps( mxSections[ Index ], uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XSection >( new SwVbaSection( mxParent, mxContext, mxModel, xPageProps ) ) );
+ }
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return word::XSection::static_type(0);
+ }
+ virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return new SectionEnumeration( mxSections );
+ }
+};
+
+class SectionsEnumWrapper : public EnumerationHelperImpl
+{
+ uno::Reference< frame::XModel > mxModel;
+ uno::WeakReference< XHelperInterface > mxParent;
+public:
+ SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {}
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ uno::Reference< beans::XPropertySet > xPageProps( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( mxParent, m_xContext, mxModel, xPageProps ) ) );
+ }
+};
+
+SwVbaSections::SwVbaSections( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ): SwVbaSections_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new SectionCollectionHelper( xParent, xContext, xModel ) ) ), mxModel( xModel )
+{
+}
+
+uno::Any SAL_CALL
+SwVbaSections::PageSetup( ) throw (uno::RuntimeException)
+{
+ if( m_xIndexAccess->getCount() )
+ {
+ // check if the first section is our want
+ uno::Reference< word::XSection > xSection( m_xIndexAccess->getByIndex( 0 ), uno::UNO_QUERY_THROW );
+ return xSection->PageSetup();
+ }
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("There is no section") ), uno::Reference< uno::XInterface >() );
+}
+
+// XEnumerationAccess
+uno::Type SAL_CALL
+SwVbaSections::getElementType() throw (uno::RuntimeException)
+{
+ return word::XSection::static_type(0);
+}
+
+uno::Reference< container::XEnumeration > SAL_CALL
+SwVbaSections::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return new SectionsEnumWrapper( this, mxContext, xEnumAccess->createEnumeration(), mxModel );
+}
+
+uno::Any
+SwVbaSections::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaSections::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSections") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaSections::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Sections") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbasections.hxx b/sw/source/ui/vba/vbasections.hxx
new file mode 100644
index 000000000000..3204689af5d8
--- /dev/null
+++ b/sw/source/ui/vba/vbasections.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * 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_VBA_SECTIONS_HXX
+#define SW_VBA_SECTIONS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XSections.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef CollTestImplHelper< ooo::vba::word::XSections > SwVbaSections_BASE;
+
+class SwVbaSections : public SwVbaSections_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+
+public:
+ SwVbaSections( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+ virtual ~SwVbaSections() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL PageSetup( ) throw (css::uno::RuntimeException);
+
+ // SwVbaSections_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_SECTIONS_HXX */
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
new file mode 100644
index 000000000000..620e44fa413b
--- /dev/null
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -0,0 +1,679 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaselection.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbarange.hxx"
+#include "vbafind.hxx"
+#include "wordvbahelper.hxx"
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextTableCursor.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/table/XCell.hpp>
+#include <ooo/vba/word/WdUnits.hpp>
+#include <ooo/vba/word/WdMovementType.hpp>
+#include <ooo/vba/word/WdGoToItem.hpp>
+#include <ooo/vba/word/WdGoToDirection.hpp>
+#include <ooo/vba/word/XBookmark.hpp>
+#include <ooo/vba/word/XApplication.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include "unotbl.hxx"
+#include "unocoll.hxx"
+#include "vbatable.hxx"
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/view/XViewCursor.hpp>
+#include <ooo/vba/word/WdInformation.hpp>
+#include <ooo/vba/word/WdHeaderFooterIndex.hpp>
+#include "vbainformationhelper.hxx"
+#include "vbafield.hxx"
+#include "vbaheaderfooter.hxx"
+#include "vbaheaderfooterhelper.hxx"
+#include <vbahelper/vbashaperange.hxx>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaSelection::SwVbaSelection( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& rModel ) throw ( uno::RuntimeException ) : SwVbaSelection_BASE( rParent, rContext ), mxModel( rModel )
+{
+ mxTextViewCursor = word::getXTextViewCursor( mxModel );
+}
+
+SwVbaSelection::~SwVbaSelection()
+{
+}
+
+uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xTextRange;
+ uno::Reference< lang::XServiceInfo > xServiceInfo( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW );
+ if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextRanges") ) ) )
+ {
+ uno::Reference< container::XIndexAccess > xTextRanges( xServiceInfo, uno::UNO_QUERY_THROW );
+ if( xTextRanges->getCount() > 0 )
+ {
+ // if there are multipul selection, just return the last selected Range.
+ xTextRange.set( xTextRanges->getByIndex( xTextRanges->getCount()-1 ), uno::UNO_QUERY_THROW );
+ }
+ }
+ else
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ return xTextRange;
+}
+
+uno::Reference< word::XRange > SAL_CALL
+SwVbaSelection::getRange() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xTextRange = GetSelectedRange();
+ uno::Reference< text::XTextDocument > xDocument( mxModel, uno::UNO_QUERY_THROW );
+ return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, xDocument, xTextRange->getStart(), xTextRange->getEnd(), mxTextViewCursor->getText() ) );
+}
+
+rtl::OUString SAL_CALL
+SwVbaSelection::getText() throw ( uno::RuntimeException )
+{
+ return getRange()->getText();
+}
+
+void SAL_CALL
+SwVbaSelection::setText( const rtl::OUString& rText ) throw ( uno::RuntimeException )
+{
+ getRange()->setText( rText );
+}
+
+void SAL_CALL
+SwVbaSelection::TypeText( const rtl::OUString& rText ) throw ( uno::RuntimeException )
+{
+ // FIXME: handle the property Options.ReplaceSelection, the default value is TRUE
+ setText( rText );
+}
+
+void SAL_CALL
+SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nUnit = word::WdUnits::wdLine;
+ sal_Int32 nExtend = word::WdMovementType::wdMove;
+ _unit >>= nUnit;
+ _extend >>= nExtend;
+
+ switch( nUnit )
+ {
+ case word::WdUnits::wdStory:
+ {
+ // go to the begin of the document
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToStartOfDoc"));
+ dispatchRequests( mxModel,url );
+ // If something is selected, it needs to go twice
+ dispatchRequests( mxModel,url );
+ break;
+ }
+ case word::WdUnits::wdLine:
+ {
+ // go to the begin of the Line
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToStartOfLine"));
+ dispatchRequests( mxModel,url );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ break;
+ }
+ }
+}
+
+void SAL_CALL
+SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nUnit = word::WdUnits::wdLine;
+ sal_Int32 nExtend = word::WdMovementType::wdMove;
+ _unit >>= nUnit;
+ _extend >>= nExtend;
+
+ switch( nUnit )
+ {
+ case word::WdUnits::wdStory:
+ {
+ // go to the end of the document
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToEndOfDoc"));
+ dispatchRequests( mxModel,url );
+ // If something is selected, it needs to go twice
+ dispatchRequests( mxModel,url );
+ break;
+ }
+ case word::WdUnits::wdLine:
+ {
+ // go to the end of the Line
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToEndOfLine"));
+ dispatchRequests( mxModel,url );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ break;
+ }
+ }
+}
+
+void SAL_CALL
+SwVbaSelection::Delete( const uno::Any& /*_unit*/, const uno::Any& /*_count*/ ) throw ( uno::RuntimeException )
+{
+ // FIXME: handle the arguments: _unit and _count
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Delete"));
+ dispatchRequests( mxModel,url );
+}
+
+void SwVbaSelection::NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw ( uno::RuntimeException )
+{
+ uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextTable > xTextTable;
+ uno::Reference< table::XCell > xCell;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cell") ) ) >>= xCell;
+ if( !xTextTable.is() || !xCell.is() )
+ {
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ return;
+ }
+ uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW );
+ rtl::OUString aCellName;
+ xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellName") ) ) >>= aCellName;
+ uno::Reference< text::XTextTableCursor > xTextTableCursor = xTextTable->createCursorByCellName( aCellName );
+ // move the table cursor
+ switch( eDirection )
+ {
+ case MOVE_LEFT:
+ {
+ xTextTableCursor->goLeft( nCount, sal_False );
+ break;
+ }
+ case MOVE_RIGHT:
+ {
+ xTextTableCursor->goRight( nCount, sal_False );
+ break;
+ }
+ case MOVE_UP:
+ {
+ xTextTableCursor->goUp( nCount, sal_False );
+ break;
+ }
+ case MOVE_DOWN:
+ {
+ xTextTableCursor->goDown( nCount, sal_False );
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ return;
+ }
+ }
+ // move the view cursor
+ xCell = xTextTable->getCellByName( xTextTableCursor->getRangeName() );
+ mxTextViewCursor->gotoRange( uno::Reference< text::XTextRange >( xCell, uno::UNO_QUERY_THROW ), sal_False );
+}
+
+void SAL_CALL
+SwVbaSelection::MoveRight( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nUnit = word::WdUnits::wdCharacter;
+ sal_Int32 nCount = 1;
+ sal_Int32 nExtend = word::WdMovementType::wdMove;
+
+ if( _unit.hasValue() )
+ _unit >>= nUnit;
+ if( _count.hasValue() )
+ _count >>= nCount;
+ if( _extend.hasValue() )
+ _extend >>= nExtend;
+
+ if( nCount == 0 )
+ return;
+
+ if( nCount < 0 )
+ {
+ // TODO: call MoveLeft;
+ MoveLeft( _unit, uno::makeAny( -nCount ), _extend );
+ return;
+ }
+
+ switch( nUnit )
+ {
+ case word::WdUnits::wdCell:
+ {
+ if( nExtend == word::WdMovementType::wdExtend )
+ {
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ return;
+ }
+ NextCell( nCount, MOVE_RIGHT );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ break;
+ }
+ }
+
+}
+
+void SAL_CALL
+SwVbaSelection::MoveLeft( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nUnit = word::WdUnits::wdCharacter;
+ sal_Int32 nCount = 1;
+ sal_Int32 nExtend = word::WdMovementType::wdMove;
+
+ if( _unit.hasValue() )
+ _unit >>= nUnit;
+ if( _count.hasValue() )
+ _count >>= nCount;
+ if( _extend.hasValue() )
+ _extend >>= nExtend;
+
+ if( nCount == 0 )
+ return;
+
+ if( nCount < 0 )
+ {
+ MoveRight( _unit, uno::makeAny( -nCount ), _extend );
+ return;
+ }
+
+ switch( nUnit )
+ {
+ case word::WdUnits::wdCell:
+ {
+ if( nExtend == word::WdMovementType::wdExtend )
+ {
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ return;
+ }
+ NextCell( nCount, MOVE_LEFT );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ break;
+ }
+ }
+
+}
+
+void SAL_CALL
+SwVbaSelection::MoveDown( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nUnit = word::WdUnits::wdCharacter;
+ sal_Int32 nCount = 1;
+ sal_Int32 nExtend = word::WdMovementType::wdMove;
+
+ if( _unit.hasValue() )
+ _unit >>= nUnit;
+ if( _count.hasValue() )
+ _count >>= nCount;
+ if( _extend.hasValue() )
+ _extend >>= nExtend;
+
+ if( nCount == 0 )
+ return;
+
+ if( nCount < 0 )
+ {
+ // TODO: call MoveLeft;
+ //MoveUp( _unit, uno::makeAny( -nCount ), _extend );
+ return;
+ }
+
+ switch( nUnit )
+ {
+ case word::WdUnits::wdLine:
+ {
+ uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ sal_Bool bExpand = ( nExtend == word::WdMovementType::wdMove ) ? sal_False : sal_True;
+ xViewCursor->goDown( nCount, bExpand );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ break;
+ }
+ }
+
+}
+
+void SAL_CALL
+SwVbaSelection::TypeParagraph() throw ( uno::RuntimeException )
+{
+ // #FIXME: if the selection is an entire paragraph, it's replaced
+ // by the new paragraph
+ sal_Bool isCollapsed = mxTextViewCursor->isCollapsed();
+ InsertParagraph();
+ if( isCollapsed )
+ mxTextViewCursor->collapseToStart();
+}
+
+void SAL_CALL
+SwVbaSelection::InsertParagraph() throw ( uno::RuntimeException )
+{
+ // #FIME: the selection should include the new paragraph.
+ getRange()->InsertParagraph();
+}
+
+void SAL_CALL
+SwVbaSelection::InsertParagraphBefore() throw ( uno::RuntimeException )
+{
+ getRange()->InsertParagraphBefore();
+}
+
+void SAL_CALL
+SwVbaSelection::InsertParagraphAfter() throw ( uno::RuntimeException )
+{
+ getRange()->InsertParagraphAfter();
+}
+
+uno::Reference< word::XParagraphFormat > SAL_CALL
+SwVbaSelection::getParagraphFormat() throw ( uno::RuntimeException )
+{
+ return getRange()->getParagraphFormat();
+}
+
+void SAL_CALL
+SwVbaSelection::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& rParagraphFormat ) throw ( uno::RuntimeException )
+{
+ return getRange()->setParagraphFormat( rParagraphFormat );
+}
+
+uno::Reference< word::XFind > SAL_CALL
+SwVbaSelection::getFind() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xTextRange = GetSelectedRange();
+ return uno::Reference< word::XFind >( new SwVbaFind( this, mxContext, mxModel, xTextRange ) );
+}
+
+uno::Reference< word::XStyle > SAL_CALL
+SwVbaSelection::getStyle() throw ( uno::RuntimeException )
+{
+ return getRange()->getStyle();
+}
+
+void SAL_CALL
+SwVbaSelection::setStyle( const uno::Reference< word::XStyle >& rStyle ) throw ( uno::RuntimeException )
+{
+ return getRange()->setStyle( rStyle );
+}
+
+uno::Reference< word::XFont > SAL_CALL
+SwVbaSelection::getFont() throw ( uno::RuntimeException )
+{
+ return getRange()->getFont();
+}
+
+void SAL_CALL
+SwVbaSelection::TypeBackspace() throw ( uno::RuntimeException )
+{
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SwBackspace"));
+ dispatchRequests( mxModel,url );
+}
+
+uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _what, const uno::Any& _which, const uno::Any& _count, const uno::Any& _name ) throw (uno::RuntimeException)
+{
+ sal_Int32 nWhat = 0;
+ if( ( _what >>= nWhat ) != sal_True )
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ switch( nWhat )
+ {
+ case word::WdGoToItem::wdGoToBookmark:
+ {
+ rtl::OUString sName;
+ uno::Reference< word::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ uno::Reference< word::XBookmark > xBookmark( xApplication->getActiveDocument()->Bookmarks(_name), uno::UNO_QUERY_THROW );
+ xBookmark->Select();
+ //return uno::Reference< word::XRange >( xBookmark->Range(), uno::UNO_QUERY_THROW );
+ break;
+ }
+ case word::WdGoToItem::wdGoToPage:
+ {
+ uno::Reference< text::XPageCursor > xPageCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ sal_Int32 nCurrPage = xPageCursor->getPage();
+ sal_Int32 nLastPage = word::getPageCount( mxModel );
+ sal_Int32 nCount = 0;
+ if( _count.hasValue() )
+ _count >>= nCount;
+ sal_Int32 nWhich = 0;
+ if( _which.hasValue() )
+ _which >>= nWhich;
+ sal_Int32 nPage = 0;
+ switch( nWhich )
+ {
+ case word::WdGoToDirection::wdGoToLast:
+ {
+ nPage = nLastPage;
+ break;
+ }
+ case word::WdGoToDirection::wdGoToNext:
+ {
+ nPage = nCurrPage + 1;
+ break;
+ }
+ case word::WdGoToDirection::wdGoToPrevious:
+ {
+ nPage = nCurrPage - 1;
+ break;
+ }
+ default:
+ {
+ nPage = nCount;
+ }
+ }
+ if( nPage <= 0 )
+ nPage = 1;
+ if( nPage > nLastPage )
+ nPage = nLastPage;
+ xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
+ break;
+ }
+ case word::WdGoToItem::wdGoToSection:
+ {
+ // TODO: implement Section object
+ }
+ default:
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ return getRange();
+}
+
+::sal_Int32 SAL_CALL SwVbaSelection::getLanguageID() throw (uno::RuntimeException)
+{
+ return getRange()->getLanguageID();
+}
+
+void SAL_CALL SwVbaSelection::setLanguageID( ::sal_Int32 _languageid ) throw (uno::RuntimeException)
+{
+ getRange()->setLanguageID( _languageid );
+}
+
+uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::RuntimeException)
+{
+ uno::Any result;
+ //uno::Reference< view::XSelectionSupplier > xSel( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ //uno::Any aSelectedObject = xSel->getSelection();
+ switch( _type )
+ {
+ case word::WdInformation::wdActiveEndPageNumber:
+ {
+ result = uno::makeAny( SwVbaInformationHelper::handleWdActiveEndPageNumber( mxTextViewCursor ) );
+ break;
+ }
+ case word::WdInformation::wdNumberOfPagesInDocument:
+ {
+ result = uno::makeAny( SwVbaInformationHelper::handleWdNumberOfPagesInDocument( mxModel ) );
+ break;
+ }
+ case word::WdInformation::wdVerticalPositionRelativeToPage:
+ {
+ result = uno::makeAny( SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( mxModel, mxTextViewCursor ) );
+ break;
+ }
+ default:
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ // This method fails to restore the previouse selection
+ //xSel->select( aSelectedObject );
+ return result;
+}
+
+void SAL_CALL SwVbaSelection::InsertBreak( const uno::Any& _breakType ) throw (uno::RuntimeException)
+{
+ getRange()->InsertBreak( _breakType );
+}
+
+uno::Any SAL_CALL
+SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ // Hacky implementation due to missing api ( and lack of knowledge )
+ // we can only support a selection that is a single table
+ if ( !aIndex.hasValue() ) // currently we can't support multiple tables in a selection
+ throw uno::RuntimeException();
+ // if the current selection is a XTextTableCursor and the index is 1 then we can service this request, otherwise we just have to throw
+ uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY );
+
+ if ( !xTextTableCursor.is() )
+ throw uno::RuntimeException();
+
+ sal_Int32 nIndex = 0;
+ aIndex >>= nIndex;
+
+ uno::Any aRet;
+
+ if ( nIndex != 1 )
+ throw uno::RuntimeException();
+ SwXTextTableCursor* pTTCursor = dynamic_cast< SwXTextTableCursor* >( xTextTableCursor.get() );
+ if ( pTTCursor )
+ {
+ SwFrmFmt* pFmt = pTTCursor->GetFrmFmt();
+ rtl::OUString sTableName;
+ if ( pFmt )
+ {
+ uno::Reference< text::XTextTable > xTbl = SwXTextTables::GetObject(*pFmt);
+ uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTbl );
+ aRet <<= xVBATbl;
+ }
+ }
+ return aRet;
+
+}
+
+uno::Any SAL_CALL
+SwVbaSelection::Fields( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, mxModel ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Reference< word::XHeaderFooter > SAL_CALL
+SwVbaSelection::getHeaderFooter() throw ( uno::RuntimeException )
+{
+ uno::Reference< text::XText > xCurrentText = word::getXTextViewCursor( mxModel )->getText();
+ if( HeaderFooterHelper::isHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isFooter( mxModel, xCurrentText ) )
+ {
+ uno::Reference< beans::XPropertySet > xPageStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW );
+ sal_Int32 nIndex = word::WdHeaderFooterIndex::wdHeaderFooterPrimary;
+ sal_Bool isHeader = HeaderFooterHelper::isHeader( mxModel, xCurrentText );
+ if( HeaderFooterHelper::isEvenPagesHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isEvenPagesFooter( mxModel, xCurrentText ) )
+ nIndex = word::WdHeaderFooterIndex::wdHeaderFooterEvenPages;
+ else if( HeaderFooterHelper::isFirstPageHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isFirstPageFooter( mxModel, xCurrentText ) )
+ nIndex = word::WdHeaderFooterIndex::wdHeaderFooterFirstPage;
+
+ return uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, xPageStyleProps, isHeader, nIndex ) );
+
+ }
+ return uno::Reference< word::XHeaderFooter >();
+}
+
+uno::Any SAL_CALL
+SwVbaSelection::ShapeRange( ) throw (uno::RuntimeException)
+{
+ uno::Reference< drawing::XShapes > xShapes( mxModel->getCurrentSelection(), uno::UNO_QUERY );
+
+ if ( !xShapes.is() )
+ throw uno::RuntimeException();
+
+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< drawing::XDrawPage > xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference< container::XIndexAccess > xShapesAccess( xShapes, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< msforms::XShapeRange >( new ScVbaShapeRange( this, mxContext, xShapesAccess, xDrawPage, mxModel ) ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaSelection::getStart() throw (uno::RuntimeException)
+{
+ return getRange()->getStart();
+}
+
+void SAL_CALL SwVbaSelection::setStart( ::sal_Int32 _start ) throw (uno::RuntimeException)
+{
+ getRange()->setStart( _start );
+}
+::sal_Int32 SAL_CALL SwVbaSelection::getEnd() throw (uno::RuntimeException)
+{
+ return getRange()->getEnd();
+}
+
+void SAL_CALL SwVbaSelection::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeException)
+{
+ getRange()->setEnd( _end );
+}
+
+rtl::OUString&
+SwVbaSelection::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSelection") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaSelection::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Selection" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx
new file mode 100644
index 000000000000..a5079340ee19
--- /dev/null
+++ b/sw/source/ui/vba/vbaselection.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * 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_VBA_SELECTION_HXX
+#define SW_VBA_SELECTION_HXX
+
+#include <ooo/vba/word/XSelection.hpp>
+#include <ooo/vba/word/XRange.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <ooo/vba/word/XParagraphFormat.hpp>
+#include <ooo/vba/word/XFind.hpp>
+#include <ooo/vba/word/XStyle.hpp>
+#include <ooo/vba/word/XFont.hpp>
+#include <ooo/vba/word/XHeaderFooter.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XSelection > SwVbaSelection_BASE;
+
+class SwVbaSelection : public SwVbaSelection_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XTextViewCursor > mxTextViewCursor;
+ css::uno::Reference< ooo::vba::word::XRange > mxRange;
+
+ enum E_DIRECTION
+ {
+ MOVE_LEFT = 1,
+ MOVE_RIGHT,
+ MOVE_UP,
+ MOVE_DOWN
+ };
+
+private:
+ void NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw ( css::uno::RuntimeException );
+ css::uno::Reference< css::text::XTextRange > GetSelectedRange() throw ( css::uno::RuntimeException );
+
+public:
+ SwVbaSelection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaSelection();
+
+ // Attribute
+ virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setText( const rtl::OUString& rText ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL getRange() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL HomeKey( const css::uno::Any& _unit, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL EndKey( const css::uno::Any& _unit, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL TypeText( const rtl::OUString& rText ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Delete( const css::uno::Any& _unit, const css::uno::Any& _count ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL MoveRight( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL MoveLeft( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL MoveDown( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL TypeParagraph() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL InsertParagraph() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL InsertParagraphBefore() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL InsertParagraphAfter() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setParagraphFormat( const css::uno::Reference< ooo::vba::word::XParagraphFormat >& rParagraphFormat ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XFind > SAL_CALL getFind() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XStyle > SAL_CALL getStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStyle( const css::uno::Reference< ooo::vba::word::XStyle >& _xStyle ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL TypeBackspace() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL GoTo( const css::uno::Any& _what, const css::uno::Any& _which, const css::uno::Any& _count, const css::uno::Any& _name ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getLanguageID( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Information( sal_Int32 _type ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL InsertBreak( const css::uno::Any& _breakType ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Tables( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Fields( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XHeaderFooter > SAL_CALL getHeaderFooter() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL ShapeRange( ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getStart() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStart( ::sal_Int32 _start ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getEnd() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setEnd( ::sal_Int32 _end ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_SELECTION_HXX */
diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx
new file mode 100644
index 000000000000..cf49da020284
--- /dev/null
+++ b/sw/source/ui/vba/vbastyle.cxx
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbastyle.hxx"
+#include <ooo/vba/word/WdStyleType.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <i18npool/mslangid.hxx>
+#include "vbafont.hxx"
+#include "vbapalette.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+
+SwVbaStyle::SwVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet ) throw ( script::BasicErrorException, uno::RuntimeException ) : SwVbaStyle_BASE( xParent, xContext ) , mxStyleProps( _xPropertySet )
+{
+ mxStyle.set( _xPropertySet, uno::UNO_QUERY_THROW );
+}
+
+void SAL_CALL
+SwVbaStyle::setName( const ::rtl::OUString& Name ) throw (uno::RuntimeException)
+{
+ mxStyle->setName(Name);
+}
+
+::rtl::OUString SAL_CALL
+SwVbaStyle::getName() throw (uno::RuntimeException)
+{
+ return mxStyle->getName();
+}
+
+sal_Int32 SwVbaStyle::getLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps ) throw (uno::RuntimeException)
+{
+ lang::Locale aLocale;
+ xTCProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharLocale") ) ) >>= aLocale;
+ return MsLangId::convertLocaleToLanguage( aLocale );
+}
+
+void SwVbaStyle::setLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (uno::RuntimeException)
+{
+ lang::Locale aLocale = MsLangId::convertLanguageToLocale( static_cast<LanguageType>(_languageid) );
+ xTCProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharLocale") ), uno::makeAny( aLocale ) ) ;
+}
+
+::sal_Int32 SAL_CALL SwVbaStyle::getLanguageID() throw (uno::RuntimeException)
+{
+ return getLanguageID( mxStyleProps );
+}
+
+void SAL_CALL SwVbaStyle::setLanguageID( ::sal_Int32 _languageid ) throw (uno::RuntimeException)
+{
+ setLanguageID( mxStyleProps, _languageid );
+}
+
+::sal_Int32 SAL_CALL SwVbaStyle::getType() throw (uno::RuntimeException)
+{
+ sal_Int32 nType = word::WdStyleType::wdStyleTypeParagraph;
+ uno::Reference< lang::XServiceInfo > xServiceInfo( mxStyle, uno::UNO_QUERY_THROW );
+ if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.ParagraphStyle") ) ) )
+ nType = word::WdStyleType::wdStyleTypeParagraph;
+ else if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.CharacterStyle") ) ) )
+ nType = word::WdStyleType::wdStyleTypeCharacter;
+ else // if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingStyle") ) ) )
+ nType = word::WdStyleType::wdStyleTypeList;
+ return nType;
+}
+
+uno::Reference< word::XFont > SAL_CALL
+SwVbaStyle::getFont() throw ( uno::RuntimeException )
+{
+ VbaPalette aColors;
+ return new SwVbaFont( mxParent, mxContext, aColors.getPalette(), mxStyleProps );
+}
+
+void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xTCProps, const uno::Reference< ooo::vba::word::XStyle >& xStyle )throw (uno::RuntimeException)
+{
+ rtl::OUString aStyleType = getOOoStyleTypeFromMSWord( xStyle->getType() );
+ xTCProps->setPropertyValue( aStyleType, uno::makeAny( xStyle->getName() ) );
+}
+
+rtl::OUString SwVbaStyle::getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType )
+{
+ rtl::OUString aStyleType;
+ switch( _wdStyleType )
+ {
+ case word::WdStyleType::wdStyleTypeParagraph:
+ case word::WdStyleType::wdStyleTypeTable:
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") );
+ break;
+ }
+ case word::WdStyleType::wdStyleTypeCharacter:
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") );
+ break;
+ }
+ case word::WdStyleType::wdStyleTypeList:
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName") );
+ break;
+ }
+ default:
+ DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
+ }
+ return aStyleType;
+}
+
+rtl::OUString&
+SwVbaStyle::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaStyle") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaStyle::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.XStyle" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx
new file mode 100644
index 000000000000..401baa5337a1
--- /dev/null
+++ b/sw/source/ui/vba/vbastyle.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * 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_VBA_STYLE_HXX
+#define SW_VBA_STYLE_HXX
+#include <ooo/vba/word/XStyle.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/style/XStyle.hpp>
+#include <ooo/vba/word/XFont.hpp>
+
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XStyle > SwVbaStyle_BASE;
+
+class SwVbaStyle : public SwVbaStyle_BASE
+{
+private:
+ css::uno::Reference< css::beans::XPropertySet > mxStyleProps;
+ css::uno::Reference< css::style::XStyle > mxStyle;
+public:
+ SwVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
+ virtual ~SwVbaStyle(){}
+
+ static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, const css::uno::Reference< ooo::vba::word::XStyle >& xStyle ) throw (css::uno::RuntimeException);
+ static rtl::OUString getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType );
+ static sal_Int32 getLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps ) throw (css::uno::RuntimeException);
+ static void setLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (css::uno::RuntimeException);
+
+ // Attributes
+ virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setName( const rtl::OUString& Name ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getLanguageID( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif //SW_VBA_AXIS_HXX
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
new file mode 100644
index 000000000000..371c1225cafa
--- /dev/null
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -0,0 +1,377 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbastyles.hxx"
+#include "vbastyle.hxx"
+#include <cppuhelper/implbase3.hxx>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/style/XStyle.hpp>
+#include <ooo/vba/word/WdBuiltinStyle.hpp>
+#include <ooo/vba/word/WdStyleType.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+struct BuiltinStyleTable
+{
+ sal_Int32 wdBuiltinStyle;
+ const sal_Char* pOOoStyleName;
+ sal_Int32 wdStyleType;
+};
+
+const BuiltinStyleTable aBuiltinStyleTable[] =
+{
+ { word::WdBuiltinStyle::wdStyleBlockQuotation, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyText, "Text body", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyText2, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyText3, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyTextFirstIndent, "First line indent", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyTextFirstIndent2, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyTextIndent, "Text body indent", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyTextIndent2, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleBodyTextIndent3, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleCaption, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleClosing, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleCommentReference, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleCommentText, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleDate, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleDefaultParagraphFont, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleEmphasis, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleEndnoteReference, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleEndnoteText, "Endnote", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleEnvelopeAddress, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleEnvelopeReturn, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleFooter, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleFootnoteReference, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleFootnoteText, "Footnote", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeader, "Header", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading1, "Heading 1", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading2, "Heading 2", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading3, "Heading 3", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading4, "Heading 4", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading5, "Heading 5", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading6, "Heading 6", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading7, "Heading 7", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading8, "Heading 8", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHeading9, "Heading 9", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlAcronym, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlAddress, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlCite, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlCode, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlDfn, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlKbd, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlNormal, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlPre, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlSamp, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlTt, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHtmlVar, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHyperlink, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleHyperlinkFollowed, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex1, "Index 1", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex2, "Index 2", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex3, "Index 3", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex4, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex5, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex6, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex7, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex8, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndex9, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleIndexHeading, "Index Heading", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleLineNumber, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleList, "List", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleList2, "List 2", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleList3, "List 3", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleList4, "List 4", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleList5, "List 5", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleListBullet, "List 1", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListBullet2, "List 2", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListBullet3, "List 3", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListBullet4, "List 4", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListBullet5, "List 5", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListContinue, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleListContinue2, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleListContinue3, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleListContinue4, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleListContinue5, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleListNumber, "Numbering 1", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListNumber2, "Numbering 2", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListNumber3, "Numbering 3", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListNumber4, "Numbering 4", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleListNumber5, "Numbering 5", word::WdStyleType::wdStyleTypeList },
+ { word::WdBuiltinStyle::wdStyleMacroText, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleMessageHeader, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleNavPane, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleNormal, "Default", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleNormalIndent, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleNormalTable, "Table", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleNoteHeading, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStylePageNumber, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStylePlainText, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleSalutation, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleSignature, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleStrong, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleSubtitle, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTableOfAuthorities, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTableOfFigures, "", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTitle, "Title", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOAHeading, "Contents Heading", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC1, "Contents 1", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC2, "Contents 2", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC3, "Contents 3", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC4, "Contents 4", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC5, "Contents 5", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC6, "Contents 6", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC7, "Contents 7", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC8, "Contents 8", word::WdStyleType::wdStyleTypeParagraph },
+ { word::WdBuiltinStyle::wdStyleTOC9, "Contents 9", word::WdStyleType::wdStyleTypeParagraph },
+ { 0, 0, 0 }
+};
+
+
+static uno::Sequence< rtl::OUString > getStyleTypes()
+{
+ uno::Sequence< rtl::OUString > aRet(3);
+ rtl::OUString* pArray = aRet.getArray();
+ pArray[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
+ pArray[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") );
+ pArray[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyles") );
+ return aRet;
+}
+
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > StyleEnumeration_BASE;
+typedef ::cppu::WeakImplHelper3< container::XNameAccess, container::XIndexAccess, container::XEnumerationAccess > StyleCollectionHelper_BASE;
+/*
+class StylesEnumeration : public StyleEnumeration_BASE
+{
+public:
+ StylesEnumeration( const SheetMap& sMap ) : mSheetMap( sMap ), mIt( mSheetMap.begin() ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( mIt != mSheetMap.end() );
+ }
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasMoreElements() )
+ throw container::NoSuchElementException();
+ uno::Reference< sheet::XSpreadsheet > xSheet( *mIt++ );
+ return uno::makeAny( xSheet ) ;
+ }
+};
+*/
+class StyleCollectionHelper : public StyleCollectionHelper_BASE
+{
+private:
+ uno::Reference< frame::XModel > mxModel;
+ uno::Reference< container::XNameAccess > mxStyleFamilies;
+ uno::Reference< container::XNameContainer > mxCurrentStyleFamily;
+ uno::Any cachePos;
+public:
+ StyleCollectionHelper( const uno::Reference< frame::XModel >& _xModel ) : mxModel( _xModel )
+ {
+ uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( _xModel, uno::UNO_QUERY_THROW);
+ mxStyleFamilies = xStyleSupplier->getStyleFamilies();
+ }
+ uno::Reference< container::XNameContainer > getCurrentStyleFamily(){ return mxCurrentStyleFamily; }
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return style::XStyle::static_type(0); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return getCount() > 0; }
+ // XNameAcess
+ virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasByName(aName) )
+ throw container::NoSuchElementException();
+ return cachePos;
+ }
+ virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > sNames( getCount() );
+ rtl::OUString* pString = sNames.getArray();
+ uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
+ sal_Int32 nCount = 0;
+ for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
+ {
+ uno::Reference< container::XNameAccess > xNameAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
+ uno::Sequence< rtl::OUString > sElementNames = xNameAccess->getElementNames();
+ for( sal_Int32 j = 0; j < sElementNames.getLength(); j++ )
+ {
+ pString[nCount++] = sElementNames[j];
+ }
+ }
+ return sNames;
+ }
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
+ for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
+ {
+ uno::Reference< container::XNameAccess > xNameAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
+ if( xNameAccess->hasByName( aName ) )
+ {
+ cachePos = xNameAccess->getByName( aName );
+ mxCurrentStyleFamily.set( xNameAccess, uno::UNO_QUERY_THROW );
+ return sal_True;
+ }
+ }
+ return sal_False;
+ }
+
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
+ sal_Int32 nCount = 0;
+ for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
+ {
+ uno::Reference< container::XIndexAccess > xIndexAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
+ nCount += xIndexAccess->getCount();
+ }
+ return nCount;
+ }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ // FIXME: need to make a alphabetically sorted list of style names
+ uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
+ for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
+ {
+ uno::Reference< container::XIndexAccess > xIndexAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
+ sal_Int32 nCount = xIndexAccess->getCount();
+ if( Index >= nCount )
+ Index -= nCount;
+ else
+ {
+ mxCurrentStyleFamily.set( xIndexAccess, uno::UNO_QUERY_THROW );
+ return xIndexAccess->getByIndex( Index );
+ }
+ }
+ throw lang::IndexOutOfBoundsException();
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ // FIXME:
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+};
+
+SwVbaStyles::SwVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : SwVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new StyleCollectionHelper( xModel ) ) ), mxModel( xModel )
+{
+ mxMSF.set( mxModel, uno::UNO_QUERY_THROW );
+}
+
+uno::Any
+SwVbaStyles::createCollectionObject(const uno::Any& aObject)
+{
+ uno::Reference< beans::XPropertySet > xStyleProp( aObject, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProp ) ) );
+}
+
+uno::Type SAL_CALL
+SwVbaStyles::getElementType() throw (uno::RuntimeException)
+{
+ return word::XStyle::static_type(0);
+}
+
+uno::Reference< container::XEnumeration > SAL_CALL
+SwVbaStyles::createEnumeration() throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+uno::Any SAL_CALL
+SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::RuntimeException)
+{
+ //handle WdBuiltinStyle
+ sal_Int32 nIndex = 0;
+ if( ( Index1 >>= nIndex ) && ( nIndex < 0 ) )
+ {
+ for( const BuiltinStyleTable* pTable = aBuiltinStyleTable; pTable != NULL; pTable++ )
+ {
+ if( nIndex == pTable->wdBuiltinStyle )
+ {
+ rtl::OUString aStyleName = rtl::OUString::createFromAscii( pTable->pOOoStyleName );
+ if( aStyleName.getLength() > 0 )
+ {
+ rtl::OUString aStyleType = SwVbaStyle::getOOoStyleTypeFromMSWord( pTable->wdStyleType );
+ switch( pTable->wdStyleType )
+ {
+ case word::WdStyleType::wdStyleTypeParagraph:
+ case word::WdStyleType::wdStyleTypeTable:
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
+ break;
+ }
+ case word::WdStyleType::wdStyleTypeCharacter:
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") );
+ break;
+ }
+ case word::WdStyleType::wdStyleTypeList:
+ {
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyles") );
+ break;
+ }
+ default:
+ DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
+ }
+ uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxModel, uno::UNO_QUERY_THROW);
+ uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( aStyleType ), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xStyleProps( xStylesAccess->getByName( aStyleName ), uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProps ) ) );
+ }
+ else
+ {
+ OSL_TRACE("SwVbaStyles::Item: the builtin style type is not implemented");
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ }
+ }
+ }
+ return SwVbaStyles_BASE::Item( Index1, Index2 );
+}
+
+rtl::OUString&
+SwVbaStyles::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaStyles") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaStyles::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.XStyles" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbastyles.hxx b/sw/source/ui/vba/vbastyles.hxx
new file mode 100644
index 000000000000..9cd2e2ff5b1a
--- /dev/null
+++ b/sw/source/ui/vba/vbastyles.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * 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_VBA_STYLES_HXX
+#define SW_VBA_STYLES_HXX
+
+#include <ooo/vba/word/XStyles.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+typedef CollTestImplHelper< ooo::vba::word::XStyles > SwVbaStyles_BASE;
+class SwVbaStyles: public SwVbaStyles_BASE
+{
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
+public:
+ SwVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::script::BasicErrorException );
+
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::uno::RuntimeException);
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ virtual css::uno::Any createCollectionObject(const css::uno::Any&);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
new file mode 100644
index 000000000000..71b2389bc96b
--- /dev/null
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbasystem.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <ooo/vba/word/WdCursorType.hpp>
+#include <tools/diagnose_ex.h>
+#include <tools/config.hxx>
+#include <tools/string.hxx>
+#include <osl/file.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/string.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+PrivateProfileStringListener::PrivateProfileStringListener( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey )
+ :maFileName( rFileName ), maGroupName( rGroupName ), maKey( rKey )
+{
+}
+
+PrivateProfileStringListener::~PrivateProfileStringListener()
+{
+}
+
+void PrivateProfileStringListener::Initialize( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey )
+{
+ maFileName = rFileName;
+ maGroupName = rGroupName;
+ maKey = rKey;
+}
+
+uno::Any PrivateProfileStringListener::getValueEvent()
+{
+ // get the private profile string
+ Config aCfg( maFileName );
+ aCfg.SetGroup( maGroupName );
+ rtl::OUString sValue = String( aCfg.ReadKey( maKey ), RTL_TEXTENCODING_DONTKNOW );
+
+ return uno::makeAny( sValue );
+}
+
+void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value )
+{
+ // set the private profile string
+ Config aCfg( maFileName );
+ aCfg.SetGroup( maGroupName );
+
+ rtl::OUString aValue;
+ value >>= aValue;
+ aCfg.WriteKey( maKey, ByteString( aValue.getStr(), RTL_TEXTENCODING_DONTKNOW ) );
+}
+
+SwVbaSystem::SwVbaSystem( uno::Reference<uno::XComponentContext >& xContext ): SwVbaSystem_BASE( uno::Reference< XHelperInterface >(), xContext )
+{
+}
+
+SwVbaSystem::~SwVbaSystem()
+{
+}
+
+sal_Int32 SAL_CALL
+SwVbaSystem::getCursor() throw (uno::RuntimeException)
+{
+ sal_Int32 nPointerStyle = getPointerStyle( getCurrentWordDoc(mxContext) );
+
+ switch( nPointerStyle )
+ {
+ case POINTER_ARROW:
+ return word::WdCursorType::wdCursorNorthwestArrow;
+ case POINTER_NULL:
+ return word::WdCursorType::wdCursorNormal;
+ case POINTER_WAIT:
+ return word::WdCursorType::wdCursorWait;
+ case POINTER_TEXT:
+ return word::WdCursorType::wdCursorIBeam;
+ default:
+ return word::WdCursorType::wdCursorNormal;
+ }
+}
+
+void SAL_CALL
+SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
+{
+ try
+ {
+ switch( _cursor )
+ {
+ case word::WdCursorType::wdCursorNorthwestArrow:
+ {
+ const Pointer& rPointer( POINTER_ARROW );
+ setCursorHelper( getCurrentWordDoc(mxContext), rPointer, sal_False );
+ break;
+ }
+ case word::WdCursorType::wdCursorWait:
+ {
+ const Pointer& rPointer( static_cast< PointerStyle >( POINTER_WAIT ) );
+ //It will set the edit window, toobar and statusbar's mouse pointer.
+ setCursorHelper( getCurrentWordDoc(mxContext), rPointer, sal_True );
+ break;
+ }
+ case word::WdCursorType::wdCursorIBeam:
+ {
+ const Pointer& rPointer( static_cast< PointerStyle >( POINTER_TEXT ) );
+ //It will set the edit window, toobar and statusbar's mouse pointer.
+ setCursorHelper( getCurrentWordDoc( mxContext ), rPointer, sal_True );
+ break;
+ }
+ case word::WdCursorType::wdCursorNormal:
+ {
+ const Pointer& rPointer( POINTER_NULL );
+ setCursorHelper( getCurrentWordDoc( mxContext ), rPointer, sal_False );
+ break;
+ }
+ default:
+ throw uno::RuntimeException( rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() );
+ // TODO: isn't this a flaw in the API? It should be allowed to throw an
+ // IllegalArgumentException, or so
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+uno::Any SAL_CALL
+SwVbaSystem::PrivateProfileString( const rtl::OUString& rFilename, const rtl::OUString& rSection, const rtl::OUString& rKey ) throw ( uno::RuntimeException )
+{
+ if( rFilename.getLength() == 0 )
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+
+ // FIXME: need to detect whether it is a relative file path
+ // we need to detect if this is a URL, if not then assume its a file path
+ rtl::OUString sFileUrl;
+ INetURLObject aObj;
+ aObj.SetURL( rFilename );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ if ( bIsURL )
+ sFileUrl = rFilename;
+ else
+ osl::FileBase::getFileURLFromSystemPath( rFilename, sFileUrl);
+
+ ByteString aGroupName = ByteString( rSection.getStr(), RTL_TEXTENCODING_DONTKNOW);
+ ByteString aKey = ByteString( rKey.getStr(), RTL_TEXTENCODING_DONTKNOW);
+ maPrivateProfileStringListener.Initialize( sFileUrl, aGroupName, aKey );
+
+ return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( &maPrivateProfileStringListener ) ) );
+}
+
+rtl::OUString&
+SwVbaSystem::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSystem") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaSystem::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.System" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbasystem.hxx b/sw/source/ui/vba/vbasystem.hxx
new file mode 100644
index 000000000000..e11494857617
--- /dev/null
+++ b/sw/source/ui/vba/vbasystem.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * 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_VBA_SYSTEM_HXX
+#define SW_VBA_SYSTEM_HXX
+
+#include <ooo/vba/word/XSystem.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <vbahelper/vbapropvalue.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XSystem > SwVbaSystem_BASE;
+
+class PrivateProfileStringListener : public PropListener
+{
+private:
+ rtl::OUString maFileName;
+ ByteString maGroupName;
+ ByteString maKey;
+public:
+ PrivateProfileStringListener(){};
+ PrivateProfileStringListener( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey );
+ virtual ~PrivateProfileStringListener();
+ void Initialize( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey );
+
+ //PropListener
+ virtual void setValueEvent( const css::uno::Any& value );
+ virtual css::uno::Any getValueEvent();
+};
+
+class SwVbaSystem : public SwVbaSystem_BASE
+{
+private:
+ PrivateProfileStringListener maPrivateProfileStringListener;
+
+public:
+ SwVbaSystem( css::uno::Reference< css::uno::XComponentContext >& m_xContext );
+ virtual ~SwVbaSystem();
+
+ // XSystem
+ virtual sal_Int32 SAL_CALL getCursor() throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL setCursor( sal_Int32 _cursor ) throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL PrivateProfileString( const rtl::OUString& rFilename, const rtl::OUString& rSection, const rtl::OUString& rKey ) throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_SYSTEM_HXX */
diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx
new file mode 100644
index 000000000000..11969d6717a0
--- /dev/null
+++ b/sw/source/ui/vba/vbatable.cxx
@@ -0,0 +1,97 @@
+#include "vbatable.hxx"
+#include "vbarange.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/table/XTableRows.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include "vbaborders.hxx"
+#include "vbapalette.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaTable::SwVbaTable( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const uno::Reference< css::text::XTextTable >& xTextTable) throw ( uno::RuntimeException ) : SwVbaTable_BASE( rParent, rContext ), mxTextDocument( rDocument )
+{
+ mxTextTable.set( xTextTable, uno::UNO_QUERY_THROW );
+}
+
+uno::Reference< word::XRange > SAL_CALL
+SwVbaTable::Range( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ return new SwVbaRange( mxParent, mxContext, mxTextDocument, mxTextTable->getAnchor() );
+}
+
+void SAL_CALL
+SwVbaTable::Select( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XController > xController = xModel->getCurrentController();
+
+ uno::Reference< text::XTextViewCursorSupplier > xViewCursorSupplier( xController, uno::UNO_QUERY_THROW );
+ uno::Reference< view::XSelectionSupplier > xSelectionSupplier( xController, uno::UNO_QUERY_THROW );
+
+ // set the view cursor to the start of the table.
+ xSelectionSupplier->select( uno::makeAny( mxTextTable ) );
+
+ // go to the end of the table and span the view
+ uno::Reference< text::XTextViewCursor > xCursor = xViewCursorSupplier->getViewCursor();
+ xCursor->gotoEnd(sal_True);
+
+}
+
+void SAL_CALL
+SwVbaTable::Delete( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ uno::Reference< table::XTableRows > xRows( mxTextTable->getRows() );
+ xRows->removeByIndex( 0, xRows->getCount() );
+}
+
+uno::Reference< word::XRange > SAL_CALL
+SwVbaTable::ConvertToText( const uno::Any& /*Separator*/, const uno::Any& /*NestedTables*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ // #FIXME the helper api uses the dreaded dispatch mechanism, holding off
+ // implementation while I look for alternative solution
+ throw uno::RuntimeException();
+}
+
+rtl::OUString SAL_CALL
+SwVbaTable::getName() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XNamed > xNamed( mxTextTable, uno::UNO_QUERY_THROW );
+ return xNamed->getName();
+}
+
+uno::Any SAL_CALL
+SwVbaTable::Borders( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< table::XCellRange > aCellRange( mxTextTable, uno::UNO_QUERY_THROW );
+ VbaPalette aPalette;
+ uno::Reference< XCollection > xCol( new SwVbaBorders( this, mxContext, aCellRange, aPalette ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+// XHelperInterface
+rtl::OUString&
+SwVbaTable::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTable") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaTable::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Table" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbatable.hxx b/sw/source/ui/vba/vbatable.hxx
new file mode 100644
index 000000000000..7d913d718895
--- /dev/null
+++ b/sw/source/ui/vba/vbatable.hxx
@@ -0,0 +1,28 @@
+#ifndef SW_VBA_TABLE_HXX
+#define SW_VBA_TABLE_HXX
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <ooo/vba/word/XRange.hpp>
+#include <ooo/vba/word/XTable.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XTable > SwVbaTable_BASE;
+
+class SwVbaTable : public SwVbaTable_BASE
+{
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+public:
+ SwVbaTable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const css::uno::Reference< css::text::XTextTable >& xTextTable) throw ( css::uno::RuntimeException);
+ css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; };
+ virtual css::uno::Reference< ::ooo::vba::word::XRange > SAL_CALL Range( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ virtual void SAL_CALL Select( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ virtual css::uno::Reference< ::ooo::vba::word::XRange > SAL_CALL ConvertToText( const css::uno::Any& Separator, const css::uno::Any& NestedTables ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ virtual rtl::OUString SAL_CALL getName( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif
diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx
new file mode 100644
index 000000000000..9a10622400d3
--- /dev/null
+++ b/sw/source/ui/vba/vbatables.cxx
@@ -0,0 +1,131 @@
+#include "vbatables.hxx"
+#include "vbatable.hxx"
+#include "vbarange.hxx"
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <comphelper/componentcontext.hxx>
+
+using namespace ::ooo::vba;
+using namespace css;
+
+uno::Reference< container::XIndexAccess > lcl_getTables( const uno::Reference< frame::XModel >& xDoc )
+{
+ uno::Reference< container::XIndexAccess > xTables;
+ uno::Reference< text::XTextTablesSupplier > xSupp( xDoc, uno::UNO_QUERY );
+ if ( xSupp.is() )
+ xTables.set( xSupp->getTextTables(), uno::UNO_QUERY_THROW );
+ return xTables;
+}
+
+uno::Any lcl_createTable( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xDocument, const uno::Any& aSource )
+{
+ uno::Reference< text::XTextTable > xTextTable( aSource, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextDocument > xTextDocument( xDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< word::XTable > xTable( new SwVbaTable( xParent, xContext, xTextDocument, xTextTable ) );
+ return uno::makeAny( xTable );
+}
+
+typedef ::cppu::WeakImplHelper1< css::container::XEnumeration > EnumBase;
+
+class TableEnumerationImpl : public EnumBase
+{
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxDocument;
+ uno::Reference< container::XIndexAccess > mxIndexAccess;
+ sal_Int32 mnCurIndex;
+public:
+ TableEnumerationImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xDocument, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxParent( xParent ), mxContext( xContext ), mxDocument( xDocument ), mxIndexAccess( xIndexAccess ), mnCurIndex(0)
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( mnCurIndex < mxIndexAccess->getCount() );
+ }
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasMoreElements() )
+ throw container::NoSuchElementException();
+ return lcl_createTable( mxParent, mxContext, mxDocument, mxIndexAccess->getByIndex( mnCurIndex++ ) );
+ }
+
+};
+
+SwVbaTables::SwVbaTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xDocument ) : SwVbaTables_BASE( xParent, xContext , lcl_getTables( xDocument ) ), mxDocument( xDocument )
+{
+}
+
+
+uno::Reference< word::XTable > SAL_CALL
+SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& NumRows, const uno::Any& NumColumns, const uno::Any& /*DefaultTableBehavior*/, const uno::Any& /*AutoFitBehavior*/ ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ sal_Int32 nCols = 0;
+ sal_Int32 nRows = 0;
+ SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() );
+ // Preconditions
+ if ( !( pVbaRange && ( NumRows >>= nRows ) && ( NumColumns >>= nCols ) ) )
+ throw uno::RuntimeException(); // #FIXME better exception??
+ if ( nCols <= 0 || nRows <= 0 )
+ throw uno::RuntimeException(); // #FIXME better exception??
+
+ uno::Reference< frame::XModel > xModel( pVbaRange->getDocument(), uno::UNO_QUERY_THROW );
+ uno::Reference< lang::XMultiServiceFactory > xMsf( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange();
+
+ uno::Reference< text::XTextTable > xTable;
+ xTable.set( xMsf->createInstance( rtl::OUString::createFromAscii("com.sun.star.text.TextTable") ), uno::UNO_QUERY_THROW );
+/*
+ comphelper::ComponentContext aCtx( xMsf );
+ if ( !aCtx.createComponent( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ), xTable ) );
+ throw uno::RuntimeException(); // #FIXME better exception??
+*/
+ xTable->initialize( nRows, nCols );
+ uno::Reference< text::XText > xText = xTextRange->getText();
+ uno::Reference< text::XTextContent > xContext( xTable, uno::UNO_QUERY_THROW );
+
+ xText->insertTextContent( xTextRange, xContext, true );
+ uno::Reference< word::XTable > xVBATable( new SwVbaTable( mxParent, mxContext, pVbaRange->getDocument(), xTable ) );
+ return xVBATable;
+}
+
+uno::Reference< container::XEnumeration > SAL_CALL
+SwVbaTables::createEnumeration() throw (uno::RuntimeException)
+{
+ return new TableEnumerationImpl( mxParent, mxContext, mxDocument, m_xIndexAccess );
+}
+
+// ScVbaCollectionBaseImpl
+uno::Any
+SwVbaTables::createCollectionObject( const uno::Any& aSource )
+{
+ return lcl_createTable( mxParent, mxContext, mxDocument, aSource );
+}
+
+// XHelperInterface
+rtl::OUString&
+SwVbaTables::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTables") );
+ return sImplName;
+}
+
+// XEnumerationAccess
+uno::Type SAL_CALL
+SwVbaTables::getElementType() throw (uno::RuntimeException)
+{
+ return word::XTable::static_type(0);
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaTables::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Tables" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbatables.hxx b/sw/source/ui/vba/vbatables.hxx
new file mode 100644
index 000000000000..a789337a2839
--- /dev/null
+++ b/sw/source/ui/vba/vbatables.hxx
@@ -0,0 +1,28 @@
+#ifndef SW_VBA_TABLES_HXX
+#define SW_VBA_TABLES_HXX
+
+#include <ooo/vba/word/XTables.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+
+typedef CollTestImplHelper< ov::word::XTables > SwVbaTables_BASE;
+
+class SwVbaTables : public SwVbaTables_BASE
+{
+ css::uno::Reference< css::frame::XModel > mxDocument;
+public:
+ SwVbaTables( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xDocument );
+ // XTables
+ virtual css::uno::Reference< ov::word::XTable > SAL_CALL Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& NumRows, const css::uno::Any& NumColumns, const css::uno::Any& DefaultTableBehavior, const css::uno::Any& AutoFitBehavior ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ // ScVbaCollectionBaseImpl
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
new file mode 100644
index 000000000000..68476b301a17
--- /dev/null
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbatemplate.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include "wordvbahelper.hxx"
+#include "vbaautotextentry.hxx"
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/text/XAutoTextContainer.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaTemplate::SwVbaTemplate( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& rName )
+ : SwVbaTemplate_BASE( rParent, rContext ), mxModel( rModel ), msName( rName )
+{
+}
+
+
+SwVbaTemplate::~SwVbaTemplate()
+{
+}
+
+rtl::OUString
+SwVbaTemplate::getName() throw ( css::uno::RuntimeException )
+{
+ return msName;
+}
+
+uno::Any SAL_CALL
+SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory();
+ uno::Reference< text::XAutoTextContainer > xAutoTextContainer( xMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.AutoTextContainer") ) ), uno::UNO_QUERY_THROW );
+
+ // the default template is "Normal.dot" in Word.
+ rtl::OUString sGroup( RTL_CONSTASCII_USTRINGPARAM("Normal") );
+ sal_Int32 nIndex = msName.lastIndexOf( sal_Unicode('.') );
+ if( nIndex > 0 )
+ {
+ sGroup = msName.copy( 0, msName.lastIndexOf( sal_Unicode('.') ) );
+ // OSL_TRACE("SwVbaTemplate::AutoTextEntries: %s", rtl::OUStringToOString( sGroup, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
+ uno::Reference< container::XIndexAccess > xGroup;
+ if( xAutoTextContainer->hasByName( sGroup ) )
+ {
+ xGroup.set( xAutoTextContainer->getByName( sGroup ), uno::UNO_QUERY_THROW );
+ }
+ else
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Auto Text Entry doesn't exist") ), uno::Reference< uno::XInterface >() );
+ //xGroup.set( xAutoTextContainer->insertNewByName( sGroup ), uno::UNO_QUERY_THROW );
+ }
+
+ uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) );
+ if( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+rtl::OUString&
+SwVbaTemplate::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTemplate") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaTemplate::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Template" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbatemplate.hxx b/sw/source/ui/vba/vbatemplate.hxx
new file mode 100644
index 000000000000..073e5cc5db1e
--- /dev/null
+++ b/sw/source/ui/vba/vbatemplate.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * 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_VBA_TEMPLATE_HXX
+#define SW_VBA_TEMPLATE_HXX
+
+#include <ooo/vba/word/XTemplate.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XTemplate > SwVbaTemplate_BASE;
+
+class SwVbaTemplate : public SwVbaTemplate_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ rtl::OUString msName;
+public:
+ SwVbaTemplate( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext,
+ const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& );
+ virtual ~SwVbaTemplate();
+
+ // XTemplate
+ virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL AutoTextEntries( const css::uno::Any& index ) throw (css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_TEMPLATE_HXX */
diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx
new file mode 100644
index 000000000000..b62dc5642114
--- /dev/null
+++ b/sw/source/ui/vba/vbavariable.cxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbavariable.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaVariable::SwVbaVariable( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext,
+ const uno::Reference< beans::XPropertyAccess >& rUserDefined, const rtl::OUString& rName ) throw ( uno::RuntimeException ) :
+ SwVbaVariable_BASE( rParent, rContext ), mxUserDefined( rUserDefined ), maName( rName )
+{
+}
+
+SwVbaVariable::~SwVbaVariable()
+{
+}
+
+rtl::OUString SAL_CALL
+SwVbaVariable::getName() throw ( css::uno::RuntimeException )
+{
+ return maName;
+}
+
+void SAL_CALL
+SwVbaVariable::setName( const rtl::OUString& ) throw ( css::uno::RuntimeException )
+{
+ throw uno::RuntimeException( rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(" Fail to set name")), uno::Reference< uno::XInterface >() );
+}
+
+uno::Any SAL_CALL
+SwVbaVariable::getValue() throw ( css::uno::RuntimeException )
+{
+ uno::Reference< beans::XPropertySet > xProp( mxUserDefined, uno::UNO_QUERY_THROW );
+ return xProp->getPropertyValue( maName );
+}
+
+void SAL_CALL
+SwVbaVariable::setValue( const uno::Any& rValue ) throw ( css::uno::RuntimeException )
+{
+ // FIXME: fail to set the value if the new type of vaue is differenct from the original one.
+ uno::Reference< beans::XPropertySet > xProp( mxUserDefined, uno::UNO_QUERY_THROW );
+ xProp->setPropertyValue( maName, rValue );
+}
+
+sal_Int32 SAL_CALL
+SwVbaVariable::getIndex() throw ( css::uno::RuntimeException )
+{
+ const uno::Sequence< beans::PropertyValue > props = mxUserDefined->getPropertyValues();
+ for (sal_Int32 i = 0; i < props.getLength(); ++i)
+ {
+ if( maName.equals( props[i].Name ) )
+ return i+1;
+ }
+
+ return 0;
+}
+
+rtl::OUString&
+SwVbaVariable::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaVariable") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaVariable::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Variable" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbavariable.hxx b/sw/source/ui/vba/vbavariable.hxx
new file mode 100644
index 000000000000..af076804ef17
--- /dev/null
+++ b/sw/source/ui/vba/vbavariable.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * 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_VBA_VARIABLE_HXX
+#define SW_VBA_VARIABLE_HXX
+
+#include <ooo/vba/word/XVariable.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XVariable > SwVbaVariable_BASE;
+
+class SwVbaVariable : public SwVbaVariable_BASE
+{
+private:
+ css::uno::Reference< css::beans::XPropertyAccess > mxUserDefined;
+ rtl::OUString maName;
+
+public:
+ SwVbaVariable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext,
+ const css::uno::Reference< css::beans::XPropertyAccess >& rUserDefined, const rtl::OUString& rName ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaVariable();
+
+ // XVariable
+ virtual rtl::OUString SAL_CALL getName() throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL setName( const rtl::OUString& ) throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL getValue() throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL setValue( const css::uno::Any& rValue ) throw ( css::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL getIndex() throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_VARIABLE_HXX */
diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx
new file mode 100644
index 000000000000..6aa662702a12
--- /dev/null
+++ b/sw/source/ui/vba/vbavariables.cxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbavariables.hxx"
+#include "vbavariable.hxx"
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+uno::Reference< container::XIndexAccess > createVariablesAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertyAccess >& xUserDefined ) throw ( uno::RuntimeException )
+{
+ // FIXME: the performance is poor?
+ XNamedObjectCollectionHelper< word::XVariable >::XNamedVec mVariables;
+ const uno::Sequence< beans::PropertyValue > props = xUserDefined->getPropertyValues();
+ sal_Int32 nCount = props.getLength();
+ mVariables.reserve( nCount );
+ for( sal_Int32 i=0; i < nCount; i++ )
+ mVariables.push_back( uno::Reference< word::XVariable > ( new SwVbaVariable( xParent, xContext, xUserDefined, props[i].Name ) ) );
+
+ uno::Reference< container::XIndexAccess > xVariables( new XNamedObjectCollectionHelper< word::XVariable >( mVariables ) );
+ return xVariables;
+}
+
+SwVbaVariables::SwVbaVariables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertyAccess >& rUserDefined ): SwVbaVariables_BASE( xParent, xContext, createVariablesAccess( xParent, xContext, rUserDefined ) ), mxUserDefined( rUserDefined )
+{
+}
+// XEnumerationAccess
+uno::Type
+SwVbaVariables::getElementType() throw (uno::RuntimeException)
+{
+ return word::XVariable::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaVariables::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumerationAccess->createEnumeration();
+}
+
+uno::Any
+SwVbaVariables::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+uno::Any SAL_CALL
+SwVbaVariables::Add( const rtl::OUString& rName, const uno::Any& rValue ) throw (uno::RuntimeException)
+{
+ uno::Any aValue;
+ if( rValue.hasValue() )
+ aValue = rValue;
+ else
+ aValue <<= rtl::OUString();
+ uno::Reference< beans::XPropertyContainer > xPropertyContainer( mxUserDefined, uno::UNO_QUERY_THROW );
+ xPropertyContainer->addProperty( rName, beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::REMOVEABLE, aValue );
+
+ return uno::makeAny( uno::Reference< word::XVariable >( new SwVbaVariable( getParent(), mxContext, mxUserDefined, rName ) ) );
+}
+
+rtl::OUString&
+SwVbaVariables::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaVariables") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaVariables::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Variables") );
+ }
+ return sNames;
+}
diff --git a/sw/source/ui/vba/vbavariables.hxx b/sw/source/ui/vba/vbavariables.hxx
new file mode 100644
index 000000000000..4933ef6e75a4
--- /dev/null
+++ b/sw/source/ui/vba/vbavariables.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * 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_VBA_VARIABLES_HXX
+#define SW_VBA_VARIABLES_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XVariables.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XVariables > SwVbaVariables_BASE;
+
+class SwVbaVariables : public SwVbaVariables_BASE
+{
+private:
+ css::uno::Reference< css::beans::XPropertyAccess > mxUserDefined;
+
+public:
+ SwVbaVariables( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertyAccess >& rUserDefined );
+ virtual ~SwVbaVariables() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaVariables_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+
+ // XVariables
+ virtual css::uno::Any SAL_CALL Add( const rtl::OUString& rName, const css::uno::Any& rValue ) throw (css::uno::RuntimeException);
+};
+
+#endif /* SW_VBA_VARIABLES_HXX */
diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx
new file mode 100644
index 000000000000..9cb8bf1490ce
--- /dev/null
+++ b/sw/source/ui/vba/vbaview.cxx
@@ -0,0 +1,422 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbaview.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/view/XViewSettingsSupplier.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XEndnotesSupplier.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <ooo/vba/word/WdSpecialPane.hpp>
+#include <ooo/vba/word/WdViewType.hpp>
+#include <ooo/vba/word/WdSeekView.hpp>
+
+#include "wordvbahelper.hxx"
+#include "vbaheaderfooterhelper.hxx"
+#include <view.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+static const sal_Int32 DEFAULT_BODY_DISTANCE = 500;
+
+SwVbaView::SwVbaView( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext,
+ const uno::Reference< frame::XModel >& rModel ) throw ( uno::RuntimeException ) :
+ SwVbaView_BASE( rParent, rContext ), mxModel( rModel )
+{
+ uno::Reference< frame::XController > xController = mxModel->getCurrentController();
+
+ uno::Reference< text::XTextViewCursorSupplier > xTextViewCursorSupp( xController, uno::UNO_QUERY_THROW );
+ mxViewCursor = xTextViewCursorSupp->getViewCursor();
+
+ uno::Reference< view::XViewSettingsSupplier > xViewSettingSupp( xController, uno::UNO_QUERY_THROW );
+ mxViewSettings.set( xViewSettingSupp->getViewSettings(), uno::UNO_QUERY_THROW );
+}
+
+SwVbaView::~SwVbaView()
+{
+}
+
+::sal_Int32 SAL_CALL
+SwVbaView::getSeekView() throw (css::uno::RuntimeException)
+{
+ // FIXME: if the view cursor is in table, field, section and frame
+ // handle if the cursor is in table
+ uno::Reference< text::XText > xCurrentText = mxViewCursor->getText();
+ uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextContent > xTextContent;
+ while( xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextContent )
+ {
+ xCurrentText = xTextContent->getAnchor()->getText();
+ xCursorProps.set( xCurrentText->createTextCursor(), uno::UNO_QUERY_THROW );
+ }
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xCurrentText, uno::UNO_QUERY_THROW );
+ rtl::OUString aImplName = xServiceInfo->getImplementationName();
+ if( aImplName.equalsAscii("SwXBodyText") )
+ {
+ return word::WdSeekView::wdSeekMainDocument;
+ }
+ else if( aImplName.equalsAscii("SwXHeadFootText") )
+ {
+ if( HeaderFooterHelper::isHeader( mxModel, xCurrentText ) )
+ {
+ if( HeaderFooterHelper::isFirstPageHeader( mxModel, xCurrentText ) )
+ return word::WdSeekView::wdSeekFirstPageHeader;
+ else if( HeaderFooterHelper::isEvenPagesHeader( mxModel, xCurrentText ) )
+ return word::WdSeekView::wdSeekEvenPagesHeader;
+ else
+ return word::WdSeekView::wdSeekPrimaryHeader;
+ }
+ else
+ {
+ if( HeaderFooterHelper::isFirstPageFooter( mxModel, xCurrentText ) )
+ return word::WdSeekView::wdSeekFirstPageFooter;
+ else if( HeaderFooterHelper::isEvenPagesFooter( mxModel, xCurrentText ) )
+ return word::WdSeekView::wdSeekEvenPagesFooter;
+ else
+ return word::WdSeekView::wdSeekPrimaryFooter;
+ }
+ }
+ else if( aImplName.equalsAscii("SwXFootnote") )
+ {
+ if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Endnote") ) ) )
+ return word::WdSeekView::wdSeekEndnotes;
+ else
+ return word::WdSeekView::wdSeekFootnotes;
+ }
+
+ return word::WdSeekView::wdSeekMainDocument;
+}
+
+void SAL_CALL
+SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException)
+{
+ // FIXME: save the current cursor position, if the cursor is in the main
+ // document, so we can jump back to this position, if the macro sets
+ // the ViewMode back to wdSeekMainDocument
+
+ // if( _seekview == getSeekView() )
+ // return;
+
+ switch( _seekview )
+ {
+ case word::WdSeekView::wdSeekFirstPageFooter:
+ case word::WdSeekView::wdSeekFirstPageHeader:
+ case word::WdSeekView::wdSeekCurrentPageFooter:
+ case word::WdSeekView::wdSeekCurrentPageHeader:
+ case word::WdSeekView::wdSeekPrimaryFooter:
+ case word::WdSeekView::wdSeekPrimaryHeader:
+ case word::WdSeekView::wdSeekEvenPagesFooter:
+ case word::WdSeekView::wdSeekEvenPagesHeader:
+ {
+ // need to test
+ mxViewCursor->gotoRange( getHFTextRange( _seekview ), sal_False );
+ break;
+ }
+ case word::WdSeekView::wdSeekFootnotes:
+ {
+ uno::Reference< text::XFootnotesSupplier > xFootnotesSupp( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xFootnotes( xFootnotesSupp->getFootnotes(), uno::UNO_QUERY_THROW );
+ if( xFootnotes->getCount() > 0 )
+ {
+ uno::Reference< text::XText > xText( xFootnotes->getByIndex(0), uno::UNO_QUERY_THROW );
+ mxViewCursor->gotoRange( xText->getStart(), sal_False );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_NO_ACTIVE_OBJECT, rtl::OUString() );
+ }
+ break;
+ }
+ case word::WdSeekView::wdSeekEndnotes:
+ {
+ uno::Reference< text::XEndnotesSupplier > xEndnotesSupp( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xEndnotes( xEndnotesSupp->getEndnotes(), uno::UNO_QUERY_THROW );
+ if( xEndnotes->getCount() > 0 )
+ {
+ uno::Reference< text::XText > xText( xEndnotes->getByIndex(0), uno::UNO_QUERY_THROW );
+ mxViewCursor->gotoRange( xText->getStart(), sal_False );
+ }
+ else
+ {
+ DebugHelper::exception( SbERR_NO_ACTIVE_OBJECT, rtl::OUString() );
+ }
+ break;
+ }
+ case word::WdSeekView::wdSeekMainDocument:
+ {
+ uno::Reference< text::XTextDocument > xTextDocument( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XText > xText = xTextDocument->getText();
+ mxViewCursor->gotoRange( getFirstObjectPosition( xText ), sal_False );
+ break;
+ }
+ }
+}
+
+::sal_Int32 SAL_CALL
+SwVbaView::getSplitSpecial() throw (css::uno::RuntimeException)
+{
+ return word::WdSpecialPane::wdPaneNone;
+}
+
+void SAL_CALL
+SwVbaView::setSplitSpecial( ::sal_Int32/* _splitspecial */) throw (css::uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL
+SwVbaView::getTableGridLines() throw (css::uno::RuntimeException)
+{
+ sal_Bool bShowTableGridLine = sal_False;
+ mxViewSettings->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowTableBoundaries"))) >>= bShowTableGridLine;
+ return bShowTableGridLine;
+}
+
+void SAL_CALL
+SwVbaView::setTableGridLines( ::sal_Bool _tablegridlines ) throw (css::uno::RuntimeException)
+{
+ mxViewSettings->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowTableBoundaries")), uno::makeAny( _tablegridlines ) );
+}
+
+::sal_Int32 SAL_CALL
+SwVbaView::getType() throw (css::uno::RuntimeException)
+{
+ // FIXME: handle wdPrintPreview type
+ sal_Bool bOnlineLayout = sal_False;
+ mxViewSettings->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowOnlineLayout"))) >>= bOnlineLayout;
+ return bOnlineLayout ? word::WdViewType::wdWebView : word::WdViewType::wdPrintView;
+}
+
+void SAL_CALL
+SwVbaView::setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException)
+{
+ // FIXME: handle wdPrintPreview type
+ switch( _type )
+ {
+ case word::WdViewType::wdPrintView:
+ case word::WdViewType::wdNormalView:
+ {
+ mxViewSettings->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowOnlineLayout")), uno::makeAny( sal_False ) );
+ break;
+ }
+ case word::WdViewType::wdWebView:
+ {
+ mxViewSettings->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowOnlineLayout")), uno::makeAny( sal_True ) );
+ break;
+ }
+ case word::WdViewType::wdPrintPreview:
+ {
+ PrintPreviewHelper( uno::Any(),word::getView( mxModel ) );
+ break;
+ }
+ default:
+ DebugHelper::exception( SbERR_NOT_IMPLEMENTED, rtl::OUString() );
+
+ }
+}
+
+uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) throw (uno::RuntimeException)
+{
+ mxModel->lockControllers();
+
+ rtl::OUString aPropIsOn;
+ rtl::OUString aPropIsShared;
+ rtl::OUString aPropBodyDistance;
+ rtl::OUString aPropText;
+
+ switch( nType )
+ {
+ case word::WdSeekView::wdSeekCurrentPageFooter:
+ case word::WdSeekView::wdSeekFirstPageFooter:
+ case word::WdSeekView::wdSeekPrimaryFooter:
+ case word::WdSeekView::wdSeekEvenPagesFooter:
+ {
+ aPropIsOn = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn") );
+ aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared") );
+ aPropBodyDistance = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance") );
+ aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterText") );
+ break;
+ }
+ case word::WdSeekView::wdSeekCurrentPageHeader:
+ case word::WdSeekView::wdSeekFirstPageHeader:
+ case word::WdSeekView::wdSeekPrimaryHeader:
+ case word::WdSeekView::wdSeekEvenPagesHeader:
+ {
+ aPropIsOn = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn") );
+ aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared") );
+ aPropBodyDistance = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance") );
+ aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderText") );
+ break;
+ }
+ }
+
+ uno::Reference< text::XPageCursor > xPageCursor( mxViewCursor, uno::UNO_QUERY_THROW );
+
+ if( nType == word::WdSeekView::wdSeekFirstPageFooter
+ || nType == word::WdSeekView::wdSeekFirstPageHeader )
+ {
+ xPageCursor->jumpToFirstPage();
+ }
+
+ uno::Reference< style::XStyle > xStyle;
+ uno::Reference< text::XText > xText;
+ switch( nType )
+ {
+ case word::WdSeekView::wdSeekPrimaryFooter:
+ case word::WdSeekView::wdSeekPrimaryHeader:
+ case word::WdSeekView::wdSeekEvenPagesFooter:
+ case word::WdSeekView::wdSeekEvenPagesHeader:
+ {
+ // The primary header is the first header of the section.
+ // If the header is not shared between odd and even pages
+ // the odd page's header is the primary header. If the
+ // first page's header is different from the rest of the
+ // document, it is NOT the primary header ( the next primary
+ // header would be on page 3 )
+ // The even pages' header is only available if the header is
+ // not shared and the current style is applied to a page with
+ // an even page number
+ uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW );
+ rtl::OUString aPageStyleName;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
+ if( aPageStyleName.equalsAscii("First Page") )
+ {
+ // go to the beginning of where the next style is used
+ sal_Bool hasNextPage = sal_False;
+ xStyle = word::getCurrentPageStyle( mxModel );
+ do
+ {
+ hasNextPage = xPageCursor->jumpToNextPage();
+ }
+ while( hasNextPage && ( xStyle == word::getCurrentPageStyle( mxModel ) ) );
+
+ if( !hasNextPage )
+ DebugHelper::exception( SbERR_BAD_ACTION, rtl::OUString() );
+ }
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+
+ xStyle = word::getCurrentPageStyle( mxModel );
+ uno::Reference< beans::XPropertySet > xPageProps( xStyle, uno::UNO_QUERY_THROW );
+ sal_Bool isOn = sal_False;
+ xPageProps->getPropertyValue( aPropIsOn ) >>= isOn;
+ sal_Bool isShared = sal_False;
+ xPageProps->getPropertyValue( aPropIsShared ) >>= isShared;
+ if( !isOn )
+ {
+ xPageProps->setPropertyValue( aPropIsOn, uno::makeAny( sal_True ) );
+ xPageProps->setPropertyValue( aPropBodyDistance, uno::makeAny( DEFAULT_BODY_DISTANCE ) );
+ }
+ if( !isShared )
+ {
+ rtl::OUString aTempPropText = aPropText;
+ if( nType == word::WdSeekView::wdSeekEvenPagesFooter
+ || nType == word::WdSeekView::wdSeekEvenPagesHeader )
+ {
+ aTempPropText += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Left") );
+ }
+ else
+ {
+ aTempPropText += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Right") );
+ }
+ xText.set( xPageProps->getPropertyValue( aTempPropText), uno::UNO_QUERY_THROW );
+ }
+ else
+ {
+ if( nType == word::WdSeekView::wdSeekEvenPagesFooter
+ || nType == word::WdSeekView::wdSeekEvenPagesHeader )
+ {
+ DebugHelper::exception( SbERR_BAD_ACTION, rtl::OUString() );
+ }
+ xText.set( xPageProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW );
+ }
+
+ mxModel->unlockControllers();
+ if( !xText.is() )
+ {
+ DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
+ }
+ uno::Reference< text::XTextRange > xTextRange = getFirstObjectPosition( xText );
+ return xTextRange;
+}
+
+uno::Reference< text::XTextRange > SwVbaView::getFirstObjectPosition( const uno::Reference< text::XText >& xText ) throw (uno::RuntimeException)
+{
+ // if the first object is table, get the position of first cell
+ uno::Reference< text::XTextRange > xTextRange;
+ uno::Reference< container::XEnumerationAccess > xParaAccess( xText, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumeration> xParaEnum = xParaAccess->createEnumeration();
+ if( xParaEnum->hasMoreElements() )
+ {
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xParaEnum->nextElement(), uno::UNO_QUERY_THROW );
+ if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ) ) )
+ {
+ uno::Reference< table::XCellRange > xCellRange( xServiceInfo, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XText> xFirstCellText( xCellRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW );
+ xTextRange = xFirstCellText->getStart();
+ }
+ }
+ if( !xTextRange.is() )
+ xTextRange = xText->getStart();
+ return xTextRange;
+}
+
+rtl::OUString&
+SwVbaView::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaView") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaView::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.View" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sw/source/ui/vba/vbaview.hxx b/sw/source/ui/vba/vbaview.hxx
new file mode 100644
index 000000000000..03e183ec38a3
--- /dev/null
+++ b/sw/source/ui/vba/vbaview.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SW_VBA_VIEW_HXX
+#define SW_VBA_VIEW_HXX
+
+#include <ooo/vba/word/XView.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XView > SwVbaView_BASE;
+
+class SwVbaView : public SwVbaView_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XTextViewCursor > mxViewCursor;
+ css::uno::Reference< css::beans::XPropertySet > mxViewSettings;
+
+ css::uno::Reference< css::text::XTextRange > getHFTextRange( sal_Int32 nType ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::text::XTextRange > getFirstObjectPosition( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException);
+
+public:
+ SwVbaView( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext,
+ const css::uno::Reference< css::frame::XModel >& rModel ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaView();
+
+ // XView
+ virtual ::sal_Int32 SAL_CALL getSeekView() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getSplitSpecial() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSplitSpecial( ::sal_Int32 _splitspecial ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getTableGridLines() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setTableGridLines( ::sal_Bool _tablegridlines ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_VIEW_HXX */
diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx
new file mode 100644
index 000000000000..519b5a5c725b
--- /dev/null
+++ b/sw/source/ui/vba/vbawindow.cxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include <vbahelper/helperdecl.hxx>
+#include "vbawindow.hxx"
+#include "vbaglobals.hxx"
+#include "vbadocument.hxx"
+#include "vbaview.hxx"
+#include "vbapanes.hxx"
+#include "vbapane.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+SwVbaWindow::SwVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext, xModel )
+{
+}
+
+SwVbaWindow::SwVbaWindow( uno::Sequence< uno::Any > const & args, uno::Reference< uno::XComponentContext > const & xContext )
+ : WindowImpl_BASE( args, xContext )
+{
+}
+
+void
+SwVbaWindow::Activate() throw (css::uno::RuntimeException)
+{
+ SwVbaDocument document( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+
+ document.Activate();
+}
+
+void
+SwVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& RouteDocument ) throw (uno::RuntimeException)
+{
+ // FIXME: it is incorrect when there are more than 1 windows
+ SwVbaDocument document( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+ uno::Any FileName;
+ document.Close(SaveChanges, FileName, RouteDocument );
+}
+
+uno::Any SAL_CALL
+SwVbaWindow::getView() throw (uno::RuntimeException)
+{
+ return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, m_xModel ) ) );
+}
+
+void SAL_CALL SwVbaWindow::setView( const uno::Any& _view ) throw (uno::RuntimeException)
+{
+ sal_Int32 nType = 0;
+ if( _view >>= nType )
+ {
+ SwVbaView view( this, mxContext, m_xModel );
+ view.setType( nType );
+ }
+}
+
+uno::Any SAL_CALL
+SwVbaWindow::Panes( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xPanes( new SwVbaPanes( this, mxContext, m_xModel ) );
+ if( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
+ return uno::makeAny( xPanes );
+
+ return uno::Any( xPanes->Item( aIndex, uno::Any() ) );
+}
+
+uno::Any SAL_CALL
+SwVbaWindow::ActivePane() throw (uno::RuntimeException)
+{
+ return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( this, mxContext, m_xModel ) ) );
+}
+
+rtl::OUString&
+SwVbaWindow::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaWindow") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaWindow::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Window" ) );
+ }
+ return aServiceNames;
+}
diff --git a/sw/source/ui/vba/vbawindow.hxx b/sw/source/ui/vba/vbawindow.hxx
new file mode 100644
index 000000000000..902af1b51257
--- /dev/null
+++ b/sw/source/ui/vba/vbawindow.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * 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_VBA_WINDOW_HXX
+#define SW_VBA_WINDOW_HXX
+#include <cppuhelper/implbase1.hxx>
+#include <ooo/vba/word/XWindow.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbawindowbase.hxx>
+
+typedef cppu::ImplInheritanceHelper1< VbaWindowBase, ov::word::XWindow > WindowImpl_BASE;
+
+class SwVbaWindow : public WindowImpl_BASE
+{
+public:
+ SwVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+ SwVbaWindow( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext );
+
+
+ // Attributes
+ virtual css::uno::Any SAL_CALL getView() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setView( const css::uno::Any& _view ) throw (css::uno::RuntimeException);
+ // Methods
+ virtual void SAL_CALL Activate( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Panes( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL ActivePane() throw (css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif //SW_VBA_WINDOW_HXX
diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx
new file mode 100644
index 000000000000..92e3e78790a0
--- /dev/null
+++ b/sw/source/ui/vba/vbawrapformat.cxx
@@ -0,0 +1,257 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "vbawrapformat.hxx"
+#include <ooo/vba/word/WdWrapSideType.hpp>
+#include <ooo/vba/word/WdWrapType.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
+#include <vbahelper/vbahelper.hxx>
+#include <vbahelper/helperdecl.hxx>
+
+using namespace ooo::vba;
+using namespace com::sun::star;
+
+SwVbaWrapFormat::SwVbaWrapFormat( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : SwVbaWrapFormat_BASE( xParent, xContext ), m_xShape( xShape ), mnWrapFormatType( 0 ), mnSide( word::WdWrapSideType::wdWrapBoth )
+{
+ m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
+}
+
+SwVbaWrapFormat::SwVbaWrapFormat( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) : SwVbaWrapFormat_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext ), m_xShape( getXSomethingFromArgs< drawing::XShape >( aArgs, 1, false ) ), mnWrapFormatType( 0 ), mnSide( word::WdWrapSideType::wdWrapBoth )
+{
+ m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
+}
+
+void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException)
+{
+ text::WrapTextMode eTextMode = text::WrapTextMode_NONE;
+ if( mnSide == word::WdWrapSideType::wdWrapLeft )
+ {
+ eTextMode = text::WrapTextMode_LEFT;
+ }
+ else if( mnSide == word::WdWrapSideType::wdWrapRight )
+ {
+ eTextMode = text::WrapTextMode_RIGHT;
+ }
+ else if( mnSide == word::WdWrapSideType::wdWrapBoth ||
+ mnSide == word::WdWrapSideType::wdWrapLargest )
+ {
+ switch( mnWrapFormatType )
+ {
+ case word::WdWrapType::wdWrapNone:
+ case word::WdWrapType::wdWrapThrough:
+ {
+ eTextMode = text::WrapTextMode_THROUGHT;
+ break;
+ }
+ case word::WdWrapType::wdWrapInline:
+ case word::WdWrapType::wdWrapTopBottom:
+ {
+ eTextMode = text::WrapTextMode_NONE;
+ break;
+ }
+ case word::WdWrapType::wdWrapSquare:
+ {
+ eTextMode = text::WrapTextMode_PARALLEL;
+ m_xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SurroundContour") ), uno::makeAny( sal_False ) );
+ break;
+ }
+ case word::WdWrapType::wdWrapTight:
+ {
+ eTextMode = text::WrapTextMode_PARALLEL;
+ m_xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SurroundContour") ), uno::makeAny( sal_True ) );
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ }
+ }
+ }
+ m_xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextWrap") ), uno::makeAny( eTextMode ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaWrapFormat::getType() throw (uno::RuntimeException)
+{
+ sal_Int32 nType = word::WdWrapType::wdWrapSquare;
+ text::WrapTextMode eTextMode;
+ m_xPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextWrap") )) >>= eTextMode;
+ switch( eTextMode )
+ {
+ case text::WrapTextMode_NONE:
+ {
+ nType = word::WdWrapType::wdWrapTopBottom;
+ break;
+ }
+ case text::WrapTextMode_THROUGHT:
+ {
+ nType = word::WdWrapType::wdWrapNone;
+ break;
+ }
+ case text::WrapTextMode_PARALLEL:
+ {
+ sal_Bool bContour = sal_False;
+ m_xPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SurroundContour") )) >>= bContour;
+ if( bContour )
+ nType = word::WdWrapType::wdWrapTight;
+ else
+ nType = word::WdWrapType::wdWrapSquare;
+ break;
+ }
+ case text::WrapTextMode_DYNAMIC:
+ case text::WrapTextMode_LEFT:
+ case text::WrapTextMode_RIGHT:
+ {
+ nType = word::WdWrapType::wdWrapThrough;
+ break;
+ }
+ default:
+ {
+ nType = word::WdWrapType::wdWrapSquare;
+ }
+ }
+ return nType;
+}
+
+void SAL_CALL SwVbaWrapFormat::setType( ::sal_Int32 _type ) throw (uno::RuntimeException)
+{
+ mnWrapFormatType = _type;
+ makeWrap();
+}
+
+::sal_Int32 SAL_CALL SwVbaWrapFormat::getSide() throw (uno::RuntimeException)
+{
+ sal_Int32 nSide = word::WdWrapSideType::wdWrapBoth;
+ text::WrapTextMode eTextMode;
+ m_xPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextWrap") )) >>= eTextMode;
+ switch( eTextMode )
+ {
+ case text::WrapTextMode_LEFT:
+ {
+ nSide = word::WdWrapSideType::wdWrapLeft;
+ break;
+ }
+ case text::WrapTextMode_RIGHT:
+ {
+ nSide = word::WdWrapSideType::wdWrapRight;
+ break;
+ }
+ default:
+ {
+ nSide = word::WdWrapSideType::wdWrapBoth;
+ }
+ }
+ return nSide;
+}
+
+void SAL_CALL SwVbaWrapFormat::setSide( ::sal_Int32 _side ) throw (uno::RuntimeException)
+{
+ mnSide = _side;
+ makeWrap();
+}
+
+float SwVbaWrapFormat::getDistance( const rtl::OUString& sName ) throw (uno::RuntimeException)
+{
+ sal_Int32 nDistance = 0;
+ m_xPropertySet->getPropertyValue( sName ) >>= nDistance;
+ return static_cast< float >( Millimeter::getInPoints( nDistance ) );
+}
+
+void SwVbaWrapFormat::setDistance( const rtl::OUString& sName, float _distance ) throw (uno::RuntimeException)
+{
+ sal_Int32 nDistance = Millimeter::getInHundredthsOfOneMillimeter( _distance );
+ m_xPropertySet->setPropertyValue( sName, uno::makeAny( nDistance ) );
+}
+
+float SAL_CALL SwVbaWrapFormat::getDistanceTop() throw (uno::RuntimeException)
+{
+ return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ) );
+}
+
+void SAL_CALL SwVbaWrapFormat::setDistanceTop( float _distancetop ) throw (uno::RuntimeException)
+{
+ setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ), _distancetop );
+}
+
+float SAL_CALL SwVbaWrapFormat::getDistanceBottom() throw (uno::RuntimeException)
+{
+ return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin") ) );
+}
+
+void SAL_CALL SwVbaWrapFormat::setDistanceBottom( float _distancebottom ) throw (uno::RuntimeException)
+{
+ setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin") ), _distancebottom );
+}
+
+float SAL_CALL SwVbaWrapFormat::getDistanceLeft() throw (uno::RuntimeException)
+{
+ return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ) );
+}
+
+void SAL_CALL SwVbaWrapFormat::setDistanceLeft( float _distanceleft ) throw (uno::RuntimeException)
+{
+ setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ), _distanceleft );
+}
+
+float SAL_CALL SwVbaWrapFormat::getDistanceRight() throw (uno::RuntimeException)
+{
+ return getDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ) );
+}
+
+void SAL_CALL SwVbaWrapFormat::setDistanceRight( float _distanceright ) throw (uno::RuntimeException)
+{
+ setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ), _distanceright );
+}
+
+rtl::OUString&
+SwVbaWrapFormat::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaWrapFormat") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaWrapFormat::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.WrapFormat" ) );
+ }
+ return aServiceNames;
+}
+
+namespace wrapformat
+{
+namespace sdecl = comphelper::service_decl;
+sdecl::vba_service_class_<SwVbaWrapFormat, sdecl::with_args<true> > serviceImpl;
+extern sdecl::ServiceDecl const serviceDecl(
+ serviceImpl,
+ "SwVbaWrapFormat",
+ "ooo.vba.word.WrapFormat" );
+}
+
+
diff --git a/sw/source/ui/vba/vbawrapformat.hxx b/sw/source/ui/vba/vbawrapformat.hxx
new file mode 100644
index 000000000000..e24f2b90ac42
--- /dev/null
+++ b/sw/source/ui/vba/vbawrapformat.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * 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_VBA_XWRAPFORMAT_HXX
+#define SW_VBA_XWRAPFORMAT_HXX
+
+#include <com/sun/star/drawing/XShape.hpp>
+#include <ooo/vba/word/XWrapFormat.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XWrapFormat > SwVbaWrapFormat_BASE;
+
+class SwVbaWrapFormat : public SwVbaWrapFormat_BASE
+{
+private:
+ css::uno::Reference< css::drawing::XShape > m_xShape;
+ css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
+ sal_Int32 mnWrapFormatType;
+ sal_Int32 mnSide;
+
+private:
+ void makeWrap() throw (css::uno::RuntimeException);
+ float getDistance( const rtl::OUString& sName ) throw (css::uno::RuntimeException);
+ void setDistance( const rtl::OUString& sName, float _distance ) throw (css::uno::RuntimeException);
+
+public:
+ SwVbaWrapFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
+ SwVbaWrapFormat( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
+
+ virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getSide() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSide( ::sal_Int32 _side ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getDistanceTop() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDistanceTop( float _distancetop ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getDistanceBottom() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDistanceBottom( float _distancebottom ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getDistanceLeft() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDistanceLeft( float _distanceleft ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getDistanceRight() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setDistanceRight( float _distanceright ) throw (css::uno::RuntimeException);
+
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif//SW_VBA_XWRAPFORMAT_HXX
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
new file mode 100644
index 000000000000..82dfacf4f18d
--- /dev/null
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include <docsh.hxx>
+#include "wordvbahelper.hxx"
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <unotxdoc.hxx>
+#include <doc.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+#define FIRST_PAGE 1;
+
+namespace ooo
+{
+namespace vba
+{
+namespace word
+{
+
+SwDocShell* getDocShell( const uno::Reference< frame::XModel>& xModel )
+{
+ uno::Reference< lang::XUnoTunnel > xTunnel( xModel, uno::UNO_QUERY_THROW );
+ SwXTextDocument* pXDoc = reinterpret_cast< SwXTextDocument * >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextDocument::getUnoTunnelId())));
+ return pXDoc ? pXDoc->GetDocShell() : 0;
+}
+
+SwView* getView( const uno::Reference< frame::XModel>& xModel )
+{
+ SwDocShell* pDocShell = getDocShell( xModel );
+ return pDocShell? pDocShell->GetView() : 0;
+}
+
+uno::Reference< text::XTextViewCursor > getXTextViewCursor( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ uno::Reference< frame::XController > xController = xModel->getCurrentController();
+ uno::Reference< text::XTextViewCursorSupplier > xTextViewCursorSupp( xController, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextViewCursor > xTextViewCursor = xTextViewCursorSupp->getViewCursor();
+ return xTextViewCursor;
+}
+
+uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xCursorProps( getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ rtl::OUString aPageStyleName;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
+ uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< style::XStyle > xStyle( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW );
+
+ return xStyle;
+}
+
+sal_Int32 getPageCount( const uno::Reference< frame::XModel>& xModel ) throw (uno::RuntimeException)
+{
+ SwDocShell* pDocShell = getDocShell( xModel );
+ return pDocShell ? pDocShell->GetDoc()->GetPageCount() : 0;
+}
+
+} // word
+} //
+} //
diff --git a/sw/source/ui/vba/wordvbahelper.hxx b/sw/source/ui/vba/wordvbahelper.hxx
new file mode 100644
index 000000000000..0629d613a724
--- /dev/null
+++ b/sw/source/ui/vba/wordvbahelper.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * 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_WORD_VBA_HELPER_HXX
+#define SW_WORD_VBA_HELPER_HXX
+
+#include <vbahelper/vbahelper.hxx>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/style/XStyle.hpp>
+
+class SwDocShell;
+class SwView;
+namespace ooo
+{
+ namespace vba
+ {
+ namespace word
+ {
+ //css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
+ SwDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel );
+ SwView* getView( const css::uno::Reference< css::frame::XModel>& xModel );
+ css::uno::Reference< css::text::XTextViewCursor > getXTextViewCursor( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::style::XStyle > getCurrentPageStyle( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ sal_Int32 getPageCount( const css::uno::Reference< css::frame::XModel>& xModel ) throw (css::uno::RuntimeException);
+
+} // word
+} // vba
+} // ooo
+#endif
diff --git a/sw/source/ui/web/makefile.mk b/sw/source/ui/web/makefile.mk
index c7e69e272c45..2b1eb7590b9a 100644
--- a/sw/source/ui/web/makefile.mk
+++ b/sw/source/ui/web/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.7 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/web/wdocsh.cxx b/sw/source/ui/web/wdocsh.cxx
index dbfdf87dc94d..4953e715fe45 100644
--- a/sw/source/ui/web/wdocsh.cxx
+++ b/sw/source/ui/web/wdocsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wdocsh.cxx,v $
- * $Revision: 1.16.146.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -34,7 +31,7 @@
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/app.hxx>
#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src
index 06b4da304170..1aa7fc03b4c6 100644
--- a/sw/source/ui/web/web.src
+++ b/sw/source/ui/web/web.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: web.src,v $
- * $Revision: 1.39 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/web/wformsh.cxx b/sw/source/ui/web/wformsh.cxx
index ed9a84667c79..0ce34812216f 100644
--- a/sw/source/ui/web/wformsh.cxx
+++ b/sw/source/ui/web/wformsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wformsh.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,7 +35,7 @@
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
#endif
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/objface.hxx>
#include <tools/globname.hxx>
#include <sfx2/app.hxx>
diff --git a/sw/source/ui/web/wfrmsh.cxx b/sw/source/ui/web/wfrmsh.cxx
index ee2f61884000..df391080d467 100644
--- a/sw/source/ui/web/wfrmsh.cxx
+++ b/sw/source/ui/web/wfrmsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wfrmsh.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#include "hintids.hxx"
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
-#include <svx/srchitem.hxx> //***
+#include <svl/srchitem.hxx> //***
#include "swtypes.hxx"
#include "cmdid.h"
diff --git a/sw/source/ui/web/wgrfsh.cxx b/sw/source/ui/web/wgrfsh.cxx
index 00a21da8e1b7..a8c85f5b0627 100644
--- a/sw/source/ui/web/wgrfsh.cxx
+++ b/sw/source/ui/web/wgrfsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wgrfsh.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <sfx2/msg.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
diff --git a/sw/source/ui/web/wlistsh.cxx b/sw/source/ui/web/wlistsh.cxx
index fc3f0635b54d..3c2c578ea628 100644
--- a/sw/source/ui/web/wlistsh.cxx
+++ b/sw/source/ui/web/wlistsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wlistsh.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#include <sfx2/msg.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svx/imapdlg.hxx>
#include "cmdid.h"
diff --git a/sw/source/ui/web/wolesh.cxx b/sw/source/ui/web/wolesh.cxx
index 131b6d72da10..db23229adb36 100644
--- a/sw/source/ui/web/wolesh.cxx
+++ b/sw/source/ui/web/wolesh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wolesh.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#include <sfx2/msg.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include "wrtsh.hxx"
#include "view.hxx"
diff --git a/sw/source/ui/web/wtabsh.cxx b/sw/source/ui/web/wtabsh.cxx
index c47541214d58..ebf8d18a5dd7 100644
--- a/sw/source/ui/web/wtabsh.cxx
+++ b/sw/source/ui/web/wtabsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wtabsh.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -37,7 +34,7 @@
#include <sfx2/app.hxx>
#include <tools/globname.hxx>
#include <sfx2/objface.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include "cmdid.h"
diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx
index abdcee987840..05c454d5c431 100644
--- a/sw/source/ui/web/wtextsh.cxx
+++ b/sw/source/ui/web/wtextsh.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wtextsh.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#include "hintids.hxx"
#include <sfx2/objface.hxx>
#include <sfx2/app.hxx>
-#include <svx/srchitem.hxx> //***
+#include <svl/srchitem.hxx> //***
#include <basic/sbxvar.hxx>
#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index 34ccd8f72378..9a55aaf94a28 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wview.cxx,v $
- * $Revision: 1.16 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,7 @@
#include <sfx2/msg.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/templdlg.hxx>
#include <svx/srchdlg.hxx>
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index 30536bf1fec8..182fb5e37854 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: delete.cxx,v $
- * $Revision: 1.22 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#include <wrtsh.hxx>
#include <crsskip.hxx>
#include <swcrsr.hxx>
-#include <svx/lrspitem.hxx> // #i23725#
+#include <editeng/lrspitem.hxx> // #i23725#
// --> OD 2006-07-10 #134369#
#ifndef _VIEW_HXX
#include <view.hxx>
diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk
index b082743e6f14..baeb3acd25e5 100644
--- a/sw/source/ui/wrtsh/makefile.mk
+++ b/sw/source/ui/wrtsh/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.8 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index e250b35e6a00..dc196de9d9da 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: move.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index b46cbdb3a1a5..9acf40160bc3 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: select.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,19 +32,13 @@
#include <limits.h>
#include <hintids.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/macitem.hxx>
#include <unotools/charclass.hxx>
-#include <svx/scripttypeitem.hxx>
-#ifndef _CMDID_H
+#include <editeng/scripttypeitem.hxx>
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <wrtsh.hxx>
#include <frmatr.hxx>
#include <initui.hxx>
@@ -343,7 +334,6 @@ void SwWrtShell::UnSelectFrm()
// Rahmenselektion aufheben mit garantiert ungueltiger Position
Point aPt(LONG_MIN, LONG_MIN);
SelectObj(aPt, 0);
- GetView().LeaveDrawCreate();
SwTransferable::ClearSelection( *this );
}
diff --git a/sw/source/ui/wrtsh/wrtsh.hrc b/sw/source/ui/wrtsh/wrtsh.hrc
index 5b0d80f66891..a82a4c3c1b48 100644
--- a/sw/source/ui/wrtsh/wrtsh.hrc
+++ b/sw/source/ui/wrtsh/wrtsh.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtsh.hrc,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/wrtsh/wrtsh.src b/sw/source/ui/wrtsh/wrtsh.src
index 5cd9dc23037c..21547d107758 100644
--- a/sw/source/ui/wrtsh/wrtsh.src
+++ b/sw/source/ui/wrtsh/wrtsh.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtsh.src,v $
- * $Revision: 1.46 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index cd6bb82739ca..c3a8ae118f8a 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtsh1.cxx,v $
- * $Revision: 1.72 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -44,7 +41,7 @@
#include <hintids.hxx>
#include <svx/svdview.hxx>
#include <sot/factory.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#ifndef _SOUND_HXX //autogen
#include <vcl/sound.hxx>
#endif
@@ -56,12 +53,11 @@
#include <svtools/ehdl.hxx>
#include <svtools/soerr.hxx>
#include <tools/cachestr.hxx>
-#include <svtools/moduleoptions.hxx>
-#include <svx/sizeitem.hxx>
-#include <svx/brkitem.hxx>
-#include <svx/svxacorr.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <editeng/sizeitem.hxx>
+#include <editeng/brkitem.hxx>
+#include <editeng/svxacorr.hxx>
#include <vcl/graph.hxx>
-#include <svx/impgrf.hxx>
#include <sfx2/printer.hxx>
#include <unotools/charclass.hxx>
@@ -111,7 +107,7 @@
#include <sfx2/request.hxx>
#include <paratr.hxx>
#include <ndtxt.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
// -> #111827#
#include <SwRewriter.hxx>
@@ -122,7 +118,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svx/acorrcfg.hxx>
+#include <editeng/acorrcfg.hxx>
#include "PostItMgr.hxx"
@@ -160,7 +156,7 @@ SvxAutoCorrect* lcl_IsAutoCorr()
{
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
if( pACorr && !pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- ChgFractionSymbol | ChgOrdinalNumber |
+ AddNonBrkSpace | ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr | Autocorrect ))
pACorr = 0;
return pACorr;
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 9141279f141b..a2477349ee44 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtsh2.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,12 +29,12 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx> // define ITEMIDs
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <sfx2/frame.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx
index f7d2cdc2dad2..460d89a07a1c 100644
--- a/sw/source/ui/wrtsh/wrtsh3.cxx
+++ b/sw/source/ui/wrtsh/wrtsh3.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtsh3.cxx,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index 0a7c17118abd..541674e912a3 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtsh4.cxx,v $
- * $Revision: 1.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index 9c85b08c2993..f3c62f9f9dff 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: wrtundo.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#define _SVSTDARR_STRINGSDTOR
#include <tools/resid.hxx>
#include <sfx2/app.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/slstitm.hxx>
#include <wrtsh.hxx>
#include <swundo.hxx> // fuer Undo-Ids
#include <swdtflvr.hxx>